diff --git a/doc/html/index/s11.html b/doc/html/index/s11.html index 7234df8..21f2f0c 100644 --- a/doc/html/index/s11.html +++ b/doc/html/index/s11.html @@ -24,7 +24,7 @@

-Class Index

+Class Index

A C D E F H I M N O P R T

@@ -157,6 +157,7 @@
  • has_multiplies_assign

  • has_negate

  • has_new_operator

  • +
  • has_nothrow_assign

  • has_nothrow_constructor

  • has_nothrow_copy

  • diff --git a/doc/html/index/s12.html b/doc/html/index/s12.html index 03377cc..11c8909 100644 --- a/doc/html/index/s12.html +++ b/doc/html/index/s12.html @@ -24,7 +24,7 @@
  • -Typedef Index

    +Typedef Index

    F R T V

    diff --git a/doc/html/index/s13.html b/doc/html/index/s13.html index d0133d9..b68627b 100644 --- a/doc/html/index/s13.html +++ b/doc/html/index/s13.html @@ -24,7 +24,7 @@

    -Macro Index

    +Macro Index

    B

    diff --git a/doc/html/index/s14.html b/doc/html/index/s14.html index c0640fc..a0aa114 100644 --- a/doc/html/index/s14.html +++ b/doc/html/index/s14.html @@ -23,7 +23,7 @@

    -Index

    +Index

    A B C D E F H I M N O P R T U V

    @@ -204,10 +204,6 @@
    • -

      check

      - -
    • -
    • common_type

      • common_type

      • @@ -517,7 +513,10 @@
      • has_new_operator

      • has_nothrow_assign

        - +
      • has_nothrow_constructor

        @@ -856,7 +855,6 @@

        Operator Type Traits

        • any

        • -
        • check

        • dont_care

        • has_equal_to

        • has_operator

        • diff --git a/include/boost/type_traits/add_reference.hpp b/include/boost/type_traits/add_reference.hpp index 526f259..3c91415 100644 --- a/include/boost/type_traits/add_reference.hpp +++ b/include/boost/type_traits/add_reference.hpp @@ -49,9 +49,9 @@ template struct add_reference // these full specialisations are always required: template <> struct add_reference { typedef void type; }; #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -template <> struct add_reference { typedef void type; }; -template <> struct add_reference { typedef void type; }; -template <> struct add_reference { typedef void type; }; +template <> struct add_reference { typedef const void type; }; +template <> struct add_reference { typedef const volatile void type; }; +template <> struct add_reference { typedef volatile void type; }; #endif } // namespace boost diff --git a/include/boost/type_traits/common_type.hpp b/include/boost/type_traits/common_type.hpp index 5c4303b..c887a89 100644 --- a/include/boost/type_traits/common_type.hpp +++ b/include/boost/type_traits/common_type.hpp @@ -12,6 +12,7 @@ #include #include #include +#include #if defined(BOOST_NO_CXX11_DECLTYPE) #include diff --git a/include/boost/type_traits/detail/common_arithmetic_type.hpp b/include/boost/type_traits/detail/common_arithmetic_type.hpp index 7211002..8c09158 100644 --- a/include/boost/type_traits/detail/common_arithmetic_type.hpp +++ b/include/boost/type_traits/detail/common_arithmetic_type.hpp @@ -35,12 +35,16 @@ template<> struct arithmetic_type<2> typedef char (&result_type) [2]; }; +#ifndef BOOST_NO_INTRINSIC_WCHAR_T + template<> struct arithmetic_type<3> { typedef wchar_t type; typedef char (&result_type) [3]; }; +#endif + // There are five standard signed integer types: // “signed char”, “short int”, “int”, “long int”, and “long long int”. @@ -170,7 +174,9 @@ private: static arithmetic_type<1>::result_type select( arithmetic_type<1>::type ); static arithmetic_type<2>::result_type select( arithmetic_type<2>::type ); +#ifndef BOOST_NO_INTRINSIC_WCHAR_T static arithmetic_type<3>::result_type select( arithmetic_type<3>::type ); +#endif static arithmetic_type<4>::result_type select( arithmetic_type<4>::type ); static arithmetic_type<5>::result_type select( arithmetic_type<5>::type ); static arithmetic_type<6>::result_type select( arithmetic_type<6>::type ); diff --git a/include/boost/type_traits/detail/mp_defer.hpp b/include/boost/type_traits/detail/mp_defer.hpp index 7910e54..f3beeb2 100644 --- a/include/boost/type_traits/detail/mp_defer.hpp +++ b/include/boost/type_traits/detail/mp_defer.hpp @@ -25,12 +25,12 @@ template class F, class... T> struct mp_valid_impl { template class G, class = G> - static boost::true_type check(int); + static boost::true_type check_s(int); template class> - static boost::false_type check(...); + static boost::false_type check_s(...); - using type = decltype(check(0)); + using type = decltype(check_s(0)); }; template class F, class... T> diff --git a/include/boost/type_traits/is_default_constructible.hpp b/include/boost/type_traits/is_default_constructible.hpp index 7fd63f8..0b7d960 100644 --- a/include/boost/type_traits/is_default_constructible.hpp +++ b/include/boost/type_traits/is_default_constructible.hpp @@ -12,6 +12,10 @@ #include #include +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) +#include +#endif + #if !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500) #include @@ -28,10 +32,25 @@ namespace boost{ template static boost::type_traits::no_type test(...); }; - +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) + template + struct is_default_constructible_abstract_filter + { + static const bool value = sizeof(is_default_constructible_imp::test(0)) == sizeof(boost::type_traits::yes_type); + }; + template + struct is_default_constructible_abstract_filter + { + static const bool value = false; + }; +#endif } +#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) + template struct is_default_constructible : public integral_constant::value>::value>{}; +#else template struct is_default_constructible : public integral_constant(0)) == sizeof(boost::type_traits::yes_type)>{}; +#endif template struct is_default_constructible : public is_default_constructible{}; template struct is_default_constructible : public is_default_constructible{}; template struct is_default_constructible : public integral_constant{}; diff --git a/include/boost/type_traits/is_nothrow_move_assignable.hpp b/include/boost/type_traits/is_nothrow_move_assignable.hpp index 9755430..4fb5bd8 100644 --- a/include/boost/type_traits/is_nothrow_move_assignable.hpp +++ b/include/boost/type_traits/is_nothrow_move_assignable.hpp @@ -33,7 +33,7 @@ template struct is_nothrow_move_assignable : public false_type{}; template struct is_nothrow_move_assignable : public false_type{}; #endif -#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) +#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) namespace detail{ diff --git a/include/boost/type_traits/is_nothrow_move_constructible.hpp b/include/boost/type_traits/is_nothrow_move_constructible.hpp index 8f4cee2..4c8f734 100644 --- a/include/boost/type_traits/is_nothrow_move_constructible.hpp +++ b/include/boost/type_traits/is_nothrow_move_constructible.hpp @@ -26,7 +26,7 @@ struct is_nothrow_move_constructible : public integral_constant struct is_nothrow_move_constructible : public ::boost::false_type {}; template struct is_nothrow_move_constructible : public ::boost::false_type{}; -#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) +#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800) #include #include diff --git a/test/add_lvalue_reference_test.cpp b/test/add_lvalue_reference_test.cpp index 1a9c1cb..0dd1af1 100644 --- a/test/add_lvalue_reference_test.cpp +++ b/test/add_lvalue_reference_test.cpp @@ -52,7 +52,12 @@ TT_TEST_BEGIN(add_lvalue_reference) add_lvalue_reference_test_13a(); #endif -TT_TEST_END + BOOST_CHECK_TYPE(tt::add_lvalue_reference::type, void); + BOOST_CHECK_TYPE(tt::add_lvalue_reference::type, const void); + BOOST_CHECK_TYPE(tt::add_lvalue_reference::type, const volatile void); + BOOST_CHECK_TYPE(tt::add_lvalue_reference::type, volatile void); + + TT_TEST_END diff --git a/test/add_reference_test.cpp b/test/add_reference_test.cpp index 458ceb5..35cf76c 100644 --- a/test/add_reference_test.cpp +++ b/test/add_reference_test.cpp @@ -52,6 +52,11 @@ TT_TEST_BEGIN(add_reference) add_reference_test_13a(); #endif + BOOST_CHECK_TYPE(tt::add_reference::type, void); + BOOST_CHECK_TYPE(tt::add_reference::type, const void); + BOOST_CHECK_TYPE(tt::add_reference::type, const volatile void); + BOOST_CHECK_TYPE(tt::add_reference::type, volatile void); + TT_TEST_END diff --git a/test/add_rvalue_reference_test.cpp b/test/add_rvalue_reference_test.cpp index 92c6cc8..caa2869 100644 --- a/test/add_rvalue_reference_test.cpp +++ b/test/add_rvalue_reference_test.cpp @@ -69,6 +69,11 @@ TT_TEST_BEGIN(add_rvalue_reference) add_rvalue_reference_test_13a(); #endif + BOOST_CHECK_TYPE(tt::add_rvalue_reference::type, void); + BOOST_CHECK_TYPE(tt::add_rvalue_reference::type, const void); + BOOST_CHECK_TYPE(tt::add_rvalue_reference::type, const volatile void); + BOOST_CHECK_TYPE(tt::add_rvalue_reference::type, volatile void); + TT_TEST_END diff --git a/test/is_default_constr_test.cpp b/test/is_default_constr_test.cpp index 89444b3..acc09ac 100644 --- a/test/is_default_constr_test.cpp +++ b/test/is_default_constr_test.cpp @@ -198,7 +198,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible:: #ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible::value, false); #endif +#if !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_default_constructible::value, false); +#endif TT_TEST_END