make_unique tests run only for C++11 compilers

This commit is contained in:
Glen Fernandes
2014-01-31 11:01:37 -08:00
parent 72e5fb6fd7
commit aede0039bf
8 changed files with 69 additions and 16 deletions

View File

@@ -7,6 +7,7 @@
* or copy at http://boost.org/LICENSE_1_0.txt)
*/
#include <boost/config.hpp>
#if !defined(BOOST_NO_CXX11_SMART_PTR)
#include <boost/detail/lightweight_test.hpp>
#include <boost/smart_ptr/make_unique_array.hpp>
@@ -33,7 +34,6 @@ private:
unsigned int type::instances = 0;
int main() {
#if !defined(BOOST_NO_CXX11_SMART_PTR)
BOOST_TEST(type::instances == 0);
try {
boost::make_unique<type[]>(6);
@@ -65,7 +65,13 @@ int main() {
} catch (...) {
BOOST_TEST(type::instances == 0);
}
#endif
return boost::report_errors();
}
#else
int main() {
return 0;
}
#endif