Remove uses of BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION

This commit is contained in:
Peter Dimov
2024-09-24 18:41:46 +03:00
parent 4a3432759d
commit c132c339c7
3 changed files with 2 additions and 37 deletions

View File

@@ -12,10 +12,7 @@
// See http://www.boost.org/libs/smart_ptr/ for documentation. // See http://www.boost.org/libs/smart_ptr/ for documentation.
#include <boost/smart_ptr/make_shared_object.hpp> #include <boost/smart_ptr/make_shared_object.hpp>
#include <boost/smart_ptr/make_shared_array.hpp>
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) && !defined( BOOST_NO_SFINAE ) #include <boost/smart_ptr/allocate_shared_array.hpp>
# include <boost/smart_ptr/make_shared_array.hpp>
# include <boost/smart_ptr/allocate_shared_array.hpp>
#endif
#endif // #ifndef BOOST_SMART_PTR_MAKE_SHARED_HPP_INCLUDED #endif // #ifndef BOOST_SMART_PTR_MAKE_SHARED_HPP_INCLUDED

View File

@@ -181,8 +181,6 @@ template< class T > struct sp_if_not_array
typedef boost::shared_ptr< T > type; typedef boost::shared_ptr< T > type;
}; };
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template< class T > struct sp_if_not_array< T[] > 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 } // namespace detail
#if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING ) #if !defined( BOOST_NO_FUNCTION_TEMPLATE_ORDERING )

View File

@@ -66,8 +66,6 @@ template< class T > struct sp_element
typedef T type; typedef T type;
}; };
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template< class T > struct sp_element< T[] > template< class T > struct sp_element< T[] >
{ {
typedef T type; typedef T type;
@@ -78,8 +76,6 @@ template< class T, std::size_t N > struct sp_element< T[N] >
typedef T type; typedef T type;
}; };
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
// sp_dereference, return type of operator* // sp_dereference, return type of operator*
template< class T > struct sp_dereference template< class T > struct sp_dereference
@@ -107,8 +103,6 @@ template<> struct sp_dereference< void const volatile >
typedef void type; typedef void type;
}; };
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template< class T > struct sp_dereference< T[] > template< class T > struct sp_dereference< T[] >
{ {
typedef void type; typedef void type;
@@ -119,8 +113,6 @@ template< class T, std::size_t N > struct sp_dereference< T[N] >
typedef void type; typedef void type;
}; };
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
// sp_member_access, return type of operator-> // sp_member_access, return type of operator->
template< class T > struct sp_member_access template< class T > struct sp_member_access
@@ -128,8 +120,6 @@ template< class T > struct sp_member_access
typedef T * type; typedef T * type;
}; };
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template< class T > struct sp_member_access< T[] > template< class T > struct sp_member_access< T[] >
{ {
typedef void type; typedef void type;
@@ -140,8 +130,6 @@ template< class T, std::size_t N > struct sp_member_access< T[N] >
typedef void type; typedef void type;
}; };
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
// sp_array_access, return type of operator[] // sp_array_access, return type of operator[]
template< class T > struct sp_array_access template< class T > struct sp_array_access
@@ -149,8 +137,6 @@ template< class T > struct sp_array_access
typedef void type; typedef void type;
}; };
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template< class T > struct sp_array_access< T[] > template< class T > struct sp_array_access< T[] >
{ {
typedef T & type; typedef T & type;
@@ -161,8 +147,6 @@ template< class T, std::size_t N > struct sp_array_access< T[N] >
typedef T & type; typedef T & type;
}; };
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
// sp_extent, for operator[] index check // sp_extent, for operator[] index check
template< class T > struct sp_extent template< class T > struct sp_extent
@@ -170,15 +154,11 @@ template< class T > struct sp_extent
enum _vt { value = 0 }; enum _vt { value = 0 };
}; };
#if !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
template< class T, std::size_t N > struct sp_extent< T[N] > template< class T, std::size_t N > struct sp_extent< T[N] >
{ {
enum _vt { value = N }; enum _vt { value = N };
}; };
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
// enable_shared_from_this support // 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 ) 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 ); 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 ) 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[] >(); 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 ); boost::detail::shared_count( p, boost::checked_array_deleter< T >() ).swap( pn );
} }
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
// deleter constructor helper // deleter constructor helper
template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T > * ppx, Y * p ) 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 ); 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*/ ) template< class T, class Y > inline void sp_deleter_construct( boost::shared_ptr< T[] > * /*ppx*/, Y * /*p*/ )
{ {
sp_assert_convertible< Y[], T[] >(); 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] >(); sp_assert_convertible< Y[N], T[N] >();
} }
#endif // !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
struct sp_internal_constructor_tag struct sp_internal_constructor_tag
{ {
}; };