From b1ed011b6e4638ca15a28c9d9bfdbccd494b95bd Mon Sep 17 00:00:00 2001 From: Chris Glover Date: Sat, 1 Oct 2016 14:49:28 -0400 Subject: [PATCH] Cleaner removal of std::shared_ptr tests on compilers without C++11 shared_ptr --- test/type_index_runtime_cast_test.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/type_index_runtime_cast_test.cpp b/test/type_index_runtime_cast_test.cpp index 397014e..cd24bb3 100644 --- a/test/type_index_runtime_cast_test.cpp +++ b/test/type_index_runtime_cast_test.cpp @@ -9,12 +9,14 @@ // #include #include -#include #include #include #include +#if !defined(BOOST_NO_CXX11_SMART_PTR) +# include +#endif // Classes include a member variable "name" with the // name of the class hard coded so we can be sure that @@ -249,7 +251,7 @@ void boost_shared_ptr() void std_shared_ptr() { -#if defined(__cplusplus) && (__cplusplus >= 201103L) +#if !defined(BOOST_NO_CXX11_SMART_PTR) using namespace boost::typeindex; std::shared_ptr d = std::make_shared(); std::shared_ptr b = d;