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