From ee29b7660f3495f9f7d35ac4080515b03e4d5a1b Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 10 Mar 2011 16:52:00 +0000 Subject: [PATCH] Change is_convertible to use C++0x behaviour where possible. Change is_converible to use MSVC __is_convertible intrinsic. Fixes #5271. Fixes #4530. [SVN r69822] --- doc/history.qbk | 7 +++ doc/html/boost_typetraits/background.html | 17 +++--- doc/html/boost_typetraits/category.html | 1 - .../boost_typetraits/category/alignment.html | 1 - .../boost_typetraits/category/function.html | 1 - .../boost_typetraits/category/transform.html | 3 +- .../category/value_traits.html | 1 - .../category/value_traits/primary.html | 1 - .../category/value_traits/properties.html | 1 - .../category/value_traits/relate.html | 1 - doc/html/boost_typetraits/credits.html | 1 - doc/html/boost_typetraits/examples.html | 1 - doc/html/boost_typetraits/examples/copy.html | 1 - .../boost_typetraits/examples/destruct.html | 1 - doc/html/boost_typetraits/examples/fill.html | 1 - .../examples/improved_min.html | 1 - doc/html/boost_typetraits/examples/iter.html | 1 - .../boost_typetraits/examples/to_double.html | 1 - doc/html/boost_typetraits/history.html | 21 +++++-- doc/html/boost_typetraits/intrinsics.html | 1 - doc/html/boost_typetraits/intro.html | 1 - doc/html/boost_typetraits/mpl.html | 1 - doc/html/boost_typetraits/reference.html | 1 - .../boost_typetraits/reference/add_const.html | 1 - .../boost_typetraits/reference/add_cv.html | 1 - .../reference/add_lvalue_reference.html | 1 - .../reference/add_pointer.html | 1 - .../reference/add_reference.html | 1 - .../reference/add_rvalue_reference.html | 1 - .../reference/add_volatile.html | 1 - .../reference/aligned_storage.html | 1 - .../reference/alignment_of.html | 1 - .../reference/common_type.html | 15 +++-- .../reference/conditional.html | 1 - .../boost_typetraits/reference/decay.html | 1 - .../boost_typetraits/reference/extent.html | 1 - .../reference/floating_point_promotion.html | 1 - .../reference/function_traits.html | 1 - .../reference/has_new_operator.html | 1 - .../reference/has_no_throw_def_cons.html | 1 - .../reference/has_nothrow_assign.html | 1 - .../reference/has_nothrow_constructor.html | 1 - .../reference/has_nothrow_copy.html | 1 - .../reference/has_nothrow_cp_cons.html | 1 - .../reference/has_trivial_assign.html | 1 - .../reference/has_trivial_constructor.html | 1 - .../reference/has_trivial_copy.html | 1 - .../reference/has_trivial_cp_cons.html | 1 - .../reference/has_trivial_def_cons.html | 1 - .../reference/has_trivial_destructor.html | 1 - .../reference/has_virtual_destructor.html | 1 - .../reference/integral_constant.html | 1 - .../reference/integral_promotion.html | 1 - .../reference/is_abstract.html | 1 - .../reference/is_arithmetic.html | 1 - .../boost_typetraits/reference/is_array.html | 1 - .../reference/is_base_of.html | 10 ++-- .../boost_typetraits/reference/is_class.html | 1 - .../reference/is_complex.html | 1 - .../reference/is_compound.html | 1 - .../boost_typetraits/reference/is_const.html | 1 - .../reference/is_convertible.html | 3 +- .../boost_typetraits/reference/is_empty.html | 1 - .../boost_typetraits/reference/is_enum.html | 1 - .../reference/is_floating_point.html | 1 - .../reference/is_function.html | 1 - .../reference/is_fundamental.html | 1 - .../reference/is_integral.html | 1 - .../reference/is_lvalue_reference.html | 1 - .../reference/is_member_function_pointer.html | 1 - .../reference/is_member_object_pointer.html | 1 - .../reference/is_member_pointer.html | 1 - .../boost_typetraits/reference/is_object.html | 1 - .../boost_typetraits/reference/is_pod.html | 1 - .../reference/is_pointer.html | 1 - .../reference/is_polymorphic.html | 1 - .../reference/is_reference.html | 1 - .../reference/is_rvalue_reference.html | 1 - .../boost_typetraits/reference/is_same.html | 1 - .../boost_typetraits/reference/is_scalar.html | 1 - .../boost_typetraits/reference/is_signed.html | 1 - .../reference/is_stateless.html | 1 - .../boost_typetraits/reference/is_union.html | 1 - .../reference/is_unsigned.html | 1 - .../reference/is_virtual_base_of.html | 1 - .../boost_typetraits/reference/is_void.html | 1 - .../reference/is_volatile.html | 1 - .../reference/make_signed.html | 1 - .../reference/make_unsigned.html | 1 - .../boost_typetraits/reference/promote.html | 1 - doc/html/boost_typetraits/reference/rank.html | 1 - .../reference/remove_all_extents.html | 1 - .../reference/remove_const.html | 1 - .../boost_typetraits/reference/remove_cv.html | 1 - .../reference/remove_extent.html | 1 - .../reference/remove_pointer.html | 1 - .../reference/remove_reference.html | 1 - .../reference/remove_volatile.html | 1 - .../reference/type_with_alignment.html | 1 - doc/html/boost_typetraits/user_defined.html | 1 - doc/html/index.html | 3 +- doc/html/index/s11.html | 3 +- doc/html/index/s12.html | 3 +- doc/html/index/s13.html | 3 +- doc/html/index/s14.html | 3 +- doc/is_base_of.qbk | 9 +-- doc/is_convertible.qbk | 2 +- include/boost/type_traits/intrinsics.hpp | 3 +- include/boost/type_traits/is_convertible.hpp | 25 ++++---- test/common_type_2_test.cpp | 5 ++ test/is_convertible_test.cpp | 59 +++++++++++++++---- 111 files changed, 124 insertions(+), 163 deletions(-) diff --git a/doc/history.qbk b/doc/history.qbk index 43ff333..0cb2ce4 100644 --- a/doc/history.qbk +++ b/doc/history.qbk @@ -7,6 +7,13 @@ [section:history History] +[h4 Boost 1.47.0] + +* [* Breaking change]: changed __is_convertible to C++0x behaviour when possible. +* Fixed issues [@https://svn.boost.org/trac/boost/ticket/5271 #5271], +[@https://svn.boost.org/trac/boost/ticket/4530 #4530]. + + [h4 Boost 1.45.0] * Added new traits __add_rvalue_reference, __add_lvalue_reference and __common_type. diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index add632a..cad28bc 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -1,4 +1,3 @@ - @@ -57,7 +56,7 @@ method available to them.

