diff --git a/include/boost/type_traits/alignment_traits.hpp b/include/boost/type_traits/alignment_traits.hpp index 7de0c30..13ceb33 100644 --- a/include/boost/type_traits/alignment_traits.hpp +++ b/include/boost/type_traits/alignment_traits.hpp @@ -32,7 +32,7 @@ struct alignment_of_hack template struct alignment_logic { - BOOST_DECL_MC(std::size_t, value, A < S ? A : S); + BOOST_STATIC_CONSTANT(std::size_t, value = A < S ? A : S); }; } // namespace detail @@ -40,7 +40,7 @@ struct alignment_logic template struct alignment_of { - BOOST_DECL_MC(std::size_t, value, + BOOST_STATIC_CONSTANT(std::size_t, value = (::boost::detail::alignment_logic< sizeof(detail::alignment_of_hack) - sizeof(T), sizeof(T) @@ -55,24 +55,24 @@ template struct alignment_of { public: - BOOST_DECL_MC(std::size_t, value, alignment_of::value); + BOOST_STATIC_CONSTANT(std::size_t, value = alignment_of::value); }; #endif // // void has to be treated specially: template <> struct alignment_of -{ BOOST_DECL_MC(std::size_t, value, 0); }; +{ BOOST_STATIC_CONSTANT(std::size_t, value = 0); }; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct alignment_of -{ BOOST_DECL_MC(std::size_t, value, 0); }; +{ BOOST_STATIC_CONSTANT(std::size_t, value = 0); }; template <> struct alignment_of -{ BOOST_DECL_MC(std::size_t, value, 0); }; +{ BOOST_STATIC_CONSTANT(std::size_t, value = 0); }; template <> struct alignment_of -{ BOOST_DECL_MC(std::size_t, value, 0); }; +{ BOOST_STATIC_CONSTANT(std::size_t, value = 0); }; #endif } // namespace boost diff --git a/include/boost/type_traits/arithmetic_traits.hpp b/include/boost/type_traits/arithmetic_traits.hpp index abd4cd9..d680d8a 100644 --- a/include/boost/type_traits/arithmetic_traits.hpp +++ b/include/boost/type_traits/arithmetic_traits.hpp @@ -11,8 +11,8 @@ // -#ifndef ARITHMETIC_TYPE_TRAITS_HPP -#define ARITHMETIC_TYPE_TRAITS_HPP +#ifndef BOOST_ARITHMETIC_TYPE_TRAITS_HPP +#define BOOST_ARITHMETIC_TYPE_TRAITS_HPP #ifndef BOOST_ICE_TYPE_TRAITS_HPP #include @@ -24,209 +24,209 @@ namespace boost{ //* is a type T void - is_void -template struct is_void{ BOOST_DECL_MC(bool, value, false); }; -template <> struct is_void{ BOOST_DECL_MC(bool, value, true); }; +template struct is_void{ BOOST_STATIC_CONSTANT(bool, value = false); }; +template <> struct is_void{ BOOST_STATIC_CONSTANT(bool, value = true); }; //* is a type T an integral type described in the standard (3.9.1p3) template struct is_integral -{ BOOST_DECL_MC(bool, value, false); }; +{ BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; -#ifndef BOOST_MSVC +{ BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_NO_INTRINSIC_WCHAR_T template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; -#if defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) +# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX)) template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #if defined(__BORLANDC__) || defined(_MSC_VER) && !defined(__MWERKS__) template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral<__int64> -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif //* is a type T a floating-point type described in the standard (3.9.1p8) template struct is_float -{ BOOST_DECL_MC(bool, value, false); }; +{ BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct is_float -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_float -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_float -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; // // declare cv-qualified specialisations of these templates only // if BOOST_NO_CV_SPECIALIZATIONS is not defined: #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct is_void -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_void -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_void -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #ifndef BOOST_NO_CV_SPECIALIZATIONS // const-variations: template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; -#ifndef BOOST_MSVC +{ BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_NO_INTRINSIC_WCHAR_T template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; -#if defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) +# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX)) template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif // ULLONG_MAX #if defined(__BORLANDC__) || defined(_MSC_VER) && !defined(__MWERKS__) template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif //__int64 template <> struct is_float -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_float -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_float -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; // volatile-variations: template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; -#ifndef BOOST_MSVC +{ BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_NO_INTRINSIC_WCHAR_T template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifdef ULLONG_MAX +# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX)) template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif // ULLONG_MAX #if defined(__BORLANDC__) || defined(_MSC_VER) && !defined(__MWERKS__) template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif //__int64 template <> struct is_float -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_float -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_float -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; // const-volatile-variations: template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; -#ifndef BOOST_MSVC +{ BOOST_STATIC_CONSTANT(bool, value = true); }; +#ifndef BOOST_NO_INTRINSIC_WCHAR_T template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; -#ifdef ULLONG_MAX +# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX)) template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif // ULLONG_MAX #if defined(__BORLANDC__) || defined(_MSC_VER) && !defined(__MWERKS__) template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_integral -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif //__int64 template <> struct is_float -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_float -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_float -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif // BOOST_NO_CV_SPECIALIZATIONS @@ -234,9 +234,9 @@ template <> struct is_float template struct is_arithmetic { - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< - ::boost::is_integral::value, + ::boost::is_integral::value, ::boost::is_float::value >::value)); }; @@ -245,7 +245,7 @@ struct is_arithmetic template struct is_fundamental { - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::is_arithmetic::value, ::boost::is_void::value diff --git a/include/boost/type_traits/composite_traits.hpp b/include/boost/type_traits/composite_traits.hpp index 3f831ac..c5dfe8f 100644 --- a/include/boost/type_traits/composite_traits.hpp +++ b/include/boost/type_traits/composite_traits.hpp @@ -17,8 +17,8 @@ // All rights reserved.). // Fixes for is_array are based on a newgroup posting by Jonathan Lundquist. -#ifndef COMPOSITE_TYPE_TRAITS_HPP -#define COMPOSITE_TYPE_TRAITS_HPP +#ifndef BOOST_COMPOSITE_TYPE_TRAITS_HPP +#define BOOST_COMPOSITE_TYPE_TRAITS_HPP #ifndef BOOST_ICE_TYPE_TRAITS_HPP #include @@ -29,10 +29,10 @@ #ifndef BOOST_CONVERSION_TYPE_TRAITS_HPP #include #endif -#ifndef CV_TYPE_TRAITS_HPP +#ifndef BOOST_CV_TYPE_TRAITS_HPP #include #endif -#ifndef ARITHMETIC_TYPE_TRAITS_HPP +#ifndef BOOST_ARITHMETIC_TYPE_TRAITS_HPP #include #endif @@ -45,15 +45,15 @@ namespace boost{ **********************************************/ #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_array -{ BOOST_DECL_MC(bool, value, false); }; +{ BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_array -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_array -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_array -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_array -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail{ struct pointer_helper @@ -83,30 +83,35 @@ struct is_array private: static T t; public: - BOOST_DECL_MC(bool, value, (1 == sizeof(detail::is_array_helper(&t, t))) - & !is_reference::value - & !(1 == sizeof(detail::is_pointer_helper3(t))) ); + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + (1 == sizeof(detail::is_array_helper(&t, t))), + ::boost::type_traits::ice_not< + ::boost::is_reference::value>::value, + ::boost::type_traits::ice_not< + (1 == sizeof(detail::is_pointer_helper3(t)))>::value + >::value)); }; template <> struct is_array { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct is_array { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct is_array { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct is_array { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; #endif @@ -120,18 +125,18 @@ struct is_array #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION namespace detail{ template struct is_pointer_helper -{ BOOST_DECL_MC(bool, value, false); }; +{ BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_pointer_helper -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_pointer_helper -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_pointer_helper -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_pointer_helper -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; } // namespace detail template struct is_pointer -{ BOOST_DECL_MC(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)); }; +{ 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 template struct is_pointer @@ -139,36 +144,40 @@ struct is_pointer private: static T t; public: - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< - !::boost::is_reference::value, - !::boost::is_array::value, - (::boost::type_traits::ice_or< + ::boost::type_traits::ice_not< + ::boost::is_reference::value + >::value, + ::boost::type_traits::ice_not< + ::boost::is_array::value + >::value, + (::boost::type_traits::ice_or< (1 == sizeof(detail::is_pointer_helper(t))), (1 == sizeof(detail::is_pointer_helper3(t))) - >::value) + >::value) >::value ) ); }; template <> struct is_pointer { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct is_pointer { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct is_pointer { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct is_pointer { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; #endif #endif @@ -180,20 +189,20 @@ struct is_pointer **********************************************/ #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_reference -{ BOOST_DECL_MC(bool, value, false); }; +{ BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_reference -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #if defined(__BORLANDC__) // these are illegal specialisations; cv-qualifies applied to // references have no effect according to [8.3.2p1], // C++ Builder requires them though as it treats cv-qualified // references as distinct types... template struct is_reference -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_reference -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_reference -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #else # ifdef BOOST_MSVC @@ -205,19 +214,26 @@ template struct is_reference private: typedef T const volatile cv_t; public: - BOOST_DECL_MC(bool, value, (::boost::type_traits::ice_or::value, !::boost::is_volatile::value>::value)); + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_or< + ::boost::type_traits::ice_not< + ::boost::is_const::value + >::value, + ::boost::type_traits::ice_not< + ::boost::is_volatile::value>::value + >::value)); }; template <> struct is_reference { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct is_reference -{ BOOST_DECL_MC(bool, value, false); }; +{ BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct is_reference -{ BOOST_DECL_MC(bool, value, false); }; +{ BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct is_reference -{ BOOST_DECL_MC(bool, value, false); }; +{ BOOST_STATIC_CONSTANT(bool, value = false); }; #endif # ifdef BOOST_MSVC @@ -235,7 +251,7 @@ template struct is_union private: typedef typename remove_cv::type cvt; public: - BOOST_DECL_MC(bool, value, BOOST_IS_UNION(cvt)); + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(cvt)); }; /********************************************** @@ -252,7 +268,7 @@ struct int_convertible #ifndef __BORLANDC__ template struct is_enum { - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_arithmetic::value>::value, ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, @@ -266,7 +282,7 @@ template struct is_enum template struct is_enum { public: - BOOST_DECL_MC(bool, value, BOOST_IS_ENUM(T)); + BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_ENUM(T)); }; #endif @@ -277,23 +293,23 @@ public: **********************************************/ #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct is_member_pointer -{ BOOST_DECL_MC(bool, value, false); }; +{ BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_member_pointer -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #ifdef __GNUC__ // gcc workaround (JM 02 Oct 2000) template struct is_member_pointer -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_member_pointer -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_member_pointer -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_member_pointer -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_member_pointer -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template struct is_member_pointer -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #endif #else namespace detail{ @@ -319,28 +335,28 @@ struct is_member_pointer private: static T t; public: - BOOST_DECL_MC(bool, value, (1 == sizeof(detail::is_member_pointer_helper(t))) ); + BOOST_STATIC_CONSTANT(bool, value = (1 == sizeof(detail::is_member_pointer_helper(t))) ); }; template <> struct is_member_pointer { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct is_member_pointer { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct is_member_pointer { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct is_member_pointer { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; #endif @@ -349,7 +365,7 @@ struct is_member_pointer } // namespace boost -#endif // COMPOSITE_TYPE_TRAITS_HPP +#endif // BOOST_COMPOSITE_TYPE_TRAITS_HPP diff --git a/include/boost/type_traits/conversion_traits.hpp b/include/boost/type_traits/conversion_traits.hpp index dcc2533..e2b0601 100644 --- a/include/boost/type_traits/conversion_traits.hpp +++ b/include/boost/type_traits/conversion_traits.hpp @@ -21,7 +21,7 @@ #ifndef BOOST_FWD_TYPE_TRAITS_HPP #include #endif -#ifndef ARITHMETIC_TYPE_TRAITS_HPP +#ifndef BOOST_ARITHMETIC_TYPE_TRAITS_HPP #include #endif // @@ -193,7 +193,7 @@ private: static type_traits::yes_type check(To); static From from; public: - BOOST_DECL_MC(bool, value, sizeof( check(from) ) == sizeof(type_traits::yes_type)); + BOOST_STATIC_CONSTANT(bool, value = sizeof( check(from) ) == sizeof(type_traits::yes_type)); void foo(); // avoid warning about all members being private }; @@ -201,19 +201,19 @@ public: template struct is_convertible { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_convertible { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct is_convertible { - BOOST_DECL_MC(bool, value, true); + BOOST_STATIC_CONSTANT(bool, value = true); }; #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION diff --git a/include/boost/type_traits/cv_traits.hpp b/include/boost/type_traits/cv_traits.hpp index fe33530..32faaad 100644 --- a/include/boost/type_traits/cv_traits.hpp +++ b/include/boost/type_traits/cv_traits.hpp @@ -10,8 +10,8 @@ // is_const, is_volatile, remove_const, remove_volatile, remove_cv. // -#ifndef CV_TYPE_TRAITS_HPP -#define CV_TYPE_TRAITS_HPP +#ifndef BOOST_CV_TYPE_TRAITS_HPP +#define BOOST_CV_TYPE_TRAITS_HPP #ifndef BOOST_ICE_TYPE_TRAITS_HPP #include @@ -33,32 +33,32 @@ struct cv_traits_imp{}; template struct cv_traits_imp { - BOOST_DECL_MC(bool, is_const, false); - BOOST_DECL_MC(bool, is_volatile, false); + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); typedef T unqualified_type; }; template struct cv_traits_imp { - BOOST_DECL_MC(bool, is_const, true); - BOOST_DECL_MC(bool, is_volatile, false); + BOOST_STATIC_CONSTANT(bool, is_const = true); + BOOST_STATIC_CONSTANT(bool, is_volatile = false); typedef T unqualified_type; }; template struct cv_traits_imp { - BOOST_DECL_MC(bool, is_const, false); - BOOST_DECL_MC(bool, is_volatile, true); + BOOST_STATIC_CONSTANT(bool, is_const = false); + BOOST_STATIC_CONSTANT(bool, is_volatile = true); typedef T unqualified_type; }; template struct cv_traits_imp { - BOOST_DECL_MC(bool, is_const, true); - BOOST_DECL_MC(bool, is_volatile, true); + BOOST_STATIC_CONSTANT(bool, is_const = true); + BOOST_STATIC_CONSTANT(bool, is_volatile = true); typedef T unqualified_type; }; @@ -116,14 +116,14 @@ template struct remove_cv{ typedef T& type; }; template struct is_const { - BOOST_DECL_MC(bool, value, detail::cv_traits_imp::is_const); + BOOST_STATIC_CONSTANT(bool, value = detail::cv_traits_imp::is_const); }; //* is a type T declared volatile - is_volatile template struct is_volatile { - BOOST_DECL_MC(bool, value, detail::cv_traits_imp::is_volatile); + BOOST_STATIC_CONSTANT(bool, value = detail::cv_traits_imp::is_volatile); }; #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION @@ -147,29 +147,29 @@ struct is_const private: static T t; public: - BOOST_DECL_MC(bool, value, (sizeof(detail::yes_type) == sizeof(detail::is_const_helper(&t)))); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(detail::yes_type) == sizeof(detail::is_const_helper(&t)))); }; template <> struct is_const { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct is_const { - BOOST_DECL_MC(bool, value, true); + BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_const { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct is_const { - BOOST_DECL_MC(bool, value, true); + BOOST_STATIC_CONSTANT(bool, value = true); }; #endif @@ -179,29 +179,29 @@ struct is_volatile private: static T t; public: - BOOST_DECL_MC(bool, value, (sizeof(detail::yes_type) == sizeof(detail::is_volatile_helper(&t)))); + BOOST_STATIC_CONSTANT(bool, value = (sizeof(detail::yes_type) == sizeof(detail::is_volatile_helper(&t)))); }; template <> struct is_volatile { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS template <> struct is_volatile { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct is_volatile { - BOOST_DECL_MC(bool, value, true); + BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct is_volatile { - BOOST_DECL_MC(bool, value, true); + BOOST_STATIC_CONSTANT(bool, value = true); }; #endif @@ -209,6 +209,6 @@ struct is_volatile } // namespace boost -#endif // CV_TYPE_TRAITS_HPP +#endif // BOOST_CV_TYPE_TRAITS_HPP diff --git a/include/boost/type_traits/ice.hpp b/include/boost/type_traits/ice.hpp index e2f72d5..22c0f9e 100644 --- a/include/boost/type_traits/ice.hpp +++ b/include/boost/type_traits/ice.hpp @@ -16,14 +16,6 @@ #include #endif -#ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION -#define BOOST_DECL_MC(type, name, value) enum{name = value } -#define BOOST_DECL_MC2(type, name, v1, v2) enum{name = v1,v2 } -#else -#define BOOST_DECL_MC(type, name, value) static const type name = value -#define BOOST_DECL_MC2(type, name, v1, v2) static const type name = v1,v2 -#endif - namespace boost{ namespace type_traits{ @@ -33,22 +25,22 @@ typedef double no_type; template struct ice_not -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct ice_not -{ BOOST_DECL_MC(bool, value, false); }; +{ BOOST_STATIC_CONSTANT(bool, value = false); }; template struct ice_or; template struct ice_or { - BOOST_DECL_MC(bool, value, true); + BOOST_STATIC_CONSTANT(bool, value = true); }; template <> struct ice_or { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; template @@ -56,12 +48,12 @@ struct ice_and; template struct ice_and { - BOOST_DECL_MC(bool, value, false); + BOOST_STATIC_CONSTANT(bool, value = false); }; template <> struct ice_and { - BOOST_DECL_MC(bool, value, true); + BOOST_STATIC_CONSTANT(bool, value = true); }; diff --git a/include/boost/type_traits/object_traits.hpp b/include/boost/type_traits/object_traits.hpp index ca8c624..7deca0e 100644 --- a/include/boost/type_traits/object_traits.hpp +++ b/include/boost/type_traits/object_traits.hpp @@ -12,8 +12,8 @@ // has_trivial_destructor, is_empty. // -#ifndef OBJECT_TYPE_TRAITS_HPP -#define OBJECT_TYPE_TRAITS_HPP +#ifndef BOOST_OBJECT_TYPE_TRAITS_HPP +#define BOOST_OBJECT_TYPE_TRAITS_HPP #ifndef BOOST_ICE_TYPE_TRAITS_HPP #include @@ -21,10 +21,10 @@ #ifndef BOOST_FWD_TYPE_TRAITS_HPP #include #endif -#ifndef COMPOSITE_TYPE_TRAITS_HPP +#ifndef BOOST_COMPOSITE_TYPE_TRAITS_HPP #include #endif -#ifndef ARITHMETIC_TYPE_TRAITS_HPP +#ifndef BOOST_ARITHMETIC_TYPE_TRAITS_HPP #include #endif @@ -38,7 +38,7 @@ namespace boost{ template struct is_object { - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_reference::value>::value, ::boost::type_traits::ice_not< ::boost::is_void::value>::value @@ -53,7 +53,7 @@ struct is_object template struct is_scalar { - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::is_arithmetic::value, ::boost::is_enum::value, @@ -70,7 +70,7 @@ struct is_scalar template struct is_class { - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_not< ::boost::is_union::value >::value, ::boost::type_traits::ice_not< ::boost::is_scalar::value >::value, @@ -87,7 +87,7 @@ struct is_class **********************************************/ template struct is_compound { - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::is_array::value, ::boost::is_pointer::value, @@ -106,7 +106,7 @@ template struct is_compound **********************************************/ template struct is_POD { - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::is_scalar::value, ::boost::is_void::value, @@ -117,7 +117,7 @@ template struct is_POD template struct is_POD { - BOOST_DECL_MC(bool, value, ::boost::is_POD::value); + BOOST_STATIC_CONSTANT(bool, value = ::boost::is_POD::value); }; #endif @@ -129,7 +129,7 @@ struct is_POD template struct has_trivial_constructor { - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::is_POD::value, BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) @@ -144,7 +144,7 @@ struct has_trivial_constructor template struct has_trivial_copy { - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_POD::value, @@ -162,7 +162,7 @@ struct has_trivial_copy template struct has_trivial_assign { - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< ::boost::type_traits::ice_or< ::boost::is_POD::value, @@ -181,7 +181,7 @@ struct has_trivial_assign template struct has_trivial_destructor { - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::is_POD::value, BOOST_HAS_TRIVIAL_DESTRUCTOR(T) @@ -207,12 +207,12 @@ struct empty_helper_t1 : public T struct empty_helper_t2 { int i[256]; }; template -struct empty_helper{ BOOST_DECL_MC(bool, value, false); }; +struct empty_helper{ BOOST_STATIC_CONSTANT(bool, value = false); }; template struct empty_helper { - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (sizeof(empty_helper_t1) == sizeof(empty_helper_t2))); }; } @@ -223,7 +223,7 @@ struct is_empty private: typedef typename remove_cv::type cvt; public: - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::detail::empty_helper::value , @@ -285,18 +285,25 @@ struct is_empty private: typedef ::boost::detail::empty_helper_chooser< ::boost::type_traits::ice_and< - !::boost::is_convertible::value, - !::boost::is_convertible::value, - !::boost::is_pointer::value, - !::boost::is_member_pointer::value, - !::boost::is_array::value, - !::boost::is_void::value, - !::boost::is_convertible::value + ::boost::type_traits::ice_not< + ::boost::is_convertible::value>::value, + ::boost::type_traits::ice_not< + ::boost::is_convertible::value>::value, + ::boost::type_traits::ice_not< + ::boost::is_pointer::value>::value, + ::boost::type_traits::ice_not< + ::boost::is_member_pointer::value>::value, + ::boost::type_traits::ice_not< + ::boost::is_array::value>::value, + ::boost::type_traits::ice_not< + ::boost::is_void::value>::value, + ::boost::type_traits::ice_not< + ::boost::is_convertible::value>::value >::value> chooser; typedef typename chooser::template rebind bound_type; typedef typename bound_type::type eh_type; public: - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or::value)); }; @@ -309,7 +316,7 @@ template struct is_empty } // namespace boost -#endif // OBJECT_TYPE_TRAITS_HPP +#endif // BOOST_OBJECT_TYPE_TRAITS_HPP diff --git a/include/boost/type_traits/same_traits.hpp b/include/boost/type_traits/same_traits.hpp index e94f46a..85de6b0 100644 --- a/include/boost/type_traits/same_traits.hpp +++ b/include/boost/type_traits/same_traits.hpp @@ -8,8 +8,8 @@ // // defines is_same: -#ifndef SAME_TRAITS_HPP -#define SAME_TRAITS_HPP +#ifndef BOOST_SAME_TRAITS_HPP +#define BOOST_SAME_TRAITS_HPP #ifndef BOOST_ICE_TYPE_TRAITS_HPP #include @@ -17,7 +17,7 @@ #ifndef BOOST_FWD_TYPE_TRAITS_HPP #include #endif -#if !defined(COMPOSITE_TYPE_TRAITS_HPP) && defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC) +#if !defined(BOOST_COMPOSITE_TYPE_TRAITS_HPP) && defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC) #include #endif @@ -32,11 +32,11 @@ namespace boost{ template struct is_same -{ BOOST_DECL_MC(bool, value, false); }; +{ BOOST_STATIC_CONSTANT(bool, value = false); }; template struct is_same -{ BOOST_DECL_MC(bool, value, true); }; +{ BOOST_STATIC_CONSTANT(bool, value = true); }; #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION @@ -70,7 +70,7 @@ private: static T t; static U u; public: - BOOST_DECL_MC(bool, value, + BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< (sizeof(type_traits::yes_type) == sizeof(detail::is_same_helper(&t,&u))), (::boost::is_reference::value == ::boost::is_reference::value), @@ -84,7 +84,7 @@ public: } // namespace boost -#endif // SAME_TRAITS_HPP +#endif // BOOST_SAME_TRAITS_HPP diff --git a/include/boost/type_traits/transform_traits.hpp b/include/boost/type_traits/transform_traits.hpp index e82f40f..22821bc 100644 --- a/include/boost/type_traits/transform_traits.hpp +++ b/include/boost/type_traits/transform_traits.hpp @@ -10,8 +10,8 @@ // remove_reference, add_reference, remove_bounds, remove_pointer. // -#ifndef TRANSFORM_TRAITS_HPP -#define TRANSFORM_TRAITS_HPP +#ifndef BOOST_TRANSFORM_TRAITS_HPP +#define BOOST_TRANSFORM_TRAITS_HPP #ifndef BOOST_ICE_TYPE_TRAITS_HPP #include @@ -19,7 +19,7 @@ #ifndef BOOST_FWD_TYPE_TRAITS_HPP #include #endif -#if !defined(COMPOSITE_TYPE_TRAITS_HPP) && defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_COMPOSITE_TYPE_TRAITS_HPP) && defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) #include #endif @@ -179,7 +179,7 @@ public: #define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(x) #endif -#endif // TRANSFORM_TRAITS_HPP +#endif // BOOST_TRANSFORM_TRAITS_HPP