From 81918230c65f466f722bce0094e396eb9f162649 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 25 Sep 2013 21:15:34 +0000 Subject: [PATCH] TypeTraits: Remove obsolete MSVC version checks. [SVN r85919] --- include/boost/type_traits/config.hpp | 1 - .../type_traits/detail/bool_trait_def.hpp | 8 - include/boost/type_traits/extent.hpp | 4 - .../boost/type_traits/integral_constant.hpp | 14 -- .../boost/type_traits/integral_promotion.hpp | 3 +- include/boost/type_traits/is_convertible.hpp | 39 +--- include/boost/type_traits/is_enum.hpp | 5 +- include/boost/type_traits/is_integral.hpp | 3 +- include/boost/type_traits/is_pointer.hpp | 13 -- include/boost/type_traits/is_signed.hpp | 4 - include/boost/type_traits/make_signed.hpp | 2 - include/boost/type_traits/make_unsigned.hpp | 2 - .../type_traits/msvc/remove_all_extents.hpp | 47 ----- .../boost/type_traits/msvc/remove_bounds.hpp | 43 ---- .../boost/type_traits/msvc/remove_const.hpp | 143 ------------- include/boost/type_traits/msvc/remove_cv.hpp | 190 ------------------ .../boost/type_traits/msvc/remove_extent.hpp | 43 ---- .../boost/type_traits/msvc/remove_pointer.hpp | 42 ---- .../type_traits/msvc/remove_reference.hpp | 42 ---- .../type_traits/msvc/remove_volatile.hpp | 143 ------------- include/boost/type_traits/msvc/typeof.hpp | 50 ----- .../boost/type_traits/remove_all_extents.hpp | 8 - include/boost/type_traits/remove_bounds.hpp | 8 - include/boost/type_traits/remove_const.hpp | 6 +- include/boost/type_traits/remove_cv.hpp | 6 +- include/boost/type_traits/remove_extent.hpp | 8 - include/boost/type_traits/remove_pointer.hpp | 6 +- .../boost/type_traits/remove_reference.hpp | 6 +- include/boost/type_traits/remove_volatile.hpp | 6 +- .../boost/type_traits/type_with_alignment.hpp | 2 +- 30 files changed, 12 insertions(+), 885 deletions(-) mode change 100755 => 100644 include/boost/type_traits/integral_constant.hpp delete mode 100644 include/boost/type_traits/msvc/remove_all_extents.hpp delete mode 100644 include/boost/type_traits/msvc/remove_bounds.hpp delete mode 100644 include/boost/type_traits/msvc/remove_const.hpp delete mode 100644 include/boost/type_traits/msvc/remove_cv.hpp delete mode 100644 include/boost/type_traits/msvc/remove_extent.hpp delete mode 100644 include/boost/type_traits/msvc/remove_pointer.hpp delete mode 100644 include/boost/type_traits/msvc/remove_reference.hpp delete mode 100644 include/boost/type_traits/msvc/remove_volatile.hpp delete mode 100644 include/boost/type_traits/msvc/typeof.hpp diff --git a/include/boost/type_traits/config.hpp b/include/boost/type_traits/config.hpp index 7934454..b9f4ecc 100644 --- a/include/boost/type_traits/config.hpp +++ b/include/boost/type_traits/config.hpp @@ -27,7 +27,6 @@ #endif # if (BOOST_WORKAROUND(__MWERKS__, < 0x3000) \ - || BOOST_WORKAROUND(BOOST_MSVC, <= 1301) \ || !defined(__EDG_VERSION__) && BOOST_WORKAROUND(__GNUC__, < 3) \ || BOOST_WORKAROUND(__IBMCPP__, < 600 ) \ || BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) \ diff --git a/include/boost/type_traits/detail/bool_trait_def.hpp b/include/boost/type_traits/detail/bool_trait_def.hpp index 8cbccfa..69e4f1c 100644 --- a/include/boost/type_traits/detail/bool_trait_def.hpp +++ b/include/boost/type_traits/detail/bool_trait_def.hpp @@ -45,14 +45,6 @@ enum { value = type::value }; \ /**/ # define BOOST_TT_AUX_BOOL_C_BASE(C) - -#elif defined(BOOST_MSVC) && BOOST_MSVC < 1300 - -# define BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ - typedef ::boost::integral_constant base_; \ - using base_::value; \ - /**/ - #endif #ifndef BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL diff --git a/include/boost/type_traits/extent.hpp b/include/boost/type_traits/extent.hpp index 27e8a67..16d7b16 100644 --- a/include/boost/type_traits/extent.hpp +++ b/include/boost/type_traits/extent.hpp @@ -131,10 +131,6 @@ template struct extent : public ::boost::integral_constant::value> { -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - typedef ::boost::integral_constant::value> base_; - using base_::value; -#endif BOOST_MPL_AUX_LAMBDA_SUPPORT(1,extent,(T)) }; diff --git a/include/boost/type_traits/integral_constant.hpp b/include/boost/type_traits/integral_constant.hpp old mode 100755 new mode 100644 index 4ed1bb0..c684771 --- a/include/boost/type_traits/integral_constant.hpp +++ b/include/boost/type_traits/integral_constant.hpp @@ -24,24 +24,10 @@ struct integral_constant : public mpl::integral_c template<> struct integral_constant : public mpl::true_ { -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -# pragma warning(push) -# pragma warning(disable:4097) - typedef mpl::true_ base_; - using base_::value; -# pragma warning(pop) -#endif typedef integral_constant type; }; template<> struct integral_constant : public mpl::false_ { -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) -# pragma warning(push) -# pragma warning(disable:4097) - typedef mpl::false_ base_; - using base_::value; -# pragma warning(pop) -#endif typedef integral_constant type; }; diff --git a/include/boost/type_traits/integral_promotion.hpp b/include/boost/type_traits/integral_promotion.hpp index 2109b9c..9c5514b 100644 --- a/include/boost/type_traits/integral_promotion.hpp +++ b/include/boost/type_traits/integral_promotion.hpp @@ -43,8 +43,7 @@ template<> struct need_promotion : public true_type {}; // Same set of integral types as in boost/type_traits/is_integral.hpp. // Please, keep in sync. -#if (defined(BOOST_MSVC) && (BOOST_MSVC < 1300)) \ - || (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ +#if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300)) // TODO: common macro for this #if. Or better yet, PP SEQ of non-standard types. BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(__int8 ) diff --git a/include/boost/type_traits/is_convertible.hpp b/include/boost/type_traits/is_convertible.hpp index 3eccadc..4ce048b 100644 --- a/include/boost/type_traits/is_convertible.hpp +++ b/include/boost/type_traits/is_convertible.hpp @@ -52,44 +52,7 @@ namespace boost { namespace detail { -// MS specific version: - -#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) - -// This workaround is necessary to handle when From is void -// which is normally taken care of by the partial specialization -// of the is_convertible typename. -using ::boost::type_traits::yes_type; -using ::boost::type_traits::no_type; - -template< typename From > -struct does_conversion_exist -{ - template< typename To > struct result_ - { - static no_type BOOST_TT_DECL _m_check(...); - static yes_type BOOST_TT_DECL _m_check(To); - static typename add_lvalue_reference::type _m_from; - enum { value = sizeof( _m_check(_m_from) ) == sizeof(yes_type) }; - }; -}; - -template<> -struct does_conversion_exist -{ - template< typename To > struct result_ - { - enum { value = ::boost::is_void::value }; - }; -}; - -template -struct is_convertible_basic_impl - : public does_conversion_exist::template result_ -{ -}; - -#elif defined(__BORLANDC__) && (__BORLANDC__ < 0x560) +#if defined(__BORLANDC__) && (__BORLANDC__ < 0x560) // // special version for Borland compilers // this version breaks when used for some diff --git a/include/boost/type_traits/is_enum.hpp b/include/boost/type_traits/is_enum.hpp index e35548c..7929c96 100644 --- a/include/boost/type_traits/is_enum.hpp +++ b/include/boost/type_traits/is_enum.hpp @@ -55,13 +55,12 @@ struct is_class_or_union template struct is_class_or_union { -# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))// we simply can't detect it this way. +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))// we simply can't detect it this way. BOOST_STATIC_CONSTANT(bool, value = false); # else template static ::boost::type_traits::yes_type is_class_or_union_tester(void(U::*)(void)); -# if BOOST_WORKAROUND(BOOST_MSVC, == 1300) \ - || BOOST_WORKAROUND(__MWERKS__, <= 0x3000) // no SFINAE +# if BOOST_WORKAROUND(__MWERKS__, <= 0x3000) // no SFINAE static ::boost::type_traits::no_type is_class_or_union_tester(...); BOOST_STATIC_CONSTANT( bool, value = sizeof(is_class_or_union_tester(0)) == sizeof(::boost::type_traits::yes_type)); diff --git a/include/boost/type_traits/is_integral.hpp b/include/boost/type_traits/is_integral.hpp index 1ab27fd..6bfad49 100644 --- a/include/boost/type_traits/is_integral.hpp +++ b/include/boost/type_traits/is_integral.hpp @@ -46,8 +46,7 @@ BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,wchar_t,true) // Same set of integral types as in boost/type_traits/integral_promotion.hpp. // Please, keep in sync. -- Alexander Nasonov -#if (defined(BOOST_MSVC) && (BOOST_MSVC < 1300)) \ - || (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ +#if (defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 600)) \ || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300)) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,unsigned __int8,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,__int8,true) diff --git a/include/boost/type_traits/is_pointer.hpp b/include/boost/type_traits/is_pointer.hpp index 4e29bb3..973f2de 100644 --- a/include/boost/type_traits/is_pointer.hpp +++ b/include/boost/type_traits/is_pointer.hpp @@ -25,9 +25,7 @@ #include #include #include -#if !BOOST_WORKAROUND(BOOST_MSVC,<=1300) #include -#endif #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include @@ -67,16 +65,6 @@ TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T*,true) template< typename T > struct is_pointer_impl { -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_and< - ::boost::detail::is_pointer_helper::value - , ::boost::type_traits::ice_not< - ::boost::is_member_pointer::value - >::value - >::value) - ); -#else BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::detail::is_pointer_helper::type>::value @@ -85,7 +73,6 @@ struct is_pointer_impl >::value >::value) ); -#endif }; } // namespace detail diff --git a/include/boost/type_traits/is_signed.hpp b/include/boost/type_traits/is_signed.hpp index ba7d6e9..5673284 100644 --- a/include/boost/type_traits/is_signed.hpp +++ b/include/boost/type_traits/is_signed.hpp @@ -76,11 +76,7 @@ struct is_signed_imp > selector; typedef typename selector::template rebind binder; typedef typename binder::type type; -#if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) - BOOST_STATIC_CONSTANT(bool, value = is_signed_imp::type::value); -#else BOOST_STATIC_CONSTANT(bool, value = type::value); -#endif }; #else diff --git a/include/boost/type_traits/make_signed.hpp b/include/boost/type_traits/make_signed.hpp index 7deb855..51cdbb0 100644 --- a/include/boost/type_traits/make_signed.hpp +++ b/include/boost/type_traits/make_signed.hpp @@ -37,11 +37,9 @@ struct make_signed_imp { BOOST_STATIC_ASSERT( (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)); -#if !BOOST_WORKAROUND(BOOST_MSVC, <=1300) BOOST_STATIC_ASSERT( (::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value)); -#endif typedef typename remove_cv::type t_no_cv; typedef typename mpl::if_c< diff --git a/include/boost/type_traits/make_unsigned.hpp b/include/boost/type_traits/make_unsigned.hpp index 7e2fcdc..239153a 100644 --- a/include/boost/type_traits/make_unsigned.hpp +++ b/include/boost/type_traits/make_unsigned.hpp @@ -37,11 +37,9 @@ struct make_unsigned_imp { BOOST_STATIC_ASSERT( (::boost::type_traits::ice_or< ::boost::is_integral::value, ::boost::is_enum::value>::value)); -#if !BOOST_WORKAROUND(BOOST_MSVC, <=1300) BOOST_STATIC_ASSERT( (::boost::type_traits::ice_not< ::boost::is_same< typename remove_cv::type, bool>::value>::value)); -#endif typedef typename remove_cv::type t_no_cv; typedef typename mpl::if_c< diff --git a/include/boost/type_traits/msvc/remove_all_extents.hpp b/include/boost/type_traits/msvc/remove_all_extents.hpp deleted file mode 100644 index 25c0edf..0000000 --- a/include/boost/type_traits/msvc/remove_all_extents.hpp +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_ALL_EXTENT_HOLT_2004_0827 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_ALL_EXTENT_HOLT_2004_0827 - -#include -#include - -namespace boost { - template - struct remove_all_extents; - - namespace detail { - template - struct remove_all_extents_impl_typeof { - template - struct inner { - typedef T type; - }; - }; - template<> - struct remove_all_extents_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U[]); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( *((T*)NULL) ) )); - typedef typename msvc_extract_type::id2type::type reduced_type; - typedef typename remove_all_extents::type type; - }; - }; - } //namespace detail - - template - struct remove_all_extents { - typedef typename boost::detail::remove_all_extents_impl_typeof< - boost::is_array::value - >::template inner >::type type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_all_extents,T) - }; -} //namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 - diff --git a/include/boost/type_traits/msvc/remove_bounds.hpp b/include/boost/type_traits/msvc/remove_bounds.hpp deleted file mode 100644 index 4b23b35..0000000 --- a/include/boost/type_traits/msvc/remove_bounds.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 - -#include -#include - -namespace boost { - namespace detail { - template - struct remove_bounds_impl_typeof { - template - struct inner { - typedef T type; - }; - }; - template<> - struct remove_bounds_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U[]); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( *((T*)NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - }; - } //namespace detail - - template - struct remove_bounds { - typedef typename boost::detail::remove_bounds_impl_typeof< - boost::is_array::value - >::template inner >::type type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_bounds,T) - }; -} //namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 - diff --git a/include/boost/type_traits/msvc/remove_const.hpp b/include/boost/type_traits/msvc/remove_const.hpp deleted file mode 100644 index d370754..0000000 --- a/include/boost/type_traits/msvc/remove_const.hpp +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_CONST_HOLT_2004_0828 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_CONST_HOLT_2004_0828 - -#include -#include -#include -#include -#include - -namespace boost { - namespace detail { - template - struct remove_const_impl_typeof { - template - struct inner { - typedef T type; - }; - template - struct transform_type { - typedef T type; - }; - }; - template<> //Const - struct remove_const_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U const&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //CV - struct remove_const_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U const volatile&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //Const Pointer - struct remove_const_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U const[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //CV Pointer - struct remove_const_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U const volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //Const Array - struct remove_const_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U const[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - - template<> //CV Array - struct remove_const_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U const volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - - } //namespace detail - - template - struct remove_const { - typedef boost::detail::remove_const_impl_typeof< - boost::is_pointer::value, - boost::is_array::value, - boost::is_const::value, - boost::is_volatile::value - > remove_const_type; - typedef typename - remove_const_type::template inner< - typename remove_const_type::template transform_type::type, - remove_const - >::type - type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_const,T) - }; -}//namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_CONST_HOLT_2004_0828 diff --git a/include/boost/type_traits/msvc/remove_cv.hpp b/include/boost/type_traits/msvc/remove_cv.hpp deleted file mode 100644 index 9fbf8b8..0000000 --- a/include/boost/type_traits/msvc/remove_cv.hpp +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_CV_HOLT_2004_0901 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_CV_HOLT_2004_0901 - -#include -#include -#include -#include -#include - -namespace boost { - namespace detail { - template - struct remove_cv_impl_typeof { - template - struct inner { - typedef T type; - }; - template - struct transform_type { - typedef T type; - }; - }; - template<> //Volatile - struct remove_cv_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U volatile&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //Const - struct remove_cv_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U const&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //CV - struct remove_cv_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U const volatile&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //Volatile Pointer - struct remove_cv_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //Const Pointer - struct remove_cv_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U const[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //CV Pointer - struct remove_cv_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U const volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //Volatile Array - struct remove_cv_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - template<> //Const Array - struct remove_cv_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U const[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - - template<> //CV Array - struct remove_cv_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U const volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - - } //namespace detail - - template - struct remove_cv { - typedef boost::detail::remove_cv_impl_typeof< - boost::is_pointer::value, - boost::is_array::value, - boost::is_const::value, - boost::is_volatile::value - > remove_cv_type; - typedef typename - remove_cv_type::template inner< - typename remove_cv_type::template transform_type::type, - remove_cv - >::type - type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_cv,T) - }; -}//namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_CV_HOLT_2004_0901 diff --git a/include/boost/type_traits/msvc/remove_extent.hpp b/include/boost/type_traits/msvc/remove_extent.hpp deleted file mode 100644 index c5a59ef..0000000 --- a/include/boost/type_traits/msvc/remove_extent.hpp +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_EXTENT_HOLT_2004_0827 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_EXTENT_HOLT_2004_0827 - -#include -#include - -namespace boost { - namespace detail { - template - struct remove_extent_impl_typeof { - template - struct inner { - typedef T type; - }; - }; - template<> - struct remove_extent_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U[]); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( *((T*)NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - }; - } //namespace detail - - template - struct remove_extent { - typedef typename boost::detail::remove_extent_impl_typeof< - boost::is_array::value - >::template inner >::type type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_extent,T) - }; -} //namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_BOUNDS_HOLT_2004_0827 - diff --git a/include/boost/type_traits/msvc/remove_pointer.hpp b/include/boost/type_traits/msvc/remove_pointer.hpp deleted file mode 100644 index ec847f9..0000000 --- a/include/boost/type_traits/msvc/remove_pointer.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_POINTER_HOLT_2004_0827 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_POINTER_HOLT_2004_0827 - -#include -#include - -namespace boost { - namespace detail { - template - struct remove_pointer_impl_typeof { - template - struct inner { - typedef T type; - }; - }; - template<> - struct remove_pointer_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U*); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( *((T*)NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - }; - } //namespace detail - - template - struct remove_pointer { - typedef typename boost::detail::remove_pointer_impl_typeof< - boost::is_pointer::value - >::template inner >::type type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_pointer,T) - }; -} //namespace boost - -#endif //BOOST_TYPE_TRAITS_REMOVE_POINTER_HOLT_2004_0827 diff --git a/include/boost/type_traits/msvc/remove_reference.hpp b/include/boost/type_traits/msvc/remove_reference.hpp deleted file mode 100644 index f8a77d4..0000000 --- a/include/boost/type_traits/msvc/remove_reference.hpp +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_REFERENCE_HOLT_2004_0827 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_REFERENCE_HOLT_2004_0827 - -#include -#include - -namespace boost { - namespace detail { - template - struct remove_reference_impl_typeof { - template - struct inner { - typedef T type; - }; - }; - template<> - struct remove_reference_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - }; - } //namespace detail - - template - struct remove_reference { - typedef typename boost::detail::remove_reference_impl_typeof< - boost::is_reference::value - >::template inner >::type type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_reference,T) - }; -} //namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_REFERENCE_HOLT_2004_0827 diff --git a/include/boost/type_traits/msvc/remove_volatile.hpp b/include/boost/type_traits/msvc/remove_volatile.hpp deleted file mode 100644 index 6f9259c..0000000 --- a/include/boost/type_traits/msvc/remove_volatile.hpp +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPE_TRAITS_MSVC_REMOVE_VOLATILE_HOLT_2004_0828 -#define BOOST_TYPE_TRAITS_MSVC_REMOVE_VOLATILE_HOLT_2004_0828 - -#include -#include -#include -#include -#include - -namespace boost { - namespace detail { - template - struct remove_volatile_impl_typeof { - template - struct inner { - typedef T type; - }; - template - struct transform_type { - typedef T type; - }; - }; - template<> //Volatile - struct remove_volatile_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U volatile&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //CV - struct remove_volatile_impl_typeof { - template - struct inner { - template - static msvc_register_type test(U const volatile&(*)()); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (T(*)())(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T& type; - }; - }; - template<> //Volatile Pointer - struct remove_volatile_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //CV Pointer - struct remove_volatile_impl_typeof { - template - struct inner { - template - static msvc_register_type test(void(*)(U const volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type[]; - }; - }; - template<> //Volatile Array - struct remove_volatile_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - - template<> //CV Array - struct remove_volatile_impl_typeof { - template - struct inner { - BOOST_STATIC_CONSTANT(unsigned,value=(sizeof(T)/sizeof((*((T*)NULL))[0]))); - - template - static msvc_register_type test(void(*)(U const volatile[])); - static msvc_register_type test(...); - BOOST_STATIC_CONSTANT(unsigned,register_test=sizeof(test( (void(*)(T))(NULL) ) )); - typedef typename msvc_extract_type::id2type::type type; - }; - template - struct transform_type { - typedef T type; - }; - }; - - } //namespace detail - - template - struct remove_volatile { - typedef boost::detail::remove_volatile_impl_typeof< - boost::is_pointer::value, - boost::is_array::value, - boost::is_const::value, - boost::is_volatile::value - > remove_volatile_type; - typedef typename - remove_volatile_type::template inner< - typename remove_volatile_type::template transform_type::type, - remove_volatile - >::type - type; - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,remove_volatile,T) - }; -}//namespace boost - -#endif //BOOST_TYPE_TRAITS_MSVC_REMOVE_VOLATILE_HOLT_2004_0828 diff --git a/include/boost/type_traits/msvc/typeof.hpp b/include/boost/type_traits/msvc/typeof.hpp deleted file mode 100644 index b95785d..0000000 --- a/include/boost/type_traits/msvc/typeof.hpp +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (C) 2004 Peder Holt -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_TYPETRAITS_MSVC_TYPEOF_HPP -#define BOOST_TYPETRAITS_MSVC_TYPEOF_HPP - -#include -#include - -namespace boost { namespace detail { -# if BOOST_WORKAROUND(BOOST_MSVC,==1300) - template - struct msvc_extract_type - { - template - struct id2type_impl; - - typedef id2type_impl id2type; - }; - - template - struct msvc_register_type : public msvc_extract_type - { - template<> - struct id2type_impl //VC7.0 specific bugfeature - { - typedef T type; - }; - }; -# else - template - struct msvc_extract_type - { - struct id2type; - }; - - template - struct msvc_register_type : public msvc_extract_type - { - typedef msvc_extract_type base_type; - struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature - { - typedef T type; - }; - }; -# endif -}} - -#endif //BOOST_TYPETRAITS_MSVC_TYPEOF_IMPL_HPP diff --git a/include/boost/type_traits/remove_all_extents.hpp b/include/boost/type_traits/remove_all_extents.hpp index 64876e1..57d8825 100644 --- a/include/boost/type_traits/remove_all_extents.hpp +++ b/include/boost/type_traits/remove_all_extents.hpp @@ -13,15 +13,9 @@ #include #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include -#if !BOOST_WORKAROUND(BOOST_MSVC,<=1300) - namespace boost { BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_all_extents,T,T) @@ -41,8 +35,6 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_all_extents,T const vo } // namespace boost -#endif - #include #endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED diff --git a/include/boost/type_traits/remove_bounds.hpp b/include/boost/type_traits/remove_bounds.hpp index ce12978..04bba69 100644 --- a/include/boost/type_traits/remove_bounds.hpp +++ b/include/boost/type_traits/remove_bounds.hpp @@ -13,15 +13,9 @@ #include #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include -#if !BOOST_WORKAROUND(BOOST_MSVC,<=1300) - namespace boost { BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_bounds,T,T) @@ -41,8 +35,6 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_bounds,T const volatil } // namespace boost -#endif - #include #endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED diff --git a/include/boost/type_traits/remove_const.hpp b/include/boost/type_traits/remove_const.hpp index 5f957e9..7b7d9c5 100644 --- a/include/boost/type_traits/remove_const.hpp +++ b/include/boost/type_traits/remove_const.hpp @@ -19,10 +19,6 @@ #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include @@ -77,7 +73,7 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_const,T BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_const,T const volatile[N],T volatile type[N]) #endif -#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) +#else BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_const,T,typename boost::detail::remove_const_impl::type) diff --git a/include/boost/type_traits/remove_cv.hpp b/include/boost/type_traits/remove_cv.hpp index 7478c20..db64d21 100644 --- a/include/boost/type_traits/remove_cv.hpp +++ b/include/boost/type_traits/remove_cv.hpp @@ -18,10 +18,6 @@ #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include @@ -61,7 +57,7 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T vol BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_cv,T const volatile[N],T type[N]) #endif -#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) +#else namespace detail { template diff --git a/include/boost/type_traits/remove_extent.hpp b/include/boost/type_traits/remove_extent.hpp index b4c7d41..90eef1e 100644 --- a/include/boost/type_traits/remove_extent.hpp +++ b/include/boost/type_traits/remove_extent.hpp @@ -13,15 +13,9 @@ #include #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include -#if !BOOST_WORKAROUND(BOOST_MSVC,<=1300) - namespace boost { BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_extent,T,T) @@ -41,8 +35,6 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_extent,T const volatil } // namespace boost -#endif - #include #endif // BOOST_TT_REMOVE_BOUNDS_HPP_INCLUDED diff --git a/include/boost/type_traits/remove_pointer.hpp b/include/boost/type_traits/remove_pointer.hpp index 01253db..aa86423 100644 --- a/include/boost/type_traits/remove_pointer.hpp +++ b/include/boost/type_traits/remove_pointer.hpp @@ -15,9 +15,7 @@ #include #endif -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#elif defined(BOOST_MSVC) +#if defined(BOOST_MSVC) #include #include #endif @@ -79,7 +77,7 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T* const,T) 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) -#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) +#else BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_impl::type) diff --git a/include/boost/type_traits/remove_reference.hpp b/include/boost/type_traits/remove_reference.hpp index 19a55b7..5dbb909 100644 --- a/include/boost/type_traits/remove_reference.hpp +++ b/include/boost/type_traits/remove_reference.hpp @@ -13,10 +13,6 @@ #include #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include @@ -57,7 +53,7 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& volatile, BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_reference,T& const volatile,T) #endif -#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) +#else BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_reference,T,typename boost::detail::remove_reference_impl::type) diff --git a/include/boost/type_traits/remove_volatile.hpp b/include/boost/type_traits/remove_volatile.hpp index 98da5cf..033c546 100644 --- a/include/boost/type_traits/remove_volatile.hpp +++ b/include/boost/type_traits/remove_volatile.hpp @@ -19,10 +19,6 @@ #include -#if BOOST_WORKAROUND(BOOST_MSVC,<=1300) -#include -#endif - // should be the last #include #include @@ -75,7 +71,7 @@ BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(typename T,std::size_t N,remove_volatile,T const volatile[N],T const type[N]) #endif -#elif !BOOST_WORKAROUND(BOOST_MSVC,<=1300) +#else BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_volatile,T,typename boost::detail::remove_volatile_impl::type) diff --git a/include/boost/type_traits/type_with_alignment.hpp b/include/boost/type_traits/type_with_alignment.hpp index a86137f..12093a9 100644 --- a/include/boost/type_traits/type_with_alignment.hpp +++ b/include/boost/type_traits/type_with_alignment.hpp @@ -248,7 +248,7 @@ BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a64,true) BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(is_pod,::boost::align::a128,true) } #endif -#if (defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && _MSC_VER >= 1300 +#if defined(BOOST_MSVC) || (defined(BOOST_INTEL) && defined(_MSC_VER)) // // MSVC supports types which have alignments greater than the normal // maximum: these are used for example in the types __m64 and __m128