diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 11:08:07 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-09-13 11:09:00 +0900 |
commit | b5c87084afaef42b2d058f68091be31988a6a874 (patch) | |
tree | adef9a65870a41181687e11d57fdf98e7629de3c /boost/smart_ptr/detail/shared_count.hpp | |
parent | 34bd32e225e2a8a94104489b31c42e5801cc1f4a (diff) | |
download | boost-b5c87084afaef42b2d058f68091be31988a6a874.tar.gz boost-b5c87084afaef42b2d058f68091be31988a6a874.tar.bz2 boost-b5c87084afaef42b2d058f68091be31988a6a874.zip |
Imported Upstream version 1.64.0upstream/1.64.0
Change-Id: Id9212edd016dd55f21172c427aa7894d1d24148b
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/smart_ptr/detail/shared_count.hpp')
-rw-r--r-- | boost/smart_ptr/detail/shared_count.hpp | 62 |
1 files changed, 4 insertions, 58 deletions
diff --git a/boost/smart_ptr/detail/shared_count.hpp b/boost/smart_ptr/detail/shared_count.hpp index 7996aa4325..9813842300 100644 --- a/boost/smart_ptr/detail/shared_count.hpp +++ b/boost/smart_ptr/detail/shared_count.hpp @@ -249,18 +249,8 @@ public: try { -#if !defined( BOOST_NO_CXX11_ALLOCATOR ) - - impl_type * pi = std::allocator_traits<A2>::allocate( a2, 1 ); - pi_ = pi; - std::allocator_traits<A2>::construct( a2, pi, p, d, a ); - -#else - - pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + pi_ = a2.allocate( 1 ); ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); - -#endif } catch(...) { @@ -276,28 +266,11 @@ public: #else -#if !defined( BOOST_NO_CXX11_ALLOCATOR ) - - impl_type * pi = std::allocator_traits<A2>::allocate( a2, 1 ); - pi_ = pi; - -#else - - pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); - -#endif + pi_ = a2.allocate( 1 ); if( pi_ != 0 ) { -#if !defined( BOOST_NO_CXX11_ALLOCATOR ) - - std::allocator_traits<A2>::construct( a2, pi, p, d, a ); - -#else - ::new( static_cast< void* >( pi_ ) ) impl_type( p, d, a ); - -#endif } else { @@ -333,18 +306,8 @@ public: try { -#if !defined( BOOST_NO_CXX11_ALLOCATOR ) - - impl_type * pi = std::allocator_traits<A2>::allocate( a2, 1 ); - pi_ = pi; - std::allocator_traits<A2>::construct( a2, pi, p, a ); - -#else - - pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); + pi_ = a2.allocate( 1 ); ::new( static_cast< void* >( pi_ ) ) impl_type( p, a ); - -#endif } catch(...) { @@ -360,28 +323,11 @@ public: #else -#if !defined( BOOST_NO_CXX11_ALLOCATOR ) - - impl_type * pi = std::allocator_traits<A2>::allocate( a2, 1 ); - pi_ = pi; - -#else - - pi_ = a2.allocate( 1, static_cast< impl_type* >( 0 ) ); - -#endif + pi_ = a2.allocate( 1 ); if( pi_ != 0 ) { -#if !defined( BOOST_NO_CXX11_ALLOCATOR ) - - std::allocator_traits<A2>::construct( a2, pi, p, a ); - -#else - ::new( static_cast< void* >( pi_ ) ) impl_type( p, a ); - -#endif } else { |