diff --git a/doc/is_nothrow_move_assignable.qbk b/doc/is_nothrow_move_assignable.qbk index 5e0edb9..782f2c4 100644 --- a/doc/is_nothrow_move_assignable.qbk +++ b/doc/is_nothrow_move_assignable.qbk @@ -25,7 +25,7 @@ templates, then this template can not be used with function types. Without some (C++11 noexcept shall work correctly) help from the compiler, `is_nothrow_move_assignable` will never report that a class or struct has a non-throwing assignment-operator; this is always safe, if possibly sub-optimal. -Currently (February 2013) Clang and GCC 4.7 have the necessary compiler support to ensure that this +Currently (June 2015) MSVC-12.0, Clang and GCC 4.7 have the necessary compiler support to ensure that this trait "just works". __header ` #include ` or ` #include ` diff --git a/doc/is_nothrow_move_constructible.qbk b/doc/is_nothrow_move_constructible.qbk index 863054b..533f4fc 100644 --- a/doc/is_nothrow_move_constructible.qbk +++ b/doc/is_nothrow_move_constructible.qbk @@ -19,13 +19,10 @@ must be a complete type. In other words, inherits from __true_type only if expression `T(std::move(variable1))` won't throw (`variable1` is a variable of type `T`). -__compat If the compiler does not support partial-specialization of class -templates, then this template can not be used with function types. - -Without some (C++11 noexcept shall work correctly) help from the compiler, +__compat Without some (C++11 noexcept shall work correctly) help from the compiler, `is_nothrow_move_constructible` will never report that a class or struct has a non-throwing copy-constructor; this is always safe, if possibly sub-optimal. -Currently (February 2013) Clang and GCC 4.7 have the necessary compiler support to ensure that this +Currently (February 2013) MSVC-12.0, Clang and GCC 4.7 have the necessary compiler support to ensure that this trait "just works". __header ` #include ` or ` #include ` diff --git a/doc/is_object.qbk b/doc/is_object.qbk index 4f14c44..8d9e85c 100644 --- a/doc/is_object.qbk +++ b/doc/is_object.qbk @@ -16,6 +16,8 @@ references, void, and function types. __std_ref 3.9p9. +[all_compilers] + __header ` #include ` or ` #include ` __examples diff --git a/doc/is_pod.qbk b/doc/is_pod.qbk index 1c36dc7..43aff17 100644 --- a/doc/is_pod.qbk +++ b/doc/is_pod.qbk @@ -23,13 +23,10 @@ still a POD, as is an array of PODs. __std_ref 3.9p10 and 9p4 (Note that POD's are also aggregates, see 8.5.1). -__compat If the compiler does not support partial-specialization -of class templates, then this template can not be used with function types. - -Without some (as yet unspecified) help from the compiler, is_pod will +__compat Without some (as yet unspecified) help from the compiler, is_pod will never report that a class or struct is a POD; this is always safe, if possibly sub-optimal. -Currently (May 2011) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0, +Currently (June 2015) compilers more recent than Visual C++ 8, Clang-3, GCC-4.3, Greenhills 6.0, Intel-11.0, and Codegear have the necessary compiler __intrinsics to ensure that this trait "just works". You may also test to see if the necessary __intrinsics are available by checking to see if the macro `BOOST_IS_POD` is defined. diff --git a/doc/is_pointer.qbk b/doc/is_pointer.qbk index da57229..2afa4c3 100644 --- a/doc/is_pointer.qbk +++ b/doc/is_pointer.qbk @@ -17,6 +17,8 @@ __std_ref 3.9.2p2 and 8.3.1. __header ` #include ` or ` #include ` +[all_compilers] + __examples [:`is_pointer` inherits from `__true_type`.] diff --git a/doc/is_reference.qbk b/doc/is_reference.qbk index baf6bf4..253846b 100644 --- a/doc/is_reference.qbk +++ b/doc/is_reference.qbk @@ -15,10 +15,7 @@ otherwise inherits from __false_type. __std_ref 3.9.2 and 8.3.2. -__compat If the compiler does not -support partial-specialization of class templates, -then this template may report the wrong result for function types, -and for types that are both const and volatile qualified. +[all_compilers] __header ` #include ` or ` #include ` diff --git a/doc/is_rvalue_reference.qbk b/doc/is_rvalue_reference.qbk index edf0964..975e156 100644 --- a/doc/is_rvalue_reference.qbk +++ b/doc/is_rvalue_reference.qbk @@ -15,10 +15,7 @@ otherwise inherits from __false_type. __std_ref 3.9.2 and 8.3.2. -__compat If the compiler does not -support partial-specialization of class templates, -then this template may report the wrong result for function types, -and for types that are both const and volatile qualified. +[all_compilers] __header ` #include ` or ` #include ` diff --git a/doc/is_same.qbk b/doc/is_same.qbk index d054988..ed931c1 100644 --- a/doc/is_same.qbk +++ b/doc/is_same.qbk @@ -14,8 +14,8 @@ __true_type, otherwise inherits from __false_type. __header ` #include ` or ` #include ` -__compat If the compiler does not support partial-specialization of class templates, -then this template can not be used with abstract, incomplete or function types. +[all_compilers] + __examples diff --git a/doc/is_scalar.qbk b/doc/is_scalar.qbk index 4ec966c..745f483 100644 --- a/doc/is_scalar.qbk +++ b/doc/is_scalar.qbk @@ -17,8 +17,7 @@ __std_ref 3.9p10. __header ` #include ` or ` #include ` -__compat If the compiler does not support partial-specialization of class templates, -then this template can not be used with function types. +[all_compilers] __examples diff --git a/doc/is_signed.qbk b/doc/is_signed.qbk index 8d43c91..64d7184 100644 --- a/doc/is_signed.qbk +++ b/doc/is_signed.qbk @@ -16,6 +16,8 @@ otherwise inherits from __false_type. __std_ref 3.9.1, 7.2. +[all_compilers] + __header ` #include ` or ` #include ` __examples diff --git a/doc/is_stateless.qbk b/doc/is_stateless.qbk index d2de82f..58f460d 100644 --- a/doc/is_stateless.qbk +++ b/doc/is_stateless.qbk @@ -28,13 +28,10 @@ __std_ref 3.9p10. __header ` #include ` or ` #include ` -__compat If the compiler does not support partial-specialization of class templates, -then this template can not be used with function types. - -Without some (as yet unspecified) help from the compiler, is_stateless will never +__compat Without some (as yet unspecified) help from the compiler, is_stateless will never report that a class or struct is stateless; this is always safe, if possibly sub-optimal. -Currently (May 2011) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0, +Currently (June 2015) compilers more recent than Visual C++ 8, Clang, GCC-4.3, Greenhills 6.0, Intel-11.0, and Codegear have the necessary compiler __intrinsics to ensure that this trait "just works". diff --git a/doc/is_union.qbk b/doc/is_union.qbk index e8203b7..c21ca22 100644 --- a/doc/is_union.qbk +++ b/doc/is_union.qbk @@ -20,7 +20,7 @@ compiler, we cannot distinguish between union and class types using only standar as a result this type will never inherit from __true_type, unless the user explicitly specializes the template for their user-defined union types, or unless the compiler supplies some unspecified intrinsic that implements this functionality. -Currently (May 2011) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0, +Currently (June 2015) compilers more recent than Visual C++ 8, clang, GCC-4.3, Greenhills 6.0, Intel-11.0, and Codegear have the necessary compiler __intrinsics to ensure that this trait "just works". You may also test to see if the necessary __intrinsics are available by checking to see if the macro `BOOST_IS_UNION` is defined. diff --git a/doc/is_unsigned.qbk b/doc/is_unsigned.qbk index adf1926..a6366ae 100644 --- a/doc/is_unsigned.qbk +++ b/doc/is_unsigned.qbk @@ -16,6 +16,8 @@ otherwise inherits from __false_type. __std_ref 3.9.1, 7.2. +[all_compilers] + __header ` #include ` or ` #include ` __examples diff --git a/doc/is_virtual_base_of.qbk b/doc/is_virtual_base_of.qbk index e229bc5..0c52d57 100644 --- a/doc/is_virtual_base_of.qbk +++ b/doc/is_virtual_base_of.qbk @@ -18,12 +18,13 @@ __std_ref 10. __header ` #include ` or ` #include ` -__compat this trait also requires a working __is_base_of trait. +[all_compilers] [note There are a small number of cases where it's simply not possible for this trait to work, and -where attempting to instantiate the trait will cause compiler errors (see bug report -[@https://svn.boost.org/trac/boost/ticket/3730 #3730]). Further more the issues may well +where attempting to instantiate the trait will cause compiler errors (see bug reports +[@https://svn.boost.org/trac/boost/ticket/3730 #3730] and [@https://svn.boost.org/trac/boost/ticket/11323 11323]). +Further more the issues may well be compiler specific. In this situation the user should supply a full specialization of the trait to work around the problem.] diff --git a/doc/is_void.qbk b/doc/is_void.qbk index b99e586..7415371 100644 --- a/doc/is_void.qbk +++ b/doc/is_void.qbk @@ -14,6 +14,8 @@ otherwise inherits from __false_type. __std_ref 3.9.1p9. +[all_compilers] + __header ` #include ` or ` #include ` __examples diff --git a/doc/is_volatile.qbk b/doc/is_volatile.qbk index 4ce311a..f835100 100644 --- a/doc/is_volatile.qbk +++ b/doc/is_volatile.qbk @@ -14,6 +14,8 @@ otherwise inherits from __false_type. __std_ref 3.9.3. +[all_compilers] + __header ` #include ` or ` #include ` __examples diff --git a/doc/make_signed.qbk b/doc/make_signed.qbk index 87fa3ac..cba7b19 100644 --- a/doc/make_signed.qbk +++ b/doc/make_signed.qbk @@ -26,6 +26,8 @@ bool. __std_ref 3.9.1. +[all_compilers] + __header ` #include ` or ` #include ` [table Examples diff --git a/doc/make_unsigned.qbk b/doc/make_unsigned.qbk index cd9bd76..2e6cb41 100644 --- a/doc/make_unsigned.qbk +++ b/doc/make_unsigned.qbk @@ -26,6 +26,8 @@ bool. __std_ref 3.9.1. +[all_compilers] + __header ` #include ` or ` #include ` [table Examples diff --git a/doc/promote.qbk b/doc/promote.qbk index 3ed5c6f..0ce8370 100644 --- a/doc/promote.qbk +++ b/doc/promote.qbk @@ -20,6 +20,8 @@ __integral_promotion and __floating_point_promotion. __std_ref 4.5 except 4.5/3 (integral bit-field) and 4.6. +[all_compilers] + __header ` #include ` or ` #include ` [table Examples diff --git a/doc/rank.qbk b/doc/rank.qbk index 984a604..4268635 100644 --- a/doc/rank.qbk +++ b/doc/rank.qbk @@ -14,6 +14,8 @@ where `RANK(T)` is the number of array dimensions in type `T`. If `T` is not a (built-in) array type, then `RANK(T)` is zero. +[all_compilers] + __header ` #include ` or ` #include ` __examples diff --git a/doc/remove_all_extents.qbk b/doc/remove_all_extents.qbk index 3ab9899..be9d309 100644 --- a/doc/remove_all_extents.qbk +++ b/doc/remove_all_extents.qbk @@ -18,9 +18,7 @@ leaves `T` unchanged. __std_ref 8.3.4. -__compat If the compiler does not support partial specialization of class-templates -then this template will compile, but the member `type` will always be the same as -type `T` except where __transform_workaround have been applied. +[all_compilers] __header ` #include ` or ` #include ` diff --git a/doc/remove_const.qbk b/doc/remove_const.qbk index 9e24aa5..ea3b7e1 100644 --- a/doc/remove_const.qbk +++ b/doc/remove_const.qbk @@ -17,9 +17,7 @@ __type The same type as `T`, but with any /top level/ const-qualifier removed. __std_ref 3.9.3. -__compat If the compiler does not support partial specialization of class-templates -then this template will compile, but the member `type` will always be the same as -type `T` except where __transform_workaround have been applied. +[all_compilers] __header ` #include ` or ` #include ` diff --git a/doc/remove_cv.qbk b/doc/remove_cv.qbk index 23c342c..c7a296b 100644 --- a/doc/remove_cv.qbk +++ b/doc/remove_cv.qbk @@ -17,9 +17,7 @@ __type The same type as `T`, but with any /top level/ cv-qualifiers removed. __std_ref 3.9.3. -__compat If the compiler does not support partial specialization of class-templates -then this template will compile, but the member `type` will always be the same as -type `T` except where __transform_workaround have been applied. +[all_compilers] __header ` #include ` or ` #include ` diff --git a/doc/remove_extent.qbk b/doc/remove_extent.qbk index 445af02..fe5f3f1 100644 --- a/doc/remove_extent.qbk +++ b/doc/remove_extent.qbk @@ -18,9 +18,7 @@ otherwise leaves `T` unchanged. __std_ref 8.3.4. -__compat If the compiler does not support partial specialization of class-templates -then this template will compile, but the member `type` will always be the same as -type `T` except where __transform_workaround have been applied. +[all_compilers] __header ` #include ` or ` #include ` diff --git a/doc/remove_pointer.qbk b/doc/remove_pointer.qbk index 0504252..7f0af89 100644 --- a/doc/remove_pointer.qbk +++ b/doc/remove_pointer.qbk @@ -18,9 +18,7 @@ removing the pointer decoration would result in an invalid type. __std_ref 8.3.1. -__compat If the compiler does not support partial specialization of class-templates -then this template will compile, but the member `type` will always be the same as -type `T` except where __transform_workaround have been applied. +[all_compilers] __header ` #include ` or ` #include ` diff --git a/doc/remove_reference.qbk b/doc/remove_reference.qbk index 1ed0b96..a8af148 100644 --- a/doc/remove_reference.qbk +++ b/doc/remove_reference.qbk @@ -17,9 +17,7 @@ __type The same type as `T`, but with any reference modifier removed. __std_ref 8.3.2. -__compat If the compiler does not support partial specialization of class-templates -then this template will compile, but the member `type` will always be the same as -type `T` except where __transform_workaround have been applied. +[all_compilers] __header ` #include ` or ` #include ` diff --git a/doc/remove_volatile.qbk b/doc/remove_volatile.qbk index e63beb6..822661e 100644 --- a/doc/remove_volatile.qbk +++ b/doc/remove_volatile.qbk @@ -17,9 +17,7 @@ __type The same type as `T`, but with any /top level/ volatile-qualifier removed __std_ref 3.9.3. -__compat If the compiler does not support partial specialization of class-templates -then this template will compile, but the member `type` will always be the same as -type `T` except where __transform_workaround have been applied. +[all_compilers] __header ` #include ` or ` #include ` diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 2b6928e..8dd1891 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -29,7 +29,7 @@ rule all-tests { { result += [ run $(source) ] ; } - for local source in has_nothrow_assign_test has_nothrow_constr_test has_nothrow_copy_test + for local source in has_nothrow_assign_test has_nothrow_constr_test has_nothrow_copy_test is_nothrow_move_assignable_test is_nothrow_move_constructible_test { result += [ run $(source).cpp : : : BOOST_TT_DISABLE_INTRINSICS : $(source)_no_intrinsics ] ; } diff --git a/test/has_nothrow_copy_test.cpp b/test/has_nothrow_copy_test.cpp index a389abd..034cb65 100644 --- a/test/has_nothrow_copy_test.cpp +++ b/test/has_nothrow_copy_test.cpp @@ -34,7 +34,7 @@ struct delete_copy struct noexcept_copy { noexcept_copy(); - noexcept_copy& operator=(const non_copy&)noexcept; + noexcept_copy& operator=(const noexcept_copy&)noexcept; }; #endif diff --git a/test/is_nothrow_move_assignable_test.cpp b/test/is_nothrow_move_assignable_test.cpp index 9240a0e..ada0484 100644 --- a/test/is_nothrow_move_assignable_test.cpp +++ b/test/is_nothrow_move_assignable_test.cpp @@ -13,6 +13,33 @@ # include #endif +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct non_assignable +{ + non_assignable(); + non_assignable& operator=(const non_assignable&) = delete; +}; + +#endif + +#ifndef BOOST_NO_CXX11_NOEXCEPT + +struct noexcept_assignable +{ + noexcept_assignable(); + noexcept_assignable& operator=(const non_assignable&)noexcept; +}; + +struct noexcept_move_assignable +{ + noexcept_move_assignable(); + noexcept_move_assignable& operator=(const noexcept_move_assignable&); + noexcept_move_assignable& operator=(noexcept_move_assignable&&)noexcept; +}; + +#endif + TT_TEST_BEGIN(is_nothrow_move_assignable) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value, true); @@ -214,6 +241,14 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value, false); +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value, false); +#endif +#ifndef BOOST_NO_CXX11_NOEXCEPT +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_assignable::value, true); +#endif + TT_TEST_END diff --git a/test/is_nothrow_move_constructible_test.cpp b/test/is_nothrow_move_constructible_test.cpp index 7a196ed..d756edc 100644 --- a/test/is_nothrow_move_constructible_test.cpp +++ b/test/is_nothrow_move_constructible_test.cpp @@ -14,6 +14,40 @@ # include #endif +struct non_copy +{ + non_copy(); +private: + non_copy(const non_copy&); +}; + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS + +struct delete_copy +{ + delete_copy(); + delete_copy(const delete_copy&) = delete; +}; + +#endif + +#ifndef BOOST_NO_CXX11_NOEXCEPT + +struct noexcept_copy +{ + noexcept_copy(); + noexcept_copy(const noexcept_copy&)noexcept; +}; + +struct noexcept_move +{ + noexcept_move(); + noexcept_move(const noexcept_move&); + noexcept_move(noexcept_move&&)noexcept; +}; + +#endif + TT_TEST_BEGIN(is_nothrow_move_constructible) BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, true); @@ -211,6 +245,17 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, false); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, false); + +#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, false); +#endif + +#ifndef BOOST_NO_CXX11_NOEXCEPT +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_nothrow_move_constructible::value, true); +#endif + TT_TEST_END