diff --git a/include/boost/type_traits.hpp b/include/boost/type_traits.hpp index 08bb5a1..0c313b8 100644 --- a/include/boost/type_traits.hpp +++ b/include/boost/type_traits.hpp @@ -70,6 +70,15 @@ #include "boost/type_traits/type_with_alignment.hpp" #include "boost/type_traits/function_traits.hpp" #include "boost/type_traits/aligned_storage.hpp" +#include "boost/type_traits/floating_point_promotion.hpp" +#if !(defined(__sgi) && defined(__EDG_VERSION__) && (__EDG_VERSION__ == 238)) +#include "boost/type_traits/integral_promotion.hpp" +#include "boost/type_traits/promote.hpp" +#endif +#include +#include +#include +#include #include "boost/type_traits/ice.hpp" diff --git a/include/boost/type_traits/config.hpp b/include/boost/type_traits/config.hpp index 98945d7..7f98789 100644 --- a/include/boost/type_traits/config.hpp +++ b/include/boost/type_traits/config.hpp @@ -32,9 +32,9 @@ || BOOST_WORKAROUND(__IBMCPP__, < 600 ) \ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) \ || defined(__ghs) \ - || BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800)) \ + || BOOST_WORKAROUND(__HP_aCC, < 60700) \ || BOOST_WORKAROUND(MPW_CPLUS, BOOST_TESTED_AT(0x890)) \ - || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580)) ) \ + || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))) \ && defined(BOOST_NO_IS_ABSTRACT) # define BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION 1 diff --git a/include/boost/type_traits/function_traits.hpp b/include/boost/type_traits/function_traits.hpp index 1554cfb..2112ce7 100644 --- a/include/boost/type_traits/function_traits.hpp +++ b/include/boost/type_traits/function_traits.hpp @@ -166,7 +166,7 @@ struct function_traits_helper template struct function_traits : - public detail::function_traits_helper::type> + public detail::function_traits_helper::type> { }; diff --git a/include/boost/type_traits/has_nothrow_constructor.hpp b/include/boost/type_traits/has_nothrow_constructor.hpp index 4f2cb36..e807fd4 100644 --- a/include/boost/type_traits/has_nothrow_constructor.hpp +++ b/include/boost/type_traits/has_nothrow_constructor.hpp @@ -30,6 +30,7 @@ struct has_nothrow_constructor_imp{ } BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_constructor,T,::boost::detail::has_nothrow_constructor_imp::value) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_default_constructor,T,::boost::detail::has_nothrow_constructor_imp::value) } // namespace boost diff --git a/include/boost/type_traits/has_nothrow_copy.hpp b/include/boost/type_traits/has_nothrow_copy.hpp index 6a66c8b..c06b4a3 100644 --- a/include/boost/type_traits/has_nothrow_copy.hpp +++ b/include/boost/type_traits/has_nothrow_copy.hpp @@ -30,6 +30,7 @@ struct has_nothrow_copy_imp{ } BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy,T,::boost::detail::has_nothrow_copy_imp::value) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_copy_constructor,T,::boost::detail::has_nothrow_copy_imp::value) } // namespace boost diff --git a/include/boost/type_traits/has_trivial_constructor.hpp b/include/boost/type_traits/has_trivial_constructor.hpp index 5f9616d..f9ade5d 100644 --- a/include/boost/type_traits/has_trivial_constructor.hpp +++ b/include/boost/type_traits/has_trivial_constructor.hpp @@ -34,6 +34,7 @@ struct has_trivial_ctor_impl } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_constructor,T,::boost::detail::has_trivial_ctor_impl::value) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_default_constructor,T,::boost::detail::has_trivial_ctor_impl::value) } // namespace boost diff --git a/include/boost/type_traits/has_trivial_copy.hpp b/include/boost/type_traits/has_trivial_copy.hpp index 96b2148..8c75361 100644 --- a/include/boost/type_traits/has_trivial_copy.hpp +++ b/include/boost/type_traits/has_trivial_copy.hpp @@ -40,6 +40,7 @@ struct has_trivial_copy_impl } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy,T,::boost::detail::has_trivial_copy_impl::value) +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_copy_constructor,T,::boost::detail::has_trivial_copy_impl::value) } // namespace boost diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 48c3440..3b48b47 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -85,6 +85,21 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif +#if defined(__DMC__) && (__DMC__ >= 0x848) +// For Digital Mars C++, www.digitalmars.com +# define BOOST_IS_UNION(T) (__typeinfo(T) & 0x400) +# define BOOST_IS_POD(T) (__typeinfo(T) & 0x800) +# define BOOST_IS_EMPTY(T) (__typeinfo(T) & 0x1000) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__typeinfo(T) & 0x10) +# define BOOST_HAS_TRIVIAL_COPY(T) (__typeinfo(T) & 0x20) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__typeinfo(T) & 0x40) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__typeinfo(T) & 0x8) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__typeinfo(T) & 0x80) +# define BOOST_HAS_NOTHROW_COPY(T) (__typeinfo(T) & 0x100) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__typeinfo(T) & 0x200) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) (__typeinfo(T) & 0x4) +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif #ifndef BOOST_IS_UNION # define BOOST_IS_UNION(T) false @@ -135,3 +150,4 @@ + diff --git a/include/boost/type_traits/is_abstract.hpp b/include/boost/type_traits/is_abstract.hpp index b6d640c..c565f08 100755 --- a/include/boost/type_traits/is_abstract.hpp +++ b/include/boost/type_traits/is_abstract.hpp @@ -85,7 +85,14 @@ struct is_abstract_imp2 #ifdef __GNUC__ BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(is_abstract_imp2::template check_sig(0))); #else +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(push) +#pragma warning(disable:6334) +#endif BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig(0))); +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(pop) +#endif #endif BOOST_STATIC_CONSTANT(bool, value = diff --git a/include/boost/type_traits/is_base_and_derived.hpp b/include/boost/type_traits/is_base_and_derived.hpp index 48d1028..6f3add2 100644 --- a/include/boost/type_traits/is_base_and_derived.hpp +++ b/include/boost/type_traits/is_base_and_derived.hpp @@ -15,6 +15,7 @@ #include #include #include +#include // should be the last #include #include @@ -128,6 +129,17 @@ struct bd_helper template struct is_base_and_derived_impl2 { +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(push) +#pragma warning(disable:6334) +#endif + // + // May silently do the wrong thing with incomplete types + // unless we trap them here: + // + BOOST_STATIC_ASSERT(sizeof(B) != 0); + BOOST_STATIC_ASSERT(sizeof(D) != 0); + struct Host { #if !BOOST_WORKAROUND(BOOST_MSVC, == 1310) @@ -140,6 +152,9 @@ struct is_base_and_derived_impl2 BOOST_STATIC_CONSTANT(bool, value = sizeof(bd_helper::check_sig(Host(), 0)) == sizeof(type_traits::yes_type)); +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(pop) +#endif }; #else @@ -220,4 +235,3 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_2(typename Base,typename Derived,is_base_a #include #endif // BOOST_TT_IS_BASE_AND_DERIVED_HPP_INCLUDED - diff --git a/include/boost/type_traits/is_class.hpp b/include/boost/type_traits/is_class.hpp index c361580..05d96de 100644 --- a/include/boost/type_traits/is_class.hpp +++ b/include/boost/type_traits/is_class.hpp @@ -116,7 +116,7 @@ struct is_class_impl # ifdef __EDG_VERSION__ BOOST_TT_AUX_BOOL_TRAIT_DEF1( - is_class,T, detail::is_class_impl::type>::value) + is_class,T, boost::detail::is_class_impl::type>::value) # else BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_class,T,::boost::detail::is_class_impl::value) # endif diff --git a/include/boost/type_traits/is_convertible.hpp b/include/boost/type_traits/is_convertible.hpp index 54a11a1..10309ca 100644 --- a/include/boost/type_traits/is_convertible.hpp +++ b/include/boost/type_traits/is_convertible.hpp @@ -250,6 +250,9 @@ struct is_convertible_basic_impl #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4244) +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(disable:6334) +#endif #endif BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) @@ -413,4 +416,3 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convert #include #endif // BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED - diff --git a/include/boost/type_traits/is_function.hpp b/include/boost/type_traits/is_function.hpp index 8fd2c9e..93e4846 100644 --- a/include/boost/type_traits/is_function.hpp +++ b/include/boost/type_traits/is_function.hpp @@ -62,11 +62,18 @@ struct is_function_impl template struct is_function_impl { +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(push) +#pragma warning(disable:6334) +#endif static T* t; BOOST_STATIC_CONSTANT( bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t)) == sizeof(::boost::type_traits::yes_type) ); +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(pop) +#endif }; #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) diff --git a/include/boost/type_traits/is_integral.hpp b/include/boost/type_traits/is_integral.hpp index b6ca6c7..51710c2 100644 --- a/include/boost/type_traits/is_integral.hpp +++ b/include/boost/type_traits/is_integral.hpp @@ -41,6 +41,8 @@ BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,char,true) BOOST_TT_AUX_BOOL_TRAIT_CV_SPEC1(is_integral,wchar_t,true) #endif +// 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)) \ || (defined(__BORLANDC__) && (__BORLANDC__ == 0x600) && (_MSC_VER < 1300)) diff --git a/include/boost/type_traits/is_member_function_pointer.hpp b/include/boost/type_traits/is_member_function_pointer.hpp index edfc5ad..deedeea 100644 --- a/include/boost/type_traits/is_member_function_pointer.hpp +++ b/include/boost/type_traits/is_member_function_pointer.hpp @@ -22,6 +22,7 @@ // version does not do so. // # include +# include #else # include # include @@ -41,7 +42,7 @@ namespace boost { BOOST_TT_AUX_BOOL_TRAIT_DEF1( is_member_function_pointer , T - , ::boost::type_traits::is_mem_fun_pointer_impl::value + , ::boost::type_traits::is_mem_fun_pointer_impl::type>::value ) #else @@ -61,6 +62,10 @@ struct is_mem_fun_pointer_select { template struct result_ { +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(push) +#pragma warning(disable:6334) +#endif static T* make_t; typedef result_ self_type; @@ -68,6 +73,9 @@ struct is_mem_fun_pointer_select bool, value = ( 1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t)) )); +#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) +#pragma warning(pop) +#endif }; }; diff --git a/include/boost/type_traits/is_member_pointer.hpp b/include/boost/type_traits/is_member_pointer.hpp index 73300d3..1f9f5a7 100644 --- a/include/boost/type_traits/is_member_pointer.hpp +++ b/include/boost/type_traits/is_member_pointer.hpp @@ -48,6 +48,12 @@ BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer, BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_member_pointer,T,::boost::is_member_function_pointer::value) BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*,true) +#if !BOOST_WORKAROUND(__MWERKS__,<=0x3003) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*const,true) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC1_2(typename T,typename U,is_member_pointer,U T::*volatile,true) +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 { diff --git a/include/boost/type_traits/is_pointer.hpp b/include/boost/type_traits/is_pointer.hpp index 8c15545..db0701e 100644 --- a/include/boost/type_traits/is_pointer.hpp +++ b/include/boost/type_traits/is_pointer.hpp @@ -25,6 +25,9 @@ #include #include #include +#if !BOOST_WORKAROUND(BOOST_MSVC,<=1300) +#include +#endif #ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION # include @@ -56,15 +59,13 @@ template< typename T > struct helper \ /**/ TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T*,true) -TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T* const,true) -TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T* volatile,true) -TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC(is_pointer_helper,T* const volatile,true) # undef TT_AUX_BOOL_TRAIT_HELPER_PARTIAL_SPEC 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 @@ -73,6 +74,16 @@ struct is_pointer_impl >::value >::value) ); +#else + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + ::boost::detail::is_pointer_helper::type>::value + , ::boost::type_traits::ice_not< + ::boost::is_member_pointer::value + >::value + >::value) + ); +#endif }; } // namespace detail diff --git a/include/boost/type_traits/is_signed.hpp b/include/boost/type_traits/is_signed.hpp index 9c780b5..1360b11 100755 --- a/include/boost/type_traits/is_signed.hpp +++ b/include/boost/type_traits/is_signed.hpp @@ -11,6 +11,7 @@ #define BOOST_TT_IS_SIGNED_HPP_INCLUDED #include +#include #include #include @@ -26,7 +27,8 @@ namespace detail{ template struct is_signed_helper { - BOOST_STATIC_CONSTANT(bool, value = (static_cast(-1) < 0)); + typedef typename remove_cv::type no_cv_t; + BOOST_STATIC_CONSTANT(bool, value = (static_cast(-1) < 0)); }; template diff --git a/include/boost/type_traits/is_unsigned.hpp b/include/boost/type_traits/is_unsigned.hpp index 7a9f891..67cedc1 100755 --- a/include/boost/type_traits/is_unsigned.hpp +++ b/include/boost/type_traits/is_unsigned.hpp @@ -12,6 +12,7 @@ #include #include +#include #include // should be the last #include @@ -26,7 +27,8 @@ namespace detail{ template struct is_ununsigned_helper { - BOOST_STATIC_CONSTANT(bool, value = (static_cast(-1) > 0)); + typedef typename remove_cv::type no_cv_t; + BOOST_STATIC_CONSTANT(bool, value = (static_cast(-1) > 0)); }; template