- + Type Traits

@@ -85,7 +84,7 @@ given.

- + Implementation

@@ -175,7 +174,7 @@ in the default template.

- + Optimized copy

@@ -248,7 +247,7 @@ otherwise it will call the "slow but safe version".

- + Was it worth it?

@@ -380,7 +379,7 @@

- + Pair of References

@@ -598,7 +597,7 @@ easier to maintain and easier to understand.

- + Conclusion

@@ -611,7 +610,7 @@ can be optimal as well as generic.

- + Acknowledgements

@@ -619,7 +618,7 @@ comments when preparing this article.

- + References
    diff --git a/doc/html/boost_typetraits/category.html b/doc/html/boost_typetraits/category.html index 228f739..3809935 100644 --- a/doc/html/boost_typetraits/category.html +++ b/doc/html/boost_typetraits/category.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/category/alignment.html b/doc/html/boost_typetraits/category/alignment.html index c4a43f3..0a07d56 100644 --- a/doc/html/boost_typetraits/category/alignment.html +++ b/doc/html/boost_typetraits/category/alignment.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/category/function.html b/doc/html/boost_typetraits/category/function.html index f98db03..567e397 100644 --- a/doc/html/boost_typetraits/category/function.html +++ b/doc/html/boost_typetraits/category/function.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index 1006b48..9c15b07 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -1,4 +1,3 @@ - @@ -104,7 +103,7 @@ struct remove_volatile;
    - + Broken Compiler Workarounds:
    diff --git a/doc/html/boost_typetraits/category/value_traits.html b/doc/html/boost_typetraits/category/value_traits.html index a9e456b..aacdfb6 100644 --- a/doc/html/boost_typetraits/category/value_traits.html +++ b/doc/html/boost_typetraits/category/value_traits.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/category/value_traits/primary.html b/doc/html/boost_typetraits/category/value_traits/primary.html index 53eedc6..88c8481 100644 --- a/doc/html/boost_typetraits/category/value_traits/primary.html +++ b/doc/html/boost_typetraits/category/value_traits/primary.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/category/value_traits/properties.html b/doc/html/boost_typetraits/category/value_traits/properties.html index e870e41..b212687 100644 --- a/doc/html/boost_typetraits/category/value_traits/properties.html +++ b/doc/html/boost_typetraits/category/value_traits/properties.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/category/value_traits/relate.html b/doc/html/boost_typetraits/category/value_traits/relate.html index d885f05..7aec8fc 100644 --- a/doc/html/boost_typetraits/category/value_traits/relate.html +++ b/doc/html/boost_typetraits/category/value_traits/relate.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/credits.html b/doc/html/boost_typetraits/credits.html index 7754f97..8fa1efa 100644 --- a/doc/html/boost_typetraits/credits.html +++ b/doc/html/boost_typetraits/credits.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/examples.html b/doc/html/boost_typetraits/examples.html index ef277b0..ff51628 100644 --- a/doc/html/boost_typetraits/examples.html +++ b/doc/html/boost_typetraits/examples.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/examples/copy.html b/doc/html/boost_typetraits/examples/copy.html index c5b086c..bdce58c 100644 --- a/doc/html/boost_typetraits/examples/copy.html +++ b/doc/html/boost_typetraits/examples/copy.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/examples/destruct.html b/doc/html/boost_typetraits/examples/destruct.html index 1a891e7..2e7b8ea 100644 --- a/doc/html/boost_typetraits/examples/destruct.html +++ b/doc/html/boost_typetraits/examples/destruct.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/examples/fill.html b/doc/html/boost_typetraits/examples/fill.html index e1696f2..aab0cf1 100644 --- a/doc/html/boost_typetraits/examples/fill.html +++ b/doc/html/boost_typetraits/examples/fill.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/examples/improved_min.html b/doc/html/boost_typetraits/examples/improved_min.html index c927db4..c062ea3 100644 --- a/doc/html/boost_typetraits/examples/improved_min.html +++ b/doc/html/boost_typetraits/examples/improved_min.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/examples/iter.html b/doc/html/boost_typetraits/examples/iter.html index 5085e7c..338d218 100644 --- a/doc/html/boost_typetraits/examples/iter.html +++ b/doc/html/boost_typetraits/examples/iter.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/examples/to_double.html b/doc/html/boost_typetraits/examples/to_double.html index e639aa1..829bd27 100644 --- a/doc/html/boost_typetraits/examples/to_double.html +++ b/doc/html/boost_typetraits/examples/to_double.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/history.html b/doc/html/boost_typetraits/history.html index e9e116b..5d9ff96 100644 --- a/doc/html/boost_typetraits/history.html +++ b/doc/html/boost_typetraits/history.html @@ -1,4 +1,3 @@ - @@ -27,8 +26,22 @@ +
    + + Boost 1.47.0 +
    +
    - + Boost 1.45.0
      @@ -44,7 +57,7 @@
    - + Boost 1.44.0
      @@ -60,7 +73,7 @@
    - + Boost 1.42.0
    • diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html index dcee173..d616d58 100644 --- a/doc/html/boost_typetraits/intrinsics.html +++ b/doc/html/boost_typetraits/intrinsics.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/intro.html b/doc/html/boost_typetraits/intro.html index 5bc4a2a..c825318 100644 --- a/doc/html/boost_typetraits/intro.html +++ b/doc/html/boost_typetraits/intro.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/mpl.html b/doc/html/boost_typetraits/mpl.html index 1b8aca7..9ab019d 100644 --- a/doc/html/boost_typetraits/mpl.html +++ b/doc/html/boost_typetraits/mpl.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference.html b/doc/html/boost_typetraits/reference.html index 6d0f082..bad49b6 100644 --- a/doc/html/boost_typetraits/reference.html +++ b/doc/html/boost_typetraits/reference.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index c39cd96..032e357 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index d83f5f9..038f15b 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/add_lvalue_reference.html b/doc/html/boost_typetraits/reference/add_lvalue_reference.html index 131f565..80ef4f9 100644 --- a/doc/html/boost_typetraits/reference/add_lvalue_reference.html +++ b/doc/html/boost_typetraits/reference/add_lvalue_reference.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index d1fca71..0399722 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index 86727b4..d66c9a6 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/add_rvalue_reference.html b/doc/html/boost_typetraits/reference/add_rvalue_reference.html index 06ea976..11b5a54 100644 --- a/doc/html/boost_typetraits/reference/add_rvalue_reference.html +++ b/doc/html/boost_typetraits/reference/add_rvalue_reference.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index 2cbef17..0f4f782 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/aligned_storage.html b/doc/html/boost_typetraits/reference/aligned_storage.html index bcc47af..4f63b65 100644 --- a/doc/html/boost_typetraits/reference/aligned_storage.html +++ b/doc/html/boost_typetraits/reference/aligned_storage.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/alignment_of.html b/doc/html/boost_typetraits/reference/alignment_of.html index fa4f4cd..866a25e 100644 --- a/doc/html/boost_typetraits/reference/alignment_of.html +++ b/doc/html/boost_typetraits/reference/alignment_of.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/common_type.html b/doc/html/boost_typetraits/reference/common_type.html index a59a850..4d321e4 100644 --- a/doc/html/boost_typetraits/reference/common_type.html +++ b/doc/html/boost_typetraits/reference/common_type.html @@ -1,4 +1,3 @@ - @@ -74,7 +73,7 @@ template arguments is 3.

      - + Configuration macros
      @@ -104,7 +103,7 @@ Otherwise when BOOST_COMMON_TYPE_DONT_USE_TYPEOF is not defined it uses Boost.TypeOf.

      - + Tutorial

      @@ -139,7 +138,7 @@ This is a very useful and broadly applicable utility.

      - + How to get the common type of types with explicit conversions?
      @@ -161,7 +160,7 @@ };
      - + How important is the order of the common_type<> template arguments?
      @@ -241,7 +240,7 @@ A>.

      - + Can the common_type of two types be a third type?
      @@ -268,7 +267,7 @@ B>.

      - + How common_type behaves with pointers?
      @@ -304,7 +303,7 @@ Of course the user can always make this specialization.

      - + Can you explain the pros/cons of common_type against Boost.Typeof?
      diff --git a/doc/html/boost_typetraits/reference/conditional.html b/doc/html/boost_typetraits/reference/conditional.html index cd57451..f2a044b 100644 --- a/doc/html/boost_typetraits/reference/conditional.html +++ b/doc/html/boost_typetraits/reference/conditional.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index 8f03397..ec66715 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/extent.html b/doc/html/boost_typetraits/reference/extent.html index 6d2ae6e..c0bd830 100644 --- a/doc/html/boost_typetraits/reference/extent.html +++ b/doc/html/boost_typetraits/reference/extent.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index 0d8d2ce..747e10b 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/function_traits.html b/doc/html/boost_typetraits/reference/function_traits.html index 29f8828..fbd138f 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/has_new_operator.html b/doc/html/boost_typetraits/reference/has_new_operator.html index c7c8c73..b8e1deb 100644 --- a/doc/html/boost_typetraits/reference/has_new_operator.html +++ b/doc/html/boost_typetraits/reference/has_new_operator.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html index 316ac8e..093e956 100644 --- a/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_no_throw_def_cons.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/has_nothrow_assign.html b/doc/html/boost_typetraits/reference/has_nothrow_assign.html index c9c4b2c..0b37ded 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_assign.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_assign.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html index 80d929a..ab1fc2d 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/has_nothrow_copy.html b/doc/html/boost_typetraits/reference/has_nothrow_copy.html index ef0eddb..116528a 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_copy.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_copy.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html index 148b56a..9f71baa 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/has_trivial_assign.html b/doc/html/boost_typetraits/reference/has_trivial_assign.html index d0c50b5..eac89ef 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_assign.html +++ b/doc/html/boost_typetraits/reference/has_trivial_assign.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/has_trivial_constructor.html b/doc/html/boost_typetraits/reference/has_trivial_constructor.html index 0205c43..152cbae 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_constructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_constructor.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/has_trivial_copy.html b/doc/html/boost_typetraits/reference/has_trivial_copy.html index 9f98228..1325a1c 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_copy.html +++ b/doc/html/boost_typetraits/reference/has_trivial_copy.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html index ad26838..820d3fd 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html index 92d45f0..64b603c 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/has_trivial_destructor.html b/doc/html/boost_typetraits/reference/has_trivial_destructor.html index 5b8af16..8419cec 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_destructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_destructor.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/has_virtual_destructor.html b/doc/html/boost_typetraits/reference/has_virtual_destructor.html index 1198686..b80bf98 100644 --- a/doc/html/boost_typetraits/reference/has_virtual_destructor.html +++ b/doc/html/boost_typetraits/reference/has_virtual_destructor.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/integral_constant.html b/doc/html/boost_typetraits/reference/integral_constant.html index 4b3429a..d6c187f 100644 --- a/doc/html/boost_typetraits/reference/integral_constant.html +++ b/doc/html/boost_typetraits/reference/integral_constant.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/integral_promotion.html b/doc/html/boost_typetraits/reference/integral_promotion.html index 9682256..f4394d4 100644 --- a/doc/html/boost_typetraits/reference/integral_promotion.html +++ b/doc/html/boost_typetraits/reference/integral_promotion.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_abstract.html b/doc/html/boost_typetraits/reference/is_abstract.html index 0574ba0..2ef1fcb 100644 --- a/doc/html/boost_typetraits/reference/is_abstract.html +++ b/doc/html/boost_typetraits/reference/is_abstract.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_arithmetic.html b/doc/html/boost_typetraits/reference/is_arithmetic.html index fb52c94..bc4391d 100644 --- a/doc/html/boost_typetraits/reference/is_arithmetic.html +++ b/doc/html/boost_typetraits/reference/is_arithmetic.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_array.html b/doc/html/boost_typetraits/reference/is_array.html index ddaa49a..9e9ca8a 100644 --- a/doc/html/boost_typetraits/reference/is_array.html +++ b/doc/html/boost_typetraits/reference/is_array.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_base_of.html b/doc/html/boost_typetraits/reference/is_base_of.html index d815752..018938f 100644 --- a/doc/html/boost_typetraits/reference/is_base_of.html +++ b/doc/html/boost_typetraits/reference/is_base_of.html @@ -1,4 +1,3 @@ - @@ -32,17 +31,16 @@

      Inherits: If Base is base class of type - Derived or if both types are the same then inherits from true_type, + Derived or if both types are the same class type then inherits from true_type, otherwise inherits from false_type.

      This template will detect non-public base classes, and ambiguous base classes.

      - Note that is_base_of<X,X> will always inherit from true_type. - This is the case even if X - is not a class type. This is a change in behaviour from Boost-1.33 - in order to track the Technical Report on C++ Library Extensions. + Note that is_base_of<X,X> will inherit from true_type + if X is a class type. This is a change in behaviour from Boost-1.39.0 in + order to track the emerging C++0x standard.

      Types Base and Derived must not be incomplete types. diff --git a/doc/html/boost_typetraits/reference/is_class.html b/doc/html/boost_typetraits/reference/is_class.html index 313d8a2..3a76a48 100644 --- a/doc/html/boost_typetraits/reference/is_class.html +++ b/doc/html/boost_typetraits/reference/is_class.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_complex.html b/doc/html/boost_typetraits/reference/is_complex.html index df16a2c..48f8f4e 100644 --- a/doc/html/boost_typetraits/reference/is_complex.html +++ b/doc/html/boost_typetraits/reference/is_complex.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_compound.html b/doc/html/boost_typetraits/reference/is_compound.html index c20f3f0..5a0713e 100644 --- a/doc/html/boost_typetraits/reference/is_compound.html +++ b/doc/html/boost_typetraits/reference/is_compound.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_const.html b/doc/html/boost_typetraits/reference/is_const.html index 5ecd1a2..b2ba6a9 100644 --- a/doc/html/boost_typetraits/reference/is_const.html +++ b/doc/html/boost_typetraits/reference/is_const.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_convertible.html b/doc/html/boost_typetraits/reference/is_convertible.html index a6a57ee..0d23f0c 100644 --- a/doc/html/boost_typetraits/reference/is_convertible.html +++ b/doc/html/boost_typetraits/reference/is_convertible.html @@ -1,4 +1,3 @@ - @@ -31,7 +30,7 @@ struct is_convertible : public true_type-or-false_type {};

      - Inherits: If an imaginary lvalue of type + Inherits: If an imaginary rvalue of type From is convertible to type To then inherits from true_type, otherwise inherits from false_type. diff --git a/doc/html/boost_typetraits/reference/is_empty.html b/doc/html/boost_typetraits/reference/is_empty.html index 32e1c5a..f79e5d6 100644 --- a/doc/html/boost_typetraits/reference/is_empty.html +++ b/doc/html/boost_typetraits/reference/is_empty.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_enum.html b/doc/html/boost_typetraits/reference/is_enum.html index c405c13..fad1ab1 100644 --- a/doc/html/boost_typetraits/reference/is_enum.html +++ b/doc/html/boost_typetraits/reference/is_enum.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_floating_point.html b/doc/html/boost_typetraits/reference/is_floating_point.html index bda2b1c..208e979 100644 --- a/doc/html/boost_typetraits/reference/is_floating_point.html +++ b/doc/html/boost_typetraits/reference/is_floating_point.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_function.html b/doc/html/boost_typetraits/reference/is_function.html index 1088932..80259f1 100644 --- a/doc/html/boost_typetraits/reference/is_function.html +++ b/doc/html/boost_typetraits/reference/is_function.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_fundamental.html b/doc/html/boost_typetraits/reference/is_fundamental.html index 4a23361..5426d76 100644 --- a/doc/html/boost_typetraits/reference/is_fundamental.html +++ b/doc/html/boost_typetraits/reference/is_fundamental.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_integral.html b/doc/html/boost_typetraits/reference/is_integral.html index fa9e547..0bc3719 100644 --- a/doc/html/boost_typetraits/reference/is_integral.html +++ b/doc/html/boost_typetraits/reference/is_integral.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_lvalue_reference.html b/doc/html/boost_typetraits/reference/is_lvalue_reference.html index 634104f..3d1cf79 100644 --- a/doc/html/boost_typetraits/reference/is_lvalue_reference.html +++ b/doc/html/boost_typetraits/reference/is_lvalue_reference.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_member_function_pointer.html b/doc/html/boost_typetraits/reference/is_member_function_pointer.html index fc1b1aa..83d649e 100644 --- a/doc/html/boost_typetraits/reference/is_member_function_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_function_pointer.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_member_object_pointer.html b/doc/html/boost_typetraits/reference/is_member_object_pointer.html index 49de07f..0566d85 100644 --- a/doc/html/boost_typetraits/reference/is_member_object_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_object_pointer.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_member_pointer.html b/doc/html/boost_typetraits/reference/is_member_pointer.html index b2a3461..09781dc 100644 --- a/doc/html/boost_typetraits/reference/is_member_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_pointer.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_object.html b/doc/html/boost_typetraits/reference/is_object.html index 41c054b..d8b7069 100644 --- a/doc/html/boost_typetraits/reference/is_object.html +++ b/doc/html/boost_typetraits/reference/is_object.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_pod.html b/doc/html/boost_typetraits/reference/is_pod.html index 7efb506..59a698c 100644 --- a/doc/html/boost_typetraits/reference/is_pod.html +++ b/doc/html/boost_typetraits/reference/is_pod.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_pointer.html b/doc/html/boost_typetraits/reference/is_pointer.html index 86c4219..b1c5fcc 100644 --- a/doc/html/boost_typetraits/reference/is_pointer.html +++ b/doc/html/boost_typetraits/reference/is_pointer.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_polymorphic.html b/doc/html/boost_typetraits/reference/is_polymorphic.html index 9b1ed12..a0e9459 100644 --- a/doc/html/boost_typetraits/reference/is_polymorphic.html +++ b/doc/html/boost_typetraits/reference/is_polymorphic.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_reference.html b/doc/html/boost_typetraits/reference/is_reference.html index 146f0a1..8ed01a8 100644 --- a/doc/html/boost_typetraits/reference/is_reference.html +++ b/doc/html/boost_typetraits/reference/is_reference.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_rvalue_reference.html b/doc/html/boost_typetraits/reference/is_rvalue_reference.html index ffabd8f..339a9ce 100644 --- a/doc/html/boost_typetraits/reference/is_rvalue_reference.html +++ b/doc/html/boost_typetraits/reference/is_rvalue_reference.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_same.html b/doc/html/boost_typetraits/reference/is_same.html index c6aced7..5de12a9 100644 --- a/doc/html/boost_typetraits/reference/is_same.html +++ b/doc/html/boost_typetraits/reference/is_same.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_scalar.html b/doc/html/boost_typetraits/reference/is_scalar.html index 623094b..7d935c2 100644 --- a/doc/html/boost_typetraits/reference/is_scalar.html +++ b/doc/html/boost_typetraits/reference/is_scalar.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_signed.html b/doc/html/boost_typetraits/reference/is_signed.html index b5ef201..91dcb58 100644 --- a/doc/html/boost_typetraits/reference/is_signed.html +++ b/doc/html/boost_typetraits/reference/is_signed.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_stateless.html b/doc/html/boost_typetraits/reference/is_stateless.html index f5e804d..fbd994d 100644 --- a/doc/html/boost_typetraits/reference/is_stateless.html +++ b/doc/html/boost_typetraits/reference/is_stateless.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_union.html b/doc/html/boost_typetraits/reference/is_union.html index 930ead7..6906b97 100644 --- a/doc/html/boost_typetraits/reference/is_union.html +++ b/doc/html/boost_typetraits/reference/is_union.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_unsigned.html b/doc/html/boost_typetraits/reference/is_unsigned.html index 9f3d282..be5dbc8 100644 --- a/doc/html/boost_typetraits/reference/is_unsigned.html +++ b/doc/html/boost_typetraits/reference/is_unsigned.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_virtual_base_of.html b/doc/html/boost_typetraits/reference/is_virtual_base_of.html index ece8545..997dae6 100644 --- a/doc/html/boost_typetraits/reference/is_virtual_base_of.html +++ b/doc/html/boost_typetraits/reference/is_virtual_base_of.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_void.html b/doc/html/boost_typetraits/reference/is_void.html index 693c9bc..defa838 100644 --- a/doc/html/boost_typetraits/reference/is_void.html +++ b/doc/html/boost_typetraits/reference/is_void.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/is_volatile.html b/doc/html/boost_typetraits/reference/is_volatile.html index 89d32ef..4556531 100644 --- a/doc/html/boost_typetraits/reference/is_volatile.html +++ b/doc/html/boost_typetraits/reference/is_volatile.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/make_signed.html b/doc/html/boost_typetraits/reference/make_signed.html index b4f48ac..08fd753 100644 --- a/doc/html/boost_typetraits/reference/make_signed.html +++ b/doc/html/boost_typetraits/reference/make_signed.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/make_unsigned.html b/doc/html/boost_typetraits/reference/make_unsigned.html index 06fc250..4df01aa 100644 --- a/doc/html/boost_typetraits/reference/make_unsigned.html +++ b/doc/html/boost_typetraits/reference/make_unsigned.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/promote.html b/doc/html/boost_typetraits/reference/promote.html index 583cdd2..ad566af 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/rank.html b/doc/html/boost_typetraits/reference/rank.html index 3ef6a0e..4ea0d33 100644 --- a/doc/html/boost_typetraits/reference/rank.html +++ b/doc/html/boost_typetraits/reference/rank.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/remove_all_extents.html b/doc/html/boost_typetraits/reference/remove_all_extents.html index afe4b6c..533b83b 100644 --- a/doc/html/boost_typetraits/reference/remove_all_extents.html +++ b/doc/html/boost_typetraits/reference/remove_all_extents.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/remove_const.html b/doc/html/boost_typetraits/reference/remove_const.html index e287106..ce2fa9d 100644 --- a/doc/html/boost_typetraits/reference/remove_const.html +++ b/doc/html/boost_typetraits/reference/remove_const.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/remove_cv.html b/doc/html/boost_typetraits/reference/remove_cv.html index 479335f..607529b 100644 --- a/doc/html/boost_typetraits/reference/remove_cv.html +++ b/doc/html/boost_typetraits/reference/remove_cv.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/remove_extent.html b/doc/html/boost_typetraits/reference/remove_extent.html index fb929fb..cc5d193 100644 --- a/doc/html/boost_typetraits/reference/remove_extent.html +++ b/doc/html/boost_typetraits/reference/remove_extent.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/remove_pointer.html b/doc/html/boost_typetraits/reference/remove_pointer.html index 53c75c6..1569795 100644 --- a/doc/html/boost_typetraits/reference/remove_pointer.html +++ b/doc/html/boost_typetraits/reference/remove_pointer.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/remove_reference.html b/doc/html/boost_typetraits/reference/remove_reference.html index 2dbcf92..16dbcc3 100644 --- a/doc/html/boost_typetraits/reference/remove_reference.html +++ b/doc/html/boost_typetraits/reference/remove_reference.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/remove_volatile.html b/doc/html/boost_typetraits/reference/remove_volatile.html index 63a7942..0954c14 100644 --- a/doc/html/boost_typetraits/reference/remove_volatile.html +++ b/doc/html/boost_typetraits/reference/remove_volatile.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/reference/type_with_alignment.html b/doc/html/boost_typetraits/reference/type_with_alignment.html index e9d7dfa..a9e7401 100644 --- a/doc/html/boost_typetraits/reference/type_with_alignment.html +++ b/doc/html/boost_typetraits/reference/type_with_alignment.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/boost_typetraits/user_defined.html b/doc/html/boost_typetraits/user_defined.html index a6b6660..521f7ac 100644 --- a/doc/html/boost_typetraits/user_defined.html +++ b/doc/html/boost_typetraits/user_defined.html @@ -1,4 +1,3 @@ - diff --git a/doc/html/index.html b/doc/html/index.html index 06eee07..321cc9c 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -1,4 +1,3 @@ - @@ -31,7 +30,7 @@ Marcus, Itay Maman, John Maddock, Alexander Nasonov, Thorsten Ottosen, Robert Ramey and Jeremy Siek

    -

    +

    Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

    diff --git a/doc/html/index/s11.html b/doc/html/index/s11.html index a875e7d..29b619f 100644 --- a/doc/html/index/s11.html +++ b/doc/html/index/s11.html @@ -1,4 +1,3 @@ - @@ -25,7 +24,7 @@

    -Class Index

    +Class Index

A C D E F H I M P R T

diff --git a/doc/html/index/s12.html b/doc/html/index/s12.html index e6e1fe4..371ee9a 100644 --- a/doc/html/index/s12.html +++ b/doc/html/index/s12.html @@ -1,4 +1,3 @@ - @@ -25,7 +24,7 @@

-Typedef Index

+Typedef Index

F R T

diff --git a/doc/html/index/s13.html b/doc/html/index/s13.html index 97c9a37..b415ea9 100644 --- a/doc/html/index/s13.html +++ b/doc/html/index/s13.html @@ -1,4 +1,3 @@ - @@ -25,7 +24,7 @@

-Macro Index

+Macro Index

B

diff --git a/doc/html/index/s14.html b/doc/html/index/s14.html index 66b2729..9bbd960 100644 --- a/doc/html/index/s14.html +++ b/doc/html/index/s14.html @@ -1,4 +1,3 @@ - @@ -24,7 +23,7 @@

-Index

+Index

A B C D E F H I M P R S T U

diff --git a/doc/is_base_of.qbk b/doc/is_base_of.qbk index c74ca6a..6ee3f43 100644 --- a/doc/is_base_of.qbk +++ b/doc/is_base_of.qbk @@ -6,18 +6,19 @@ ] [section:is_base_of is_base_of] + template struct is_base_of : public __tof {}; __inherit If Base is base class of type Derived or if both types are the same -then inherits from __true_type, +class type then inherits from __true_type, otherwise inherits from __false_type. This template will detect non-public base classes, and ambiguous base classes. -Note that `is_base_of` will always inherit from __true_type. [*This is the -case even if `X` is not a class type]. This is a change in behaviour -from Boost-1.33 in order to track the Technical Report on C++ Library Extensions. +Note that `is_base_of` will inherit from __true_type if X is a class type. +This is a change in behaviour +from Boost-1.39.0 in order to track the emerging C++0x standard. Types `Base` and `Derived` must not be incomplete types. diff --git a/doc/is_convertible.qbk b/doc/is_convertible.qbk index d87fccc..ff6acb1 100644 --- a/doc/is_convertible.qbk +++ b/doc/is_convertible.qbk @@ -9,7 +9,7 @@ template struct is_convertible : public __tof {}; -__inherit If an imaginary lvalue of type `From` is convertible to type `To` then +__inherit If an imaginary rvalue of type `From` is convertible to type `To` then inherits from __true_type, otherwise inherits from __false_type. Type From must not be an incomplete type. diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 9666456..00bffda 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -100,8 +100,7 @@ # define BOOST_IS_ABSTRACT(T) __is_abstract(T) # define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) # define BOOST_IS_CLASS(T) __is_class(T) -// This one doesn't quite always do the right thing: -// # define BOOST_IS_CONVERTIBLE(T,U) __is_convertible_to(T,U) +# define BOOST_IS_CONVERTIBLE(T,U) ((__is_convertible_to(T,U) || is_same::value) && !__is_abstract(U)) # define BOOST_IS_ENUM(T) __is_enum(T) // This one doesn't quite always do the right thing: // # define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) diff --git a/include/boost/type_traits/is_convertible.hpp b/include/boost/type_traits/is_convertible.hpp index c05c297..e2b9b87 100644 --- a/include/boost/type_traits/is_convertible.hpp +++ b/include/boost/type_traits/is_convertible.hpp @@ -24,6 +24,7 @@ #ifndef BOOST_NO_IS_ABSTRACT #include #endif +#include #if defined(__MWERKS__) #include @@ -68,7 +69,7 @@ struct does_conversion_exist { static no_type BOOST_TT_DECL _m_check(...); static yes_type BOOST_TT_DECL _m_check(To); - static From _m_from; + static typename add_rvalue_reference::type _m_from; enum { value = sizeof( _m_check(_m_from) ) == sizeof(yes_type) }; }; }; @@ -106,7 +107,7 @@ struct is_convertible_impl static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(T); }; - static From _m_from; + static typename add_rvalue_reference::type _m_from; static bool const value = sizeof( checker::_m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type); #pragma option pop @@ -131,7 +132,7 @@ template struct checker template struct is_convertible_basic_impl { - static From _m_from; + static typename add_rvalue_reference::type _m_from; static bool const value = sizeof( boost::detail::checker::_m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type); }; @@ -161,7 +162,7 @@ struct is_convertible_basic_impl { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); - static From _m_from; + static typename add_rvalue_reference::type _m_from; BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) @@ -185,7 +186,7 @@ struct is_convertible_basic_impl template static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion, float, T); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int, int); - static From _m_from; + static typename add_rvalue_reference::type _m_from; // Static constants sometime cause the conversion of _m_from to To to be // called. This doesn't happen with an enum. @@ -215,7 +216,7 @@ struct is_convertible_basic_impl_aux { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); - static From _m_from; + static typename add_rvalue_reference::type _m_from; BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) @@ -227,7 +228,7 @@ struct is_convertible_basic_impl_aux { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); - static From _m_from; + static typename add_rvalue_reference::type _m_from; BOOST_STATIC_CONSTANT(bool, value = sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) ); @@ -252,7 +253,7 @@ struct is_convertible_basic_impl { static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); - static From _m_from; + static typename add_rvalue_reference::type _m_from; #ifdef BOOST_MSVC #pragma warning(push) #pragma warning(disable:4244) @@ -402,14 +403,14 @@ struct is_convertible_impl_dispatch #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void,To,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,false) #ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const,To,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void volatile,To,false) BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const volatile,To,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,false) #endif #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION diff --git a/test/common_type_2_test.cpp b/test/common_type_2_test.cpp index f878133..c76c2ef 100644 --- a/test/common_type_2_test.cpp +++ b/test/common_type_2_test.cpp @@ -87,6 +87,7 @@ bool declval_bool(){return true;} TT_TEST_BEGIN(common_type) { +#ifndef __SUNPRO_CC assignation_2(); typedef tt::common_type::type T1; typedef tt::common_type::type T2; @@ -105,6 +106,10 @@ TT_TEST_BEGIN(common_type) assignation_3(); assignation_3(); //assignation_3(); // fails because the common type is the third +#endif + + typedef tt::common_type::type t1; + BOOST_CHECK_TYPE(t1, C1C2); BOOST_CHECK_TYPE(tt::common_type::type, int); BOOST_CHECK_TYPE(tt::common_type::type, char); diff --git a/test/is_convertible_test.cpp b/test/is_convertible_test.cpp index e88a2ef..e3c2a2d 100644 --- a/test/is_convertible_test.cpp +++ b/test/is_convertible_test.cpp @@ -11,6 +11,8 @@ #else # include #endif +#include + template struct convertible_from @@ -22,6 +24,37 @@ struct base2 { }; struct middle2 : public virtual base2 { }; struct derived2 : public middle2 { }; +#ifndef BOOST_NO_RVALUE_REFERENCES + +template +struct test_bug_4530 +{ + template + test_bug_4530(A&&, typename boost::enable_if >::type* =0); +}; + +struct A4530 +{ + template + A4530(T); +}; + +#endif + +#ifdef BOOST_MSVC + +struct bug_5271a +{ + __declspec(align(16)) int value; +}; + +struct bug_5271b +{ + __declspec(align(16)) int value; + bug_5271b(int v) : value(v) {} +}; + +#endif TT_TEST_BEGIN(is_convertible) @@ -49,7 +82,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), fals #endif // The following four do not compile without member template support: -BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); @@ -102,7 +135,12 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::valu BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible >::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible >::value), true); -BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible >::value), true); +// +// These two tests give different results with different compilers, we used to require *true* results +// from these, but C++0x behaviour requires *false*: +// +//BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible >::value), false); +//BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible >::value), false); #if !(defined(__GNUC__) && (__GNUC__ < 4)) // GCC 3.x emits warnings here, which causes the tests to fail when we compile with warnings-as-errors: @@ -113,7 +151,6 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible >::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible >::value), true); -BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible >::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible >::value), true); BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible >::value), true); @@ -140,13 +177,15 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<__int64,char>::value), true) BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<__int64,float>::value), true); #endif +#ifndef BOOST_NO_RVALUE_REFERENCES +// Test bug case 4530: +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible,A4530>::value), true); +#endif + +#ifdef BOOST_MSVC +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +#endif TT_TEST_END - - - - - - -