forked from boostorg/smart_ptr
Remove uses of BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
This commit is contained in:
@@ -12,10 +12,7 @@
|
||||
// See http://www.boost.org/libs/smart_ptr/ for documentation.
|
||||
|
||||
#include <boost/smart_ptr/make_shared_object.hpp>
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_NO_SFINAE )
|
||||
# include <boost/smart_ptr/make_shared_array.hpp>
|
||||
# include <boost/smart_ptr/allocate_shared_array.hpp>
|
||||
#endif
|
||||
#include <boost/smart_ptr/make_shared_array.hpp>
|
||||
#include <boost/smart_ptr/allocate_shared_array.hpp>
|
||||
|
||||
#endif // #ifndef BOOST_SMART_PTR_MAKE_SHARED_HPP_INCLUDED
|
||||
|
@@ -181,8 +181,6 @@ template< class T > struct sp_if_not_array
|
||||
typedef boost::shared_ptr< T > type;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template< class T > struct sp_if_not_array< T[] >
|
||||
{
|
||||
};
|
||||
@@ -191,8 +189,6 @@ template< class T, std::size_t N > struct sp_if_not_array< T[N] >
|
||||
{
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
} // namespace detail
|
||||
|
||||
#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )
|
||||
|
@@ -66,8 +66,6 @@ template< class T > struct sp_element
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template< class T > struct sp_element< T[] >
|
||||
{
|
||||
typedef T type;
|
||||
@@ -78,8 +76,6 @@ template< class T, std::size_t N > struct sp_element< T[N] >
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
// sp_dereference, return type of operator*
|
||||
|
||||
template< class T > struct sp_dereference
|
||||
@@ -107,8 +103,6 @@ template<> struct sp_dereference< void const volatile >
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template< class T > struct sp_dereference< T[] >
|
||||
{
|
||||
typedef void type;
|
||||
@@ -119,8 +113,6 @@ template< class T, std::size_t N > struct sp_dereference< T[N] >
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
// sp_member_access, return type of operator->
|
||||
|
||||
template< class T > struct sp_member_access
|
||||
@@ -128,8 +120,6 @@ template< class T > struct sp_member_access
|
||||
typedef T * type;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template< class T > struct sp_member_access< T[] >
|
||||
{
|
||||
typedef void type;
|
||||
@@ -140,8 +130,6 @@ template< class T, std::size_t N > struct sp_member_access< T[N] >
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
// sp_array_access, return type of operator[]
|
||||
|
||||
template< class T > struct sp_array_access
|
||||
@@ -149,8 +137,6 @@ template< class T > struct sp_array_access
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template< class T > struct sp_array_access< T[] >
|
||||
{
|
||||
typedef T & type;
|
||||
@@ -161,8 +147,6 @@ template< class T, std::size_t N > struct sp_array_access< T[N] >
|
||||
typedef T & type;
|
||||
};
|
||||
|
||||
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
// sp_extent, for operator[] index check
|
||||
|
||||
template< class T > struct sp_extent
|
||||
@@ -170,15 +154,11 @@ template< class T > struct sp_extent
|
||||
enum _vt { value = 0 };
|
||||
};
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template< class T, std::size_t N > struct sp_extent< T[N] >
|
||||
{
|
||||
enum _vt { value = N };
|
||||
};
|
||||
|
||||
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
// enable_shared_from_this support
|
||||
|
||||
template< class X, class Y, class T > inline void sp_enable_shared_from_this( boost::shared_ptr<X> const * ppx, Y const * py, boost::enable_shared_from_this< T > const * pe )
|
||||
@@ -253,8 +233,6 @@ template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr
|
||||
boost::detail::sp_enable_shared_from_this( ppx, p, p );
|
||||
}
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template< class T, class Y > inline void sp_pointer_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * p, boost::detail::shared_count & pn )
|
||||
{
|
||||
sp_assert_convertible< Y[], T[] >();
|
||||
@@ -267,8 +245,6 @@ template< class T, std::size_t N, class Y > inline void sp_pointer_construct( bo
|
||||
boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn );
|
||||
}
|
||||
|
||||
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
// deleter constructor helper
|
||||
|
||||
template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p )
|
||||
@@ -276,8 +252,6 @@ template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr
|
||||
boost::detail::sp_enable_shared_from_this( ppx, p, p );
|
||||
}
|
||||
|
||||
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * /*p*/ )
|
||||
{
|
||||
sp_assert_convertible< Y[], T[] >();
|
||||
@@ -288,8 +262,6 @@ template< class T, std::size_t N, class Y > inline void sp_deleter_construct( bo
|
||||
sp_assert_convertible< Y[N], T[N] >();
|
||||
}
|
||||
|
||||
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
|
||||
|
||||
struct sp_internal_constructor_tag
|
||||
{
|
||||
};
|
||||
|
Reference in New Issue
Block a user