// (C) Copyright John Maddock 2012 // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/config for more information. // MACRO: BOOST_NO_CXX11_SMART_PTR // TITLE: C++11 has no shared_ptr and unique_ptr // DESCRIPTION: The compiler does not support the C++11 smart pointer features added to #include // Hash functions for shared pointers should be in // but with some std lib's we have to include as well... #include namespace boost_no_cxx11_smart_ptr { int test() { std::unique_ptr upi(new int); std::shared_ptr spi(new int), spi2(new int); spi = std::static_pointer_cast(spi); std::hash > h1; std::hash > h2; (void)h1; (void)h2; return 0; } }