forked from boostorg/smart_ptr
Use a private detail/sp_typeinfo header instead of the deprecated Core one
This commit is contained in:
@ -393,11 +393,11 @@ public:
|
||||
other.destroy(this);
|
||||
}
|
||||
|
||||
virtual void* get_deleter(const sp_typeinfo&) BOOST_SP_NOEXCEPT {
|
||||
virtual void* get_deleter(const sp_typeinfo_&) BOOST_SP_NOEXCEPT {
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void* get_local_deleter(const sp_typeinfo&) BOOST_SP_NOEXCEPT {
|
||||
virtual void* get_local_deleter(const sp_typeinfo_&) BOOST_SP_NOEXCEPT {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -499,12 +499,12 @@ public:
|
||||
return std::less<sp_counted_base *>()( a.pi_, b.pi_ );
|
||||
}
|
||||
|
||||
void * get_deleter( sp_typeinfo const & ti ) const BOOST_SP_NOEXCEPT
|
||||
void * get_deleter( sp_typeinfo_ const & ti ) const BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return pi_? pi_->get_deleter( ti ): 0;
|
||||
}
|
||||
|
||||
void * get_local_deleter( sp_typeinfo const & ti ) const BOOST_SP_NOEXCEPT
|
||||
void * get_local_deleter( sp_typeinfo_ const & ti ) const BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return pi_? pi_->get_local_deleter( ti ): 0;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
// Lock-free algorithm by Alexander Terekhov
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <machine/sys/inline.h>
|
||||
|
||||
@ -104,8 +104,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -20,7 +20,7 @@
|
||||
// formulation
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <builtins.h>
|
||||
#include <sys/atomic_op.h>
|
||||
@ -96,8 +96,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -15,7 +15,7 @@
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
@ -99,8 +99,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT = 0;
|
||||
virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT = 0;
|
||||
|
||||
void add_ref_copy() BOOST_SP_NOEXCEPT
|
||||
|
@ -24,7 +24,7 @@
|
||||
// formulation
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost
|
||||
@ -124,8 +124,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -25,7 +25,7 @@
|
||||
// formulation
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost
|
||||
@ -112,8 +112,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -16,7 +16,7 @@
|
||||
// Lock-free algorithm by Alexander Terekhov
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost
|
||||
@ -111,8 +111,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -20,7 +20,7 @@
|
||||
// Lock-free algorithm by Alexander Terekhov
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost
|
||||
@ -141,8 +141,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -24,7 +24,7 @@
|
||||
// formulation
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost
|
||||
@ -135,8 +135,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -19,7 +19,7 @@
|
||||
//
|
||||
// Thanks to Michael van der Westhuizen
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <inttypes.h> // int32_t
|
||||
|
||||
@ -120,8 +120,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -24,7 +24,7 @@
|
||||
// formulation
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost
|
||||
@ -127,8 +127,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -18,7 +18,7 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
@ -61,8 +61,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT = 0;
|
||||
virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT = 0;
|
||||
|
||||
void add_ref_copy() BOOST_SP_NOEXCEPT
|
||||
|
@ -18,7 +18,7 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
@ -72,8 +72,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -19,7 +19,7 @@
|
||||
//
|
||||
// Thanks to Michael van der Westhuizen
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <inttypes.h> // uint32_t
|
||||
|
||||
@ -115,8 +115,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -20,7 +20,7 @@
|
||||
// formulation
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <atomic.h>
|
||||
|
||||
@ -62,8 +62,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -18,7 +18,7 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/smart_ptr/detail/spinlock_pool.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
@ -84,8 +84,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -15,7 +15,7 @@
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_noexcept.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <atomic>
|
||||
@ -91,8 +91,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT = 0;
|
||||
virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT = 0;
|
||||
|
||||
void add_ref_copy() BOOST_SP_NOEXCEPT
|
||||
|
@ -15,7 +15,7 @@
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <limits.h>
|
||||
|
||||
@ -109,8 +109,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -21,7 +21,7 @@
|
||||
// formulation
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
extern "builtin" void __lwsync(void);
|
||||
@ -104,8 +104,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -25,8 +25,8 @@
|
||||
//
|
||||
|
||||
#include <boost/smart_ptr/detail/sp_interlocked.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
namespace boost
|
||||
@ -67,8 +67,8 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
|
||||
virtual void * get_untyped_deleter() = 0;
|
||||
|
||||
void add_ref_copy()
|
||||
|
@ -93,12 +93,12 @@ public:
|
||||
boost::checked_delete( px_ );
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ) BOOST_SP_NOEXCEPT
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ) BOOST_SP_NOEXCEPT
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@ -173,14 +173,14 @@ public:
|
||||
del( ptr );
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast<char&>( del ): 0;
|
||||
return ti == BOOST_SP_TYPEID_(D)? &reinterpret_cast<char&>( del ): 0;
|
||||
}
|
||||
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return ti == BOOST_SP_TYPEID(D)? boost::detail::get_local_deleter( boost::addressof( del ) ): 0;
|
||||
return ti == BOOST_SP_TYPEID_(D)? boost::detail::get_local_deleter( boost::addressof( del ) ): 0;
|
||||
}
|
||||
|
||||
virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT
|
||||
@ -266,14 +266,14 @@ public:
|
||||
a2.deallocate( this, 1 );
|
||||
}
|
||||
|
||||
virtual void * get_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT
|
||||
virtual void * get_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast<char&>( d_ ): 0;
|
||||
return ti == BOOST_SP_TYPEID_( D )? &reinterpret_cast<char&>( d_ ): 0;
|
||||
}
|
||||
|
||||
virtual void * get_local_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT
|
||||
virtual void * get_local_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return ti == BOOST_SP_TYPEID(D)? boost::detail::get_local_deleter( boost::addressof( d_ ) ): 0;
|
||||
return ti == BOOST_SP_TYPEID_( D )? boost::detail::get_local_deleter( boost::addressof( d_ ) ): 0;
|
||||
}
|
||||
|
||||
virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT
|
||||
|
34
include/boost/smart_ptr/detail/sp_typeinfo_.hpp
Normal file
34
include/boost/smart_ptr/detail/sp_typeinfo_.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
#ifndef BOOST_SMART_PTR_DETAIL_SP_TYPEINFO_HPP_INCLUDED
|
||||
#define BOOST_SMART_PTR_DETAIL_SP_TYPEINFO_HPP_INCLUDED
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
// smart_ptr/detail/sp_typeinfo_.hpp
|
||||
//
|
||||
// Copyright 2007, 2019 Peter Dimov
|
||||
//
|
||||
// Distributed under 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)
|
||||
|
||||
#include <boost/core/typeinfo.hpp>
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace detail
|
||||
{
|
||||
|
||||
typedef boost::core::typeinfo sp_typeinfo_;
|
||||
|
||||
} // namespace detail
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#define BOOST_SP_TYPEID_(T) BOOST_CORE_TYPEID(T)
|
||||
|
||||
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_TYPEINFO_HPP_INCLUDED
|
@ -225,7 +225,7 @@ public:
|
||||
pn.swap(other.pn);
|
||||
}
|
||||
|
||||
void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_SP_NOEXCEPT
|
||||
void * _internal_get_deleter( boost::detail::sp_typeinfo_ const & ti ) const BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return pn.get_deleter( ti );
|
||||
}
|
||||
@ -285,7 +285,7 @@ template<class T> void swap(shared_array<T> & a, shared_array<T> & b) BOOST_SP_N
|
||||
|
||||
template< class D, class T > D * get_deleter( shared_array<T> const & p ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return static_cast< D * >( p._internal_get_deleter( BOOST_SP_TYPEID(D) ) );
|
||||
return static_cast< D * >( p._internal_get_deleter( BOOST_SP_TYPEID_(D) ) );
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
@ -777,12 +777,12 @@ public:
|
||||
return pn < rhs.pn;
|
||||
}
|
||||
|
||||
void * _internal_get_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_SP_NOEXCEPT
|
||||
void * _internal_get_deleter( boost::detail::sp_typeinfo_ const & ti ) const BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return pn.get_deleter( ti );
|
||||
}
|
||||
|
||||
void * _internal_get_local_deleter( boost::detail::sp_typeinfo const & ti ) const BOOST_SP_NOEXCEPT
|
||||
void * _internal_get_local_deleter( boost::detail::sp_typeinfo_ const & ti ) const BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return pn.get_local_deleter( ti );
|
||||
}
|
||||
@ -1008,7 +1008,7 @@ namespace detail
|
||||
|
||||
template<class D, class T> D * basic_get_deleter( shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return static_cast<D *>( p._internal_get_deleter(BOOST_SP_TYPEID(D)) );
|
||||
return static_cast<D *>( p._internal_get_deleter(BOOST_SP_TYPEID_(D)) );
|
||||
}
|
||||
|
||||
template<class D, class T> D * basic_get_local_deleter( D *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT;
|
||||
@ -1165,12 +1165,12 @@ namespace detail
|
||||
|
||||
template<class D, class T> D * basic_get_local_deleter( D *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return static_cast<D *>( p._internal_get_local_deleter( BOOST_SP_TYPEID(local_sp_deleter<D>) ) );
|
||||
return static_cast<D *>( p._internal_get_local_deleter( BOOST_SP_TYPEID_(local_sp_deleter<D>) ) );
|
||||
}
|
||||
|
||||
template<class D, class T> D const * basic_get_local_deleter( D const *, shared_ptr<T> const & p ) BOOST_SP_NOEXCEPT
|
||||
{
|
||||
return static_cast<D *>( p._internal_get_local_deleter( BOOST_SP_TYPEID(local_sp_deleter<D>) ) );
|
||||
return static_cast<D *>( p._internal_get_local_deleter( BOOST_SP_TYPEID_(local_sp_deleter<D>) ) );
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
@ -8,19 +8,19 @@
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
//
|
||||
|
||||
#include <boost/detail/sp_typeinfo.hpp>
|
||||
#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
|
||||
#include <boost/detail/lightweight_test.hpp>
|
||||
#include <iostream>
|
||||
|
||||
int main()
|
||||
{
|
||||
BOOST_TEST( BOOST_SP_TYPEID( int ) == BOOST_SP_TYPEID( int ) );
|
||||
BOOST_TEST( BOOST_SP_TYPEID( int ) != BOOST_SP_TYPEID( long ) );
|
||||
BOOST_TEST( BOOST_SP_TYPEID( int ) != BOOST_SP_TYPEID( void ) );
|
||||
BOOST_TEST( BOOST_SP_TYPEID_( int ) == BOOST_SP_TYPEID_( int ) );
|
||||
BOOST_TEST( BOOST_SP_TYPEID_( int ) != BOOST_SP_TYPEID_( long ) );
|
||||
BOOST_TEST( BOOST_SP_TYPEID_( int ) != BOOST_SP_TYPEID_( void ) );
|
||||
|
||||
boost::detail::sp_typeinfo const & ti = BOOST_SP_TYPEID( int );
|
||||
boost::detail::sp_typeinfo_ const & ti = BOOST_SP_TYPEID_( int );
|
||||
|
||||
boost::detail::sp_typeinfo const * pti = &BOOST_SP_TYPEID( int );
|
||||
boost::detail::sp_typeinfo_ const * pti = &BOOST_SP_TYPEID_( int );
|
||||
BOOST_TEST( *pti == ti );
|
||||
|
||||
BOOST_TEST( ti == ti );
|
||||
@ -30,9 +30,9 @@ int main()
|
||||
char const * nti = ti.name();
|
||||
std::cout << nti << std::endl;
|
||||
|
||||
boost::detail::sp_typeinfo const & tv = BOOST_SP_TYPEID( void );
|
||||
boost::detail::sp_typeinfo_ const & tv = BOOST_SP_TYPEID_( void );
|
||||
|
||||
boost::detail::sp_typeinfo const * ptv = &BOOST_SP_TYPEID( void );
|
||||
boost::detail::sp_typeinfo_ const * ptv = &BOOST_SP_TYPEID_( void );
|
||||
BOOST_TEST( *ptv == tv );
|
||||
|
||||
BOOST_TEST( tv == tv );
|
||||
|
Reference in New Issue
Block a user