|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86247 - in trunk/boost: mpl tuple type_traits
From: steveire_at_[hidden]
Date: 2013-10-11 19:19:44
Author: skelly
Date: 2013-10-11 19:19:44 EDT (Fri, 11 Oct 2013)
New Revision: 86247
URL: http://svn.boost.org/trac/boost/changeset/86247
Log:
Remove BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
Process #elif...#else...#endif blocks.
Text files modified:
trunk/boost/mpl/quote.hpp | 7 ---
trunk/boost/tuple/tuple.hpp | 19 -----------
trunk/boost/type_traits/is_array.hpp | 39 ------------------------
trunk/boost/type_traits/is_const.hpp | 63 ---------------------------------------
trunk/boost/type_traits/is_lvalue_reference.hpp | 46 ----------------------------
trunk/boost/type_traits/is_member_pointer.hpp | 53 ---------------------------------
trunk/boost/type_traits/is_pointer.hpp | 56 ----------------------------------
trunk/boost/type_traits/is_volatile.hpp | 63 ---------------------------------------
trunk/boost/type_traits/remove_pointer.hpp | 6 ---
9 files changed, 9 insertions(+), 343 deletions(-)
Modified: trunk/boost/mpl/quote.hpp
==============================================================================
--- trunk/boost/mpl/quote.hpp Fri Oct 11 19:19:17 2013 (r86246)
+++ trunk/boost/mpl/quote.hpp 2013-10-11 19:19:44 EDT (Fri, 11 Oct 2013) (r86247)
@@ -112,18 +112,13 @@
, aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value
>::type type;
};
-#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#else
: quote_impl<
F< BOOST_MPL_PP_PARAMS(i_, U) >
, aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value
>
{
};
-#else
- : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value >
- ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > >
- {
- };
#endif
};
Modified: trunk/boost/tuple/tuple.hpp
==============================================================================
--- trunk/boost/tuple/tuple.hpp Fri Oct 11 19:19:17 2013 (r86246)
+++ trunk/boost/tuple/tuple.hpp 2013-10-11 19:19:44 EDT (Fri, 11 Oct 2013) (r86247)
@@ -35,7 +35,7 @@
using tuples::tie;
#if !defined(BOOST_NO_USING_TEMPLATE)
using tuples::get;
-#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#else
//
// The "using tuples::get" statement causes the
// Borland compiler to ICE, use forwarding
@@ -58,24 +58,7 @@
get(const tuples::cons<HT, TT>& c) {
return tuples::get<N,HT,TT>(c);
}
-#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-//
-// MSVC, using declarations don't mix with templates well,
-// so use forwarding functions instead:
-//
-template<int N, typename Head, typename Tail>
-typename tuples::detail::element_ref<N, tuples::cons<Head, Tail> >::RET
-get(tuples::cons<Head, Tail>& t, tuples::detail::workaround_holder<N>* = 0)
-{
- return tuples::detail::get_class<N>::get(t);
-}
-template<int N, typename Head, typename Tail>
-typename tuples::detail::element_const_ref<N, tuples::cons<Head, Tail> >::RET
-get(const tuples::cons<Head, Tail>& t, tuples::detail::workaround_holder<N>* = 0)
-{
- return tuples::detail::get_class<N>::get(t);
-}
#endif // BOOST_NO_USING_TEMPLATE
} // end namespace boost
Modified: trunk/boost/type_traits/is_array.hpp
==============================================================================
--- trunk/boost/type_traits/is_array.hpp Fri Oct 11 19:19:17 2013 (r86246)
+++ trunk/boost/type_traits/is_array.hpp 2013-10-11 19:19:44 EDT (Fri, 11 Oct 2013) (r86247)
@@ -26,7 +26,7 @@
#if defined( __CODEGEARC__ )
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,__is_array(T))
-#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#else
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,false)
#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,is_array,T[N],true)
@@ -41,45 +41,8 @@
#endif
#endif
-#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
-namespace detail {
-
-using ::boost::type_traits::yes_type;
-using ::boost::type_traits::no_type;
-using ::boost::type_traits::wrap;
-
-template< typename T > T(* is_array_tester1(wrap<T>) )(wrap<T>);
-char BOOST_TT_DECL is_array_tester1(...);
-
-template< typename T> no_type is_array_tester2(T(*)(wrap<T>));
-yes_type BOOST_TT_DECL is_array_tester2(...);
-
-template< typename T >
-struct is_array_impl
-{
- BOOST_STATIC_CONSTANT(bool, value =
- sizeof(::boost::detail::is_array_tester2(
- ::boost::detail::is_array_tester1(
- ::boost::type_traits::wrap<T>()
- )
- )) == 1
- );
-};
-
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void const,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void volatile,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_array,void const volatile,false)
#endif
-} // namespace detail
-
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_array,T,::boost::detail::is_array_impl<T>::value)
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
} // namespace boost
#include <boost/type_traits/detail/bool_trait_undef.hpp>
Modified: trunk/boost/type_traits/is_const.hpp
==============================================================================
--- trunk/boost/type_traits/is_const.hpp Fri Oct 11 19:19:17 2013 (r86246)
+++ trunk/boost/type_traits/is_const.hpp 2013-10-11 19:19:44 EDT (Fri, 11 Oct 2013) (r86247)
@@ -41,7 +41,7 @@
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,__is_const(T))
-#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#else
namespace detail{
//
@@ -80,69 +80,8 @@
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_const,T& const volatile,false)
#endif
-#else
-
-namespace detail {
-
-using ::boost::type_traits::yes_type;
-using ::boost::type_traits::no_type;
-
-yes_type is_const_tester(const volatile void*);
-no_type is_const_tester(volatile void *);
-
-template <bool is_ref, bool array>
-struct is_const_helper
- : public ::boost::type_traits::false_result
-{
-};
-
-template <>
-struct is_const_helper<false,false>
-{
- template <typename T> struct result_
- {
- static T* t;
- BOOST_STATIC_CONSTANT(bool, value = (
- sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_const_tester(t))
- ));
- };
-};
-
-template <>
-struct is_const_helper<false,true>
-{
- template <typename T> struct result_
- {
- static T t;
- BOOST_STATIC_CONSTANT(bool, value = (
- sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_const_tester(&t))
- ));
- };
-};
-
-template <typename T>
-struct is_const_impl
- : public is_const_helper<
- is_reference<T>::value
- , is_array<T>::value
- >::template result_<T>
-{
-};
-
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void,false)
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void const,true)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void volatile,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_const,void const volatile,true)
#endif
-} // namespace detail
-
-//* is a type T declared const - is_const<T>
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_const,T,::boost::detail::is_const_impl<T>::value)
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
} // namespace boost
#include <boost/type_traits/detail/bool_trait_undef.hpp>
Modified: trunk/boost/type_traits/is_lvalue_reference.hpp
==============================================================================
--- trunk/boost/type_traits/is_lvalue_reference.hpp Fri Oct 11 19:19:17 2013 (r86246)
+++ trunk/boost/type_traits/is_lvalue_reference.hpp 2013-10-11 19:19:44 EDT (Fri, 11 Oct 2013) (r86247)
@@ -31,7 +31,7 @@
#if defined( __CODEGEARC__ )
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,__is_reference(T))
-#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#else
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,false)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T&,true)
@@ -46,52 +46,8 @@
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_lvalue_reference,T& const volatile,true)
#endif
-#else
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4181 4097)
-#endif
-
-namespace detail {
-
-using ::boost::type_traits::yes_type;
-using ::boost::type_traits::no_type;
-using ::boost::type_traits::wrap;
-
-template <class T> T&(* is_lvalue_reference_helper1(wrap<T>) )(wrap<T>);
-char is_lvalue_reference_helper1(...);
-
-template <class T> no_type is_lvalue_reference_helper2(T&(*)(wrap<T>));
-yes_type is_lvalue_reference_helper2(...);
-
-template <typename T>
-struct is_lvalue_reference_impl
-{
- BOOST_STATIC_CONSTANT(
- bool, value = sizeof(
- ::boost::detail::is_lvalue_reference_helper2(
- ::boost::detail::is_lvalue_reference_helper1(::boost::type_traits::wrap<T>()))) == 1
- );
-};
-
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void,false)
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void const,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void volatile,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_lvalue_reference,void const volatile,false)
#endif
-} // namespace detail
-
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_lvalue_reference,T,::boost::detail::is_lvalue_reference_impl<T>::value)
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
} // namespace boost
#include <boost/type_traits/detail/bool_trait_undef.hpp>
Modified: trunk/boost/type_traits/is_member_pointer.hpp
==============================================================================
--- trunk/boost/type_traits/is_member_pointer.hpp Fri Oct 11 19:19:17 2013 (r86246)
+++ trunk/boost/type_traits/is_member_pointer.hpp 2013-10-11 19:19:44 EDT (Fri, 11 Oct 2013) (r86247)
@@ -46,7 +46,7 @@
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,false)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true)
-#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#else
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::is_member_function_pointer<T>::value)
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true)
@@ -56,59 +56,8 @@
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*const volatile,true)
#endif
-#else // no partial template specialization
-
-namespace detail {
-
-template <typename R, typename T>
-::boost::type_traits::yes_type BOOST_TT_DECL is_member_pointer_tester(R T::*const volatile*);
-::boost::type_traits::no_type BOOST_TT_DECL is_member_pointer_tester(...);
-
-template <bool>
-struct is_member_pointer_select
- : public ::boost::type_traits::false_result
-{
-};
-
-template <>
-struct is_member_pointer_select<false>
-{
- template <typename T> struct result_
- {
- static T* make_t();
- BOOST_STATIC_CONSTANT(
- bool, value =
- (::boost::type_traits::ice_or<
- (1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(make_t()))),
- (1 == sizeof(is_member_pointer_tester(make_t())))
- >::value) );
- };
-};
-
-template <typename T>
-struct is_member_pointer_impl
- : public is_member_pointer_select<
- ::boost::type_traits::ice_or<
- ::boost::is_reference<T>::value
- , ::boost::is_array<T>::value
- >::value
- >::template result_<T>
-{
-};
-
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void,false)
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void const,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void volatile,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_member_pointer,void const volatile,false)
#endif
-} // namespace detail
-
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::detail::is_member_pointer_impl<T>::value)
-
-#endif // __BORLANDC__
-
} // namespace boost
#include <boost/type_traits/detail/bool_trait_undef.hpp>
Modified: trunk/boost/type_traits/is_pointer.hpp
==============================================================================
--- trunk/boost/type_traits/is_pointer.hpp Fri Oct 11 19:19:17 2013 (r86246)
+++ trunk/boost/type_traits/is_pointer.hpp 2013-10-11 19:19:44 EDT (Fri, 11 Oct 2013) (r86247)
@@ -35,7 +35,7 @@
#if defined( __CODEGEARC__ )
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,__is_pointer(T))
-#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#else
namespace detail {
@@ -79,62 +79,8 @@
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_pointer,T& const volatile,false)
#endif
-#else // no partial template specialization
-
-namespace detail {
-
-struct pointer_helper
-{
- pointer_helper(const volatile void*);
-};
-
-yes_type BOOST_TT_DECL is_pointer_tester(pointer_helper);
-no_type BOOST_TT_DECL is_pointer_tester(...);
-
-template <bool>
-struct is_pointer_select
- : public ::boost::type_traits::false_result
-{
-};
-
-template <>
-struct is_pointer_select<false>
-{
- template <typename T> struct result_
- {
- static T& make_t();
- BOOST_STATIC_CONSTANT(bool, value =
- (::boost::type_traits::ice_or<
- (1 == sizeof(is_pointer_tester(make_t()))),
- (1 == sizeof(type_traits::is_function_ptr_tester(make_t())))
- >::value));
- };
-};
-
-template <typename T>
-struct is_pointer_impl
- : public is_pointer_select<
- ::boost::type_traits::ice_or<
- ::boost::is_reference<T>::value
- , ::boost::is_array<T>::value
- >::value
- >::template result_<T>
-{
-};
-
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void,false)
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void const,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void volatile,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pointer,void const volatile,false)
#endif
-} // namespace detail
-
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pointer,T,::boost::detail::is_pointer_impl<T>::value)
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
} // namespace boost
#include <boost/type_traits/detail/bool_trait_undef.hpp>
Modified: trunk/boost/type_traits/is_volatile.hpp
==============================================================================
--- trunk/boost/type_traits/is_volatile.hpp Fri Oct 11 19:19:17 2013 (r86246)
+++ trunk/boost/type_traits/is_volatile.hpp 2013-10-11 19:19:44 EDT (Fri, 11 Oct 2013) (r86247)
@@ -59,7 +59,7 @@
#if defined( __CODEGEARC__ )
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,__is_volatile(T))
-#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#else
//* is a type T declared volatile - is_volatile<T>
BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_rval_filter<T>::value)
@@ -75,69 +75,8 @@
BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_1(typename T,is_volatile,T& const volatile,false)
#endif
-#else
-
-namespace detail {
-
-using ::boost::type_traits::yes_type;
-using ::boost::type_traits::no_type;
-
-yes_type is_volatile_tester(void const volatile*);
-no_type is_volatile_tester(void const*);
-
-template <bool is_ref, bool array>
-struct is_volatile_helper
- : public ::boost::type_traits::false_result
-{
-};
-
-template <>
-struct is_volatile_helper<false,false>
-{
- template <typename T> struct result_
- {
- static T* t;
- BOOST_STATIC_CONSTANT(bool, value = (
- sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_volatile_tester(t))
- ));
- };
-};
-
-template <>
-struct is_volatile_helper<false,true>
-{
- template <typename T> struct result_
- {
- static T t;
- BOOST_STATIC_CONSTANT(bool, value = (
- sizeof(boost::detail::yes_type) == sizeof(boost::detail::is_volatile_tester(&t))
- ));
- };
-};
-
-template <typename T>
-struct is_volatile_impl
- : public is_volatile_helper<
- is_reference<T>::value
- , is_array<T>::value
- >::template result_<T>
-{
-};
-
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void,false)
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void const,false)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void volatile,true)
-BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_volatile,void const volatile,true)
#endif
-} // namespace detail
-
-//* is a type T declared volatile - is_volatile<T>
-BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_volatile,T,::boost::detail::is_volatile_impl<T>::value)
-
-#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-
} // namespace boost
#include <boost/type_traits/detail/bool_trait_undef.hpp>
Modified: trunk/boost/type_traits/remove_pointer.hpp
==============================================================================
--- trunk/boost/type_traits/remove_pointer.hpp Fri Oct 11 19:19:17 2013 (r86246)
+++ trunk/boost/type_traits/remove_pointer.hpp 2013-10-11 19:19:44 EDT (Fri, 11 Oct 2013) (r86247)
@@ -66,7 +66,7 @@
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_imp2<T>::type)
-#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+#else
BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T*,T)
@@ -74,10 +74,6 @@
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* volatile,T)
BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const volatile,T)
-#else
-
-BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_impl<T>::type)
-
#endif
} // namespace boost
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk