sl@0: // (C) Copyright John Maddock 2005. sl@0: // Use, modification and distribution are subject to the sl@0: // Boost Software License, Version 1.0. (See accompanying file sl@0: // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) sl@0: sl@0: #ifndef BOOST_TR1_MEMORY_HPP_INCLUDED sl@0: # define BOOST_TR1_MEMORY_HPP_INCLUDED sl@0: # include sl@0: # include sl@0: # include sl@0: sl@0: #ifndef BOOST_HAS_TR1_SHARED_PTR sl@0: sl@0: // sl@0: // This header can get included by boost/shared_ptr.hpp which leads sl@0: // to cyclic dependencies, the workaround is to forward declare all sl@0: // the boost components, and then include the actual headers afterwards. sl@0: // This is fragile, but seems to work, and doesn't require modification sl@0: // of boost/shared_ptr.hpp. sl@0: // sl@0: namespace boost{ sl@0: sl@0: class bad_weak_ptr; sl@0: template class weak_ptr; sl@0: template class shared_ptr; sl@0: template void swap(weak_ptr & a, weak_ptr & b); sl@0: template void swap(shared_ptr & a, shared_ptr & b); sl@0: template shared_ptr static_pointer_cast(shared_ptr const & r); sl@0: template shared_ptr dynamic_pointer_cast(shared_ptr const & r); sl@0: template shared_ptr const_pointer_cast(shared_ptr const & r); sl@0: template D * get_deleter(shared_ptr const & p); sl@0: template class enable_shared_from_this; sl@0: sl@0: namespace detail{ sl@0: class shared_count; sl@0: class weak_count; sl@0: } sl@0: sl@0: } sl@0: sl@0: namespace std{ namespace tr1{ sl@0: sl@0: using ::boost::bad_weak_ptr; sl@0: using ::boost::shared_ptr; sl@0: #if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582) sl@0: using ::boost::swap; sl@0: #endif sl@0: using ::boost::static_pointer_cast; sl@0: using ::boost::dynamic_pointer_cast; sl@0: using ::boost::const_pointer_cast; sl@0: using ::boost::get_deleter; sl@0: using ::boost::weak_ptr; sl@0: using ::boost::enable_shared_from_this; sl@0: sl@0: } } sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: #else sl@0: sl@0: # ifdef BOOST_HAS_INCLUDE_NEXT sl@0: # include_next BOOST_TR1_HEADER(memory) sl@0: # else sl@0: # include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(memory)) sl@0: # endif sl@0: sl@0: #endif sl@0: sl@0: #endif sl@0: