Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/boost/tr1/memory.hpp @ 46

Last change on this file since 46 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 2.1 KB
Line 
1//  (C) Copyright John Maddock 2005.
2//  Use, modification and distribution are subject to the
3//  Boost Software License, Version 1.0. (See accompanying file
4//  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6#ifndef BOOST_TR1_MEMORY_HPP_INCLUDED
7#  define BOOST_TR1_MEMORY_HPP_INCLUDED
8#  include <boost/tr1/detail/config.hpp>
9#  include <boost/detail/workaround.hpp>
10#  include <memory>
11
12#ifndef BOOST_HAS_TR1_SHARED_PTR
13
14//
15// This header can get included by boost/shared_ptr.hpp which leads
16// to cyclic dependencies, the workaround is to forward declare all
17// the boost components, and then include the actual headers afterwards.
18// This is fragile, but seems to work, and doesn't require modification
19// of boost/shared_ptr.hpp.
20//
21namespace boost{
22
23class bad_weak_ptr;
24template<class T> class weak_ptr;
25template<class T> class shared_ptr;
26template<class T> void swap(weak_ptr<T> & a, weak_ptr<T> & b);
27template<class T> void swap(shared_ptr<T> & a, shared_ptr<T> & b);
28template<class T, class U> shared_ptr<T> static_pointer_cast(shared_ptr<U> const & r);
29template<class T, class U> shared_ptr<T> dynamic_pointer_cast(shared_ptr<U> const & r);
30template<class T, class U> shared_ptr<T> const_pointer_cast(shared_ptr<U> const & r);
31template<class D, class T> D * get_deleter(shared_ptr<T> const & p);
32template<class T> class enable_shared_from_this;
33
34namespace detail{
35class shared_count;
36class weak_count;
37}
38
39}
40
41namespace std{ namespace tr1{
42
43   using ::boost::bad_weak_ptr;
44   using ::boost::shared_ptr;
45#if !BOOST_WORKAROUND(__BORLANDC__, < 0x0582)
46   using ::boost::swap;
47#endif
48   using ::boost::static_pointer_cast;
49   using ::boost::dynamic_pointer_cast;
50   using ::boost::const_pointer_cast;
51   using ::boost::get_deleter;
52   using ::boost::weak_ptr;
53   using ::boost::enable_shared_from_this;
54
55} }
56#include <boost/shared_ptr.hpp>
57#include <boost/weak_ptr.hpp>
58#include <boost/enable_shared_from_this.hpp>
59
60#else
61
62#  ifdef BOOST_HAS_INCLUDE_NEXT
63#     include_next BOOST_TR1_HEADER(memory)
64#  else
65#     include BOOST_TR1_STD_HEADER(BOOST_TR1_PATH(memory))
66#  endif
67
68#endif
69
70#endif
71
Note: See TracBrowser for help on using the repository browser.