From e1a315e00e8229f7d0bc7dbbb66243f26c9b0c96 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 25 Apr 2011 12:26:48 +0000 Subject: [PATCH] Merge change from Trunk to release. [SVN r71481] --- doc/Jamfile.v2 | 5 +- doc/common_type.qbk | 2 +- doc/conditional.qbk | 2 +- doc/has_nothrow_constructor.qbk | 8 +- doc/has_nothrow_copy.qbk | 6 +- doc/has_trivial_assign.qbk | 9 +- doc/has_trivial_constructor.qbk | 9 +- doc/has_trivial_copy.qbk | 9 +- doc/has_trivial_destructor.qbk | 9 +- doc/has_virtual_destructor.qbk | 8 +- 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 | 19 +- .../reference/conditional.html | 5 +- .../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 | 13 +- .../reference/has_nothrow_copy.html | 11 +- .../reference/has_nothrow_cp_cons.html | 1 - .../reference/has_trivial_assign.html | 11 +- .../reference/has_trivial_constructor.html | 11 +- .../reference/has_trivial_copy.html | 11 +- .../reference/has_trivial_cp_cons.html | 1 - .../reference/has_trivial_def_cons.html | 1 - .../reference/has_trivial_destructor.html | 11 +- .../reference/has_virtual_destructor.html | 10 +- .../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 | 9 +- .../reference/is_complex.html | 1 - .../reference/is_compound.html | 1 - .../boost_typetraits/reference/is_const.html | 1 - .../reference/is_convertible.html | 5 +- .../boost_typetraits/reference/is_empty.html | 4 +- .../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 | 14 +- .../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 | 10 +- .../boost_typetraits/reference/is_union.html | 9 +- .../reference/is_unsigned.html | 1 - .../reference/is_virtual_base_of.html | 9 +- .../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 | 58 +++-- doc/html/index/s14.html | 85 +++++-- doc/is_base_of.qbk | 9 +- doc/is_class.qbk | 6 +- doc/is_convertible.qbk | 4 +- doc/is_empty.qbk | 3 +- doc/is_pod.qbk | 8 +- doc/is_stateless.qbk | 8 +- doc/is_union.qbk | 9 +- doc/is_virtual_base_of.qbk | 5 +- .../type_traits/add_rvalue_reference.hpp | 3 +- include/boost/type_traits/alignment_of.hpp | 2 +- include/boost/type_traits/common_type.hpp | 10 +- .../type_traits/detail/bool_trait_def.hpp | 13 +- .../type_traits/detail/common_type_imp.hpp | 81 +++++-- .../type_traits/detail/cv_traits_impl.hpp | 2 +- .../type_traits/detail/size_t_trait_def.hpp | 6 +- .../type_traits/detail/type_trait_def.hpp | 6 + .../boost/type_traits/has_nothrow_assign.hpp | 16 +- .../type_traits/has_nothrow_constructor.hpp | 24 +- .../boost/type_traits/has_nothrow_copy.hpp | 24 +- .../boost/type_traits/has_trivial_assign.hpp | 17 +- .../type_traits/has_trivial_constructor.hpp | 8 + .../boost/type_traits/has_trivial_copy.hpp | 25 +- .../type_traits/has_trivial_destructor.hpp | 17 +- .../type_traits/has_virtual_destructor.hpp | 4 + .../boost/type_traits/integral_promotion.hpp | 20 +- include/boost/type_traits/intrinsics.hpp | 99 +++----- include/boost/type_traits/is_const.hpp | 4 +- include/boost/type_traits/is_convertible.hpp | 27 +-- include/boost/type_traits/is_empty.hpp | 16 +- include/boost/type_traits/is_enum.hpp | 2 +- include/boost/type_traits/is_function.hpp | 6 +- include/boost/type_traits/is_fundamental.hpp | 2 +- .../is_member_function_pointer.hpp | 4 +- .../boost/type_traits/is_member_pointer.hpp | 4 +- include/boost/type_traits/is_pod.hpp | 14 +- include/boost/type_traits/is_pointer.hpp | 4 +- include/boost/type_traits/is_union.hpp | 8 + .../boost/type_traits/is_virtual_base_of.hpp | 4 +- include/boost/type_traits/is_volatile.hpp | 4 +- include/boost/type_traits/msvc/typeof.hpp | 4 +- include/boost/type_traits/promote.hpp | 2 +- include/boost/type_traits/remove_pointer.hpp | 53 ++++- .../boost/type_traits/type_with_alignment.hpp | 4 +- test/check_type.hpp | 26 +++ test/common_type_2_test.cpp | 217 ++++++++++++++++++ test/common_type_test.cpp | 103 +++++++++ test/has_nothrow_assign_test.cpp | 2 +- test/has_nothrow_constr_test.cpp | 2 +- test/has_nothrow_copy_test.cpp | 2 +- test/has_trivial_assign_test.cpp | 2 +- test/has_trivial_copy_test.cpp | 2 +- test/has_trivial_destructor_test.cpp | 2 +- test/is_convertible_test.cpp | 59 ++++- test/remove_pointer_test.cpp | 7 +- test/test.hpp | 11 + 170 files changed, 1098 insertions(+), 446 deletions(-) mode change 100755 => 100644 include/boost/type_traits/has_virtual_destructor.hpp create mode 100644 test/common_type_2_test.cpp diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index a5ec1c8..096aaeb 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -78,8 +78,9 @@ boostbook standalone pdf:boost.url.prefix=http://www.boost.org/doc/libs/release/libs/type_traits/doc/html ; -#install html : ../../../doc/html/boostbook.css ; -#install ../ : ../../../boost.png ; +install pdf-install : standalone : PDF . type_traits.pdf ; + + diff --git a/doc/common_type.qbk b/doc/common_type.qbk index cc7cf21..1d31ec1 100644 --- a/doc/common_type.qbk +++ b/doc/common_type.qbk @@ -14,7 +14,7 @@ [def __declval [@../../../utility/doc/html/declval.html declval]] -`#include ` +__header ` #include ` or ` #include ` namespace boost { template struct __common_type; diff --git a/doc/conditional.qbk b/doc/conditional.qbk index af72844..a4b867e 100644 --- a/doc/conditional.qbk +++ b/doc/conditional.qbk @@ -10,7 +10,7 @@ [/===================================================================] -`#include ` +__header ` #include ` or ` #include ` namespace boost { template struct __conditional; diff --git a/doc/has_nothrow_constructor.qbk b/doc/has_nothrow_constructor.qbk index 05145e8..e8945cf 100644 --- a/doc/has_nothrow_constructor.qbk +++ b/doc/has_nothrow_constructor.qbk @@ -22,11 +22,13 @@ These two traits are synonyms for each other. __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, +Without some (unspecified) help from the compiler, `has_nothrow_constructor` will never report that a class or struct has a non-throwing default-constructor; this is always safe, if possibly sub-optimal. -Currently (May 2005) only Visual C++ 8 has the necessary compiler __intrinsics to ensure that this -trait "just works". +Currently (May 2011) compilers more recent than Visual C++ 8, 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_HAS_NOTHROW_CONSTRUCTOR` is defined. __header ` #include ` or ` #include ` diff --git a/doc/has_nothrow_copy.qbk b/doc/has_nothrow_copy.qbk index f118c80..c00a5a3 100644 --- a/doc/has_nothrow_copy.qbk +++ b/doc/has_nothrow_copy.qbk @@ -25,8 +25,10 @@ templates, then this template can not be used with function types. Without some (as yet unspecified) help from the compiler, `has_nothrow_copy` will never report that a class or struct has a non-throwing copy-constructor; this is always safe, if possibly sub-optimal. -Currently (May 2005) only Visual C++ 8 has the necessary compiler __intrinsics to ensure that this -trait "just works". +Currently (May 2011) compilers more recent than Visual C++ 8, 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_HAS_NOTHROW_COPY` is defined. __header ` #include ` or ` #include ` diff --git a/doc/has_trivial_assign.qbk b/doc/has_trivial_assign.qbk index 8390175..5ecfc0e 100644 --- a/doc/has_trivial_assign.qbk +++ b/doc/has_trivial_assign.qbk @@ -21,9 +21,12 @@ templates, then this template can not be used with function types. Without some (as yet unspecified) help from the compiler, has_trivial_assign will never report that a user-defined class or struct has a -trivial constructor; this is always safe, if possibly sub-optimal. Currently -(May 2005) only MWCW 9 and Visual C++ 8 have the necessary compiler __intrinsics to detect -user-defined classes with trivial constructors. +trivial constructor; this is always safe, if possibly sub-optimal. +Currently (May 2011) compilers more recent than Visual C++ 8, 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_HAS_TRIVIAL_ASSIGN` is defined. + __std_ref 12.8p11. diff --git a/doc/has_trivial_constructor.qbk b/doc/has_trivial_constructor.qbk index b2385c2..6bf7529 100644 --- a/doc/has_trivial_constructor.qbk +++ b/doc/has_trivial_constructor.qbk @@ -29,9 +29,12 @@ templates, then this template can not be used with function types. Without some (as yet unspecified) help from the compiler, has_trivial_constructor will never report that a user-defined class or struct has a -trivial constructor; this is always safe, if possibly sub-optimal. Currently -(May 2005) only MWCW 9 and Visual C++ 8 have the necessary compiler __intrinsics to detect -user-defined classes with trivial constructors. +trivial constructor; this is always safe, if possibly sub-optimal. +Currently (May 2011) compilers more recent than Visual C++ 8, 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_HAS_TRIVIAL_CONSTRUCTOR` is defined. + __std_ref 12.1p6. diff --git a/doc/has_trivial_copy.qbk b/doc/has_trivial_copy.qbk index 220e79d..42019e4 100644 --- a/doc/has_trivial_copy.qbk +++ b/doc/has_trivial_copy.qbk @@ -27,9 +27,12 @@ templates, then this template can not be used with function types. Without some (as yet unspecified) help from the compiler, has_trivial_copy will never report that a user-defined class or struct has a -trivial constructor; this is always safe, if possibly sub-optimal. Currently -(May 2005) only MWCW 9 and Visual C++ 8 have the necessary compiler __intrinsics to detect -user-defined classes with trivial constructors. +trivial constructor; this is always safe, if possibly sub-optimal. +Currently (May 2011) compilers more recent than Visual C++ 8, 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_HAS_TRIVIAL_COPY` is defined. + __std_ref 12.8p6. diff --git a/doc/has_trivial_destructor.qbk b/doc/has_trivial_destructor.qbk index a15093e..166c092 100644 --- a/doc/has_trivial_destructor.qbk +++ b/doc/has_trivial_destructor.qbk @@ -23,9 +23,12 @@ templates, then this template can not be used with function types. Without some (as yet unspecified) help from the compiler, has_trivial_destructor will never report that a user-defined class or struct has a -trivial destructor; this is always safe, if possibly sub-optimal. Currently -(May 2005) only MWCW 9 and Visual C++ 8 have the necessary compiler __intrinsics to detect -user-defined classes with trivial constructors. +trivial destructor; this is always safe, if possibly sub-optimal. +Currently (May 2011) compilers more recent than Visual C++ 8, 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_HAS_TRIVIAL_DESTRUCTOR` is defined. + __std_ref 12.4p3. diff --git a/doc/has_virtual_destructor.qbk b/doc/has_virtual_destructor.qbk index 018a5a5..5bc3e65 100644 --- a/doc/has_virtual_destructor.qbk +++ b/doc/has_virtual_destructor.qbk @@ -17,8 +17,12 @@ Technical Report on C++ Library Extensions. However, there is currently no way to portably implement this trait. The default version provided always inherits from __false_type, and has to be explicitly specialized for types with virtual destructors unless the compiler used has compiler __intrinsics -that enable the trait to do the right thing: currently (May 2005) only Visual C++ -8 and GCC-4.3 have the necessary __intrinsics. +that enable the trait to do the right thing: +Currently (May 2011) compilers more recent than Visual C++ 8, 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_HAS_VIRTUAL_DESTRUCTOR` is defined. + __std_ref 12.4. 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..97ac3a8 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..b32c4fe 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..0f4d1f7 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..a65cbd6 100644 --- a/doc/html/boost_typetraits/reference/common_type.html +++ b/doc/html/boost_typetraits/reference/common_type.html @@ -1,4 +1,3 @@ - @@ -28,7 +27,9 @@ common_type

- #include <boost/type_traits/common_type.hpp> + Header: #include + <boost/type_traits/common_type.hpp> + or #include <boost/type_traits.hpp>

namespace boost {
   template <class ...T>  struct common_type;
@@ -74,7 +75,7 @@
         template arguments is 3.
       

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

- + Tutorial

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

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

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

- + How common_type behaves with pointers?
@@ -304,7 +305,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..f04fdd7 100644 --- a/doc/html/boost_typetraits/reference/conditional.html +++ b/doc/html/boost_typetraits/reference/conditional.html @@ -1,4 +1,3 @@ - @@ -28,7 +27,9 @@ conditional

- #include <boost/type_traits/conditional.hpp> + Header: #include + <boost/type_traits/conditional.hpp> + or #include <boost/type_traits.hpp>

namespace boost {
   template <bool B, class T, class U>  struct conditional;
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..85f0b1c 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 @@
-
 
 
 
@@ -49,11 +48,15 @@
         can not be used with function types.
       

- Without some (as yet unspecified) help from the compiler, has_nothrow_constructor + Without some (unspecified) help from the compiler, has_nothrow_constructor will never report that a class or struct has a non-throwing default-constructor; - this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual - C++ 8 has the necessary compiler intrinsics - to ensure that this trait "just works". + this is always safe, if possibly sub-optimal. Currently (May 2011) compilers + more recent than Visual C++ 8, 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_HAS_NOTHROW_CONSTRUCTOR + is defined.

Header: #include diff --git a/doc/html/boost_typetraits/reference/has_nothrow_copy.html b/doc/html/boost_typetraits/reference/has_nothrow_copy.html index ef0eddb..62b3606 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 @@ - @@ -51,9 +50,13 @@

Without some (as yet unspecified) help from the compiler, has_nothrow_copy will never report that a class or struct has a non-throwing copy-constructor; - this is always safe, if possibly sub-optimal. Currently (May 2005) only Visual - C++ 8 has the necessary compiler intrinsics - to ensure that this trait "just works". + this is always safe, if possibly sub-optimal. Currently (May 2011) compilers + more recent than Visual C++ 8, 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_HAS_NOTHROW_COPY + is defined.

Header: #include 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..0094a69 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 @@ - @@ -48,9 +47,13 @@

Without some (as yet unspecified) help from the compiler, has_trivial_assign will never report that a user-defined class or struct has a trivial constructor; - this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics - to detect user-defined classes with trivial constructors. + this is always safe, if possibly sub-optimal. Currently (May 2011) compilers + more recent than Visual C++ 8, 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_HAS_TRIVIAL_ASSIGN + is defined.

C++ Standard Reference: 12.8p11. diff --git a/doc/html/boost_typetraits/reference/has_trivial_constructor.html b/doc/html/boost_typetraits/reference/has_trivial_constructor.html index 0205c43..8892c44 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 @@ - @@ -56,9 +55,13 @@

Without some (as yet unspecified) help from the compiler, has_trivial_constructor will never report that a user-defined class or struct has a trivial constructor; - this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics - to detect user-defined classes with trivial constructors. + this is always safe, if possibly sub-optimal. Currently (May 2011) compilers + more recent than Visual C++ 8, 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_HAS_TRIVIAL_CONSTRUCTOR + is defined.

C++ Standard Reference: 12.1p6. diff --git a/doc/html/boost_typetraits/reference/has_trivial_copy.html b/doc/html/boost_typetraits/reference/has_trivial_copy.html index 9f98228..4f37c23 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 @@ - @@ -54,9 +53,13 @@

Without some (as yet unspecified) help from the compiler, has_trivial_copy will never report that a user-defined class or struct has a trivial constructor; - this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics - to detect user-defined classes with trivial constructors. + this is always safe, if possibly sub-optimal. Currently (May 2011) compilers + more recent than Visual C++ 8, 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_HAS_TRIVIAL_COPY + is defined.

C++ Standard Reference: 12.8p6. 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..1e92116 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 @@ - @@ -50,9 +49,13 @@

Without some (as yet unspecified) help from the compiler, has_trivial_destructor will never report that a user-defined class or struct has a trivial destructor; - this is always safe, if possibly sub-optimal. Currently (May 2005) only MWCW - 9 and Visual C++ 8 have the necessary compiler intrinsics - to detect user-defined classes with trivial constructors. + this is always safe, if possibly sub-optimal. Currently (May 2011) compilers + more recent than Visual C++ 8, 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_HAS_TRIVIAL_DESTRUCTOR + is defined.

C++ Standard Reference: 12.4p3. diff --git a/doc/html/boost_typetraits/reference/has_virtual_destructor.html b/doc/html/boost_typetraits/reference/has_virtual_destructor.html index 1198686..c93d4b0 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 @@ - @@ -42,8 +41,13 @@ trait. The default version provided always inherits from false_type, and has to be explicitly specialized for types with virtual destructors unless the compiler used has compiler intrinsics - that enable the trait to do the right thing: currently (May 2005) only Visual - C++ 8 and GCC-4.3 have the necessary intrinsics. + that enable the trait to do the right thing: Currently (May 2011) compilers + more recent than Visual C++ 8, 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_HAS_VIRTUAL_DESTRUCTOR + is defined.

C++ Standard Reference: 12.4. 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..25fdf92 100644 --- a/doc/html/boost_typetraits/reference/is_class.html +++ b/doc/html/boost_typetraits/reference/is_class.html @@ -1,4 +1,3 @@ - @@ -48,8 +47,12 @@ yet unspecified) help from the compiler, we cannot distinguish between union and class types, as a result this type will erroneously inherit from true_type for union types. See also is_union. - Currently (May 2005) only Visual C++ 8 has the necessary compiler intrinsics - to correctly identify union types, and therefore make is_class function correctly. + Currently (May 2011) compilers more recent than Visual C++ 8, 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_CLASS + is defined.

Examples: 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..10a7a60 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. @@ -107,7 +106,7 @@

is_convertible<int, int>::value - is an integral constant expression that evaluates to false. + is an integral constant expression that evaluates to true.

is_convertible<T, T>::value_type diff --git a/doc/html/boost_typetraits/reference/is_empty.html b/doc/html/boost_typetraits/reference/is_empty.html index 32e1c5a..1aefaff 100644 --- a/doc/html/boost_typetraits/reference/is_empty.html +++ b/doc/html/boost_typetraits/reference/is_empty.html @@ -1,4 +1,3 @@ - @@ -53,7 +52,8 @@

  • the compiler providing intrinsics - to detect empty classes. + to detect empty classes - this latter case can be tested for by checking + to see if the macro BOOST_IS_EMPTY is defined.
  • 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..a7001b1 100644 --- a/doc/html/boost_typetraits/reference/is_pod.html +++ b/doc/html/boost_typetraits/reference/is_pod.html @@ -1,4 +1,3 @@ - @@ -54,10 +53,15 @@ can not be used with function types.

    - Without some (as yet unspecified) help from the compiler, ispod - will never report that a class or struct is a POD; this is always safe, if - possibly sub-optimal. Currently (May 2005) only MWCW 9 and Visual C++ 8 have - the necessary compiler-_intrinsics. + 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, 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.

    Header: #include 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..ee0c425 100644 --- a/doc/html/boost_typetraits/reference/is_stateless.html +++ b/doc/html/boost_typetraits/reference/is_stateless.html @@ -1,4 +1,3 @@ - @@ -31,7 +30,7 @@ struct is_stateless : public true_type-or-false_type {};

    - Inherits: Ff T is a stateless type then + Inherits: If T is a stateless type then inherits from true_type, otherwise from false_type.

    @@ -66,9 +65,10 @@

    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 2005) only MWCW 9 and Visual C++ 8 have - the necessary compiler intrinsics - to make this template work automatically. + possibly sub-optimal. Currently (May 2011) compilers more recent than Visual + C++ 8, 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/html/boost_typetraits/reference/is_union.html b/doc/html/boost_typetraits/reference/is_union.html index 930ead7..37d2a8e 100644 --- a/doc/html/boost_typetraits/reference/is_union.html +++ b/doc/html/boost_typetraits/reference/is_union.html @@ -1,4 +1,3 @@ - @@ -47,9 +46,13 @@ 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 2005) only Visual C++ 8 has + implements this functionality. Currently (May 2011) compilers more recent + than Visual C++ 8, GCC-4.3, Greenhills 6.0, Intel-11.0, and Codegear have the necessary compiler intrinsics - to make this trait "just work" without user intervention. + 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.

    Header: #include 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..a1beeaa 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 @@ - @@ -84,9 +83,15 @@ that evaluates to true.

    - is_virtual_base_of<Base, Derived>::value is an integral constant expression + is_virtual_base_of<SomeClassType, + SomeClassType>::value is an integral constant expression that evaluates to true.

    +

    + is_virtual_base_of<NotAClassType, + NotAClassType>::value is an integral constant expression + that evaluates to false. +

    is_virtual_base_of<T, U>::value_type is the type bool. 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..19d4190 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..2e8efe8 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..fcac226 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..9562420 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

    @@ -41,37 +40,70 @@
    BOOST_HAS_NOTHROW_ASSIGN

    Support for Compiler Intrinsics

    BOOST_HAS_NOTHROW_CONSTRUCTOR
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_nothrow_constructor

    Support for Compiler Intrinsics

    BOOST_HAS_NOTHROW_COPY
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_nothrow_copy

    Support for Compiler Intrinsics

    BOOST_HAS_TRIVIAL_ASSIGN
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_trivial_assign

    Support for Compiler Intrinsics

    BOOST_HAS_TRIVIAL_CONSTRUCTOR
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_trivial_constructor

    Support for Compiler Intrinsics

    BOOST_HAS_TRIVIAL_COPY
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_trivial_copy

    Support for Compiler Intrinsics

    BOOST_HAS_TRIVIAL_DESTRUCTOR
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_trivial_destructor

    Support for Compiler Intrinsics

    BOOST_HAS_VIRTUAL_DESTRUCTOR
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_virtual_destructor

    Support for Compiler Intrinsics

    BOOST_IS_ABSTRACT

    Support for Compiler Intrinsics

    BOOST_IS_BASE_OF

    Support for Compiler Intrinsics

    BOOST_IS_CLASS
    -

    Support for Compiler Intrinsics

    +
    + + +

    is_class

    Support for Compiler Intrinsics

    BOOST_IS_CONVERTIBLE

    Support for Compiler Intrinsics

    BOOST_IS_EMPTY
    -

    Support for Compiler Intrinsics

    +
    + + +

    is_empty

    Support for Compiler Intrinsics

    BOOST_IS_ENUM

    Support for Compiler Intrinsics

    BOOST_IS_POD
    -

    Support for Compiler Intrinsics

    +
    + + +

    is_pod

    Support for Compiler Intrinsics

    BOOST_IS_POLYMORPHIC

    Support for Compiler Intrinsics

    BOOST_IS_UNION
    -

    Support for Compiler Intrinsics

    +
    + + +

    is_union

    Support for Compiler Intrinsics

    diff --git a/doc/html/index/s14.html b/doc/html/index/s14.html index 66b2729..b93cab0 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

    @@ -72,37 +71,70 @@
    BOOST_HAS_NOTHROW_ASSIGN

    Support for Compiler Intrinsics

    BOOST_HAS_NOTHROW_CONSTRUCTOR
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_nothrow_constructor

    Support for Compiler Intrinsics

    BOOST_HAS_NOTHROW_COPY
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_nothrow_copy

    Support for Compiler Intrinsics

    BOOST_HAS_TRIVIAL_ASSIGN
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_trivial_assign

    Support for Compiler Intrinsics

    BOOST_HAS_TRIVIAL_CONSTRUCTOR
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_trivial_constructor

    Support for Compiler Intrinsics

    BOOST_HAS_TRIVIAL_COPY
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_trivial_copy

    Support for Compiler Intrinsics

    BOOST_HAS_TRIVIAL_DESTRUCTOR
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_trivial_destructor

    Support for Compiler Intrinsics

    BOOST_HAS_VIRTUAL_DESTRUCTOR
    -

    Support for Compiler Intrinsics

    +
    + + +

    has_virtual_destructor

    Support for Compiler Intrinsics

    BOOST_IS_ABSTRACT

    Support for Compiler Intrinsics

    BOOST_IS_BASE_OF

    Support for Compiler Intrinsics

    BOOST_IS_CLASS
    -

    Support for Compiler Intrinsics

    +
    + + +

    is_class

    Support for Compiler Intrinsics

    BOOST_IS_CONVERTIBLE

    Support for Compiler Intrinsics

    BOOST_IS_EMPTY
    -

    Support for Compiler Intrinsics

    +
    + + +

    is_empty

    Support for Compiler Intrinsics

    BOOST_IS_ENUM

    Support for Compiler Intrinsics

    BOOST_IS_POD
    -

    Support for Compiler Intrinsics

    +
    + + +

    is_pod

    Support for Compiler Intrinsics

    BOOST_IS_POLYMORPHIC

    Support for Compiler Intrinsics

    BOOST_IS_UNION
    -

    Support for Compiler Intrinsics

    +
    + + +

    is_union

    Support for Compiler Intrinsics

    C @@ -156,11 +188,13 @@

    has_nothrow_assign

    has_nothrow_constructor
    +

    BOOST_HAS_NOTHROW_CONSTRUCTOR

    has_nothrow_constructor

    has_nothrow_default_constructor

    has_nothrow_copy
    +

    BOOST_HAS_NOTHROW_COPY

    has_nothrow_copy

    has_nothrow_copy_constructor

    @@ -169,14 +203,19 @@
    has_nothrow_default_constructor

    has_nothrow_constructor

    has_trivial_assign
    -

    has_trivial_assign

    +
    + + +

    BOOST_HAS_TRIVIAL_ASSIGN

    has_trivial_assign

    has_trivial_constructor
    +

    BOOST_HAS_TRIVIAL_CONSTRUCTOR

    has_trivial_constructor

    has_trivial_default_constructor

    has_trivial_copy
    +

    BOOST_HAS_TRIVIAL_COPY

    has_trivial_copy

    has_trivial_copy_constructor

    @@ -185,9 +224,15 @@
    has_trivial_default_constructor

    has_trivial_constructor

    has_trivial_destructor
    -

    has_trivial_destructor

    +
    + + +

    BOOST_HAS_TRIVIAL_DESTRUCTOR

    has_trivial_destructor

    has_virtual_destructor
    -

    has_virtual_destructor

    +
    + + +

    BOOST_HAS_VIRTUAL_DESTRUCTOR

    has_virtual_destructor

    I @@ -218,6 +263,7 @@

    is_base_of

    is_class
    +

    BOOST_IS_CLASS

    is_class

    User Defined Specializations

    @@ -230,7 +276,10 @@
    is_convertible

    is_convertible

    is_empty
    -

    is_empty

    +
    + + +

    BOOST_IS_EMPTY

    is_empty

    is_enum

    is_enum

    is_floating_point
    @@ -256,6 +305,7 @@

    is_object

    is_pod
    +

    BOOST_IS_POD

    is_pod

    User Defined Specializations

    @@ -280,6 +330,7 @@

    is_stateless

    is_union
    +

    BOOST_IS_UNION

    is_union

    User Defined Specializations

    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_class.qbk b/doc/is_class.qbk index bf058c9..a1fa984 100644 --- a/doc/is_class.qbk +++ b/doc/is_class.qbk @@ -19,8 +19,10 @@ __header ` #include ` or ` #include 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. @@ -58,7 +58,7 @@ expression that evaluates to /false/: the conversion would require a `const_cast expression that evaluates to /true/.] [:`is_convertible::value` is an integral constant -expression that evaluates to /false/.] +expression that evaluates to /true/.] [:`is_convertible::value_type` is the type `bool`.] diff --git a/doc/is_empty.qbk b/doc/is_empty.qbk index 4739257..ec19563 100644 --- a/doc/is_empty.qbk +++ b/doc/is_empty.qbk @@ -19,7 +19,8 @@ __header ` #include ` or ` #include ` or ` #include ` diff --git a/doc/is_stateless.qbk b/doc/is_stateless.qbk index 22f9648..d2de82f 100644 --- a/doc/is_stateless.qbk +++ b/doc/is_stateless.qbk @@ -9,7 +9,7 @@ template struct is_stateless : public __tof {}; -__inherit Ff T is a stateless type then inherits from __true_type, otherwise +__inherit If T is a stateless type then inherits from __true_type, otherwise from __false_type. Type T must be a complete type. @@ -33,8 +33,10 @@ then this template can not be used with function types. 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 2005) only MWCW 9 and Visual C++ 8 have the necessary -compiler __intrinsics to make this template work automatically. +if possibly sub-optimal. +Currently (May 2011) compilers more recent than Visual C++ 8, GCC-4.3, Greenhills 6.0, +Intel-11.0, and Codegear have the necessary compiler __intrinsics to ensure that this +trait "just works". [endsect] diff --git a/doc/is_union.qbk b/doc/is_union.qbk index 0227fe8..9d8cd8f 100644 --- a/doc/is_union.qbk +++ b/doc/is_union.qbk @@ -19,9 +19,12 @@ __compat Without (some as yet unspecified) help from the compiler, we cannot distinguish between union and class types using only standard C++, 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 2005) only Visual C++ 8 has the necessary compiler __intrinsics to make this -trait "just work" without user intervention. +supplies some unspecified intrinsic that implements this functionality. +Currently (May 2011) compilers more recent than Visual C++ 8, 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. + __header ` #include ` or ` #include ` diff --git a/doc/is_virtual_base_of.qbk b/doc/is_virtual_base_of.qbk index f7b5f80..e229bc5 100644 --- a/doc/is_virtual_base_of.qbk +++ b/doc/is_virtual_base_of.qbk @@ -38,9 +38,12 @@ __examples [:`is_virtual_base_of::value` is an integral constant expression that evaluates to /true/.] -[:`is_virtual_base_of::value` is an integral constant +[:`is_virtual_base_of::value` is an integral constant expression that evaluates to /true/.] +[:`is_virtual_base_of::value` is an integral constant +expression that evaluates to /false/.] + [:`is_virtual_base_of::value_type` is the type `bool`.] [endsect] diff --git a/include/boost/type_traits/add_rvalue_reference.hpp b/include/boost/type_traits/add_rvalue_reference.hpp index 00b723c..2be58f6 100644 --- a/include/boost/type_traits/add_rvalue_reference.hpp +++ b/include/boost/type_traits/add_rvalue_reference.hpp @@ -28,7 +28,7 @@ // shall name T&&; otherwise, type shall name T. [ Note: This rule reflects // the semantics of reference collapsing. For example, when a type T names // a type T1&, the type add_rvalue_reference::type is not an rvalue -// reference. —end note ] +// reference. -end note ] //----------------------------------------------------------------------------// namespace boost { @@ -65,3 +65,4 @@ BOOST_TT_AUX_TYPE_TRAIT_DEF1(add_rvalue_reference,T,typename boost::type_traits_ #include #endif // BOOST_TYPE_TRAITS_EXT_ADD_RVALUE_REFERENCE__HPP + diff --git a/include/boost/type_traits/alignment_of.hpp b/include/boost/type_traits/alignment_of.hpp index 51357ce..e1735dc 100644 --- a/include/boost/type_traits/alignment_of.hpp +++ b/include/boost/type_traits/alignment_of.hpp @@ -93,7 +93,7 @@ BOOST_TT_AUX_SIZE_T_TRAIT_DEF1(alignment_of,T,::boost::detail::alignment_of_impl #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION template struct alignment_of - : alignment_of + : public alignment_of { }; #endif diff --git a/include/boost/type_traits/common_type.hpp b/include/boost/type_traits/common_type.hpp index 74b0363..2739688 100644 --- a/include/boost/type_traits/common_type.hpp +++ b/include/boost/type_traits/common_type.hpp @@ -11,20 +11,20 @@ #include -#ifdef __SUNPRO_CC +#if defined(__SUNPRO_CC) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) # define BOOST_COMMON_TYPE_DONT_USE_TYPEOF #endif -#ifdef __IBMCPP__ +#if defined(__IBMCPP__) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) # define BOOST_COMMON_TYPE_DONT_USE_TYPEOF #endif //----------------------------------------------------------------------------// -#if defined(BOOST_NO_VARIADIC_TEMPLATES) +#if defined(BOOST_NO_VARIADIC_TEMPLATES) && !defined(BOOST_COMMON_TYPE_ARITY) #define BOOST_COMMON_TYPE_ARITY 3 #endif //----------------------------------------------------------------------------// -#if defined(BOOST_NO_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) +#if defined(BOOST_NO_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) && !defined(BOOST_TYPEOF_SILENT) #define BOOST_TYPEOF_SILENT #include // boost wonders never cease! #endif @@ -141,7 +141,7 @@ namespace type_traits_detail { template struct common_type #endif - : type_traits_detail::common_type_2 + : public type_traits_detail::common_type_2 { }; diff --git a/include/boost/type_traits/detail/bool_trait_def.hpp b/include/boost/type_traits/detail/bool_trait_def.hpp index a54c910..05e7218 100644 --- a/include/boost/type_traits/detail/bool_trait_def.hpp +++ b/include/boost/type_traits/detail/bool_trait_def.hpp @@ -60,7 +60,7 @@ #endif #ifndef BOOST_TT_AUX_BOOL_C_BASE -# define BOOST_TT_AUX_BOOL_C_BASE(C) : ::boost::integral_constant +# define BOOST_TT_AUX_BOOL_C_BASE(C) : public ::boost::integral_constant #endif @@ -68,6 +68,7 @@ template< typename T > struct trait \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ }; \ @@ -80,6 +81,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ template< typename T1, typename T2 > struct trait \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(T1,T2)) \ }; \ @@ -91,6 +93,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,trait) \ template<> struct trait< sp > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(sp)) \ }; \ @@ -100,6 +103,7 @@ template<> struct trait< sp > \ template<> struct trait< sp1,sp2 > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \ }; \ @@ -108,6 +112,7 @@ template<> struct trait< sp1,sp2 > \ #define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(trait,sp,C) \ template<> struct trait##_impl< sp > \ { \ +public:\ BOOST_STATIC_CONSTANT(bool, value = (C)); \ }; \ /**/ @@ -115,6 +120,7 @@ template<> struct trait##_impl< sp > \ #define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,sp1,sp2,C) \ template<> struct trait##_impl< sp1,sp2 > \ { \ +public:\ BOOST_STATIC_CONSTANT(bool, value = (C)); \ }; \ /**/ @@ -123,6 +129,7 @@ template<> struct trait##_impl< sp1,sp2 > \ template< param > struct trait< sp > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ }; \ /**/ @@ -131,6 +138,7 @@ template< param > struct trait< sp > \ template< param1, param2 > struct trait< sp > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ }; \ /**/ @@ -139,6 +147,7 @@ template< param1, param2 > struct trait< sp > \ template< param > struct trait< sp1,sp2 > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \ }; \ @@ -148,6 +157,7 @@ template< param > struct trait< sp1,sp2 > \ template< param1, param2 > struct trait< sp1,sp2 > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ }; \ /**/ @@ -155,6 +165,7 @@ template< param1, param2 > struct trait< sp1,sp2 > \ #define BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \ template< param > struct trait##_impl< sp1,sp2 > \ { \ +public:\ BOOST_STATIC_CONSTANT(bool, value = (C)); \ }; \ /**/ diff --git a/include/boost/type_traits/detail/common_type_imp.hpp b/include/boost/type_traits/detail/common_type_imp.hpp index 9e06282..dd530ca 100644 --- a/include/boost/type_traits/detail/common_type_imp.hpp +++ b/include/boost/type_traits/detail/common_type_imp.hpp @@ -72,21 +72,45 @@ struct propagate_cv< const volatile From, To > { typedef To const volatile type; }; /******************************************************************************* - * struct is_signable_integral + * struct is_integral_or_enum * * This metafunction determines if T is an integral type which can be made * signed or unsigned. ******************************************************************************/ template< class T > -struct is_signable_integral - : mpl::or_< is_integral, is_enum > +struct is_integral_or_enum + : public mpl::or_< is_integral, is_enum > { }; template<> -struct is_signable_integral< bool > - : false_type +struct is_integral_or_enum< bool > + : public false_type { }; +/******************************************************************************* + * struct make_unsigned_soft + * struct make_signed_soft + * + * These metafunction are identical to make_unsigned and make_signed, + * respetively, except for special-casing bool. + ******************************************************************************/ + +template< class T > +struct make_unsigned_soft + : public make_unsigned +{ }; +template<> +struct make_unsigned_soft< bool > +{ typedef bool type; }; + +template< class T > +struct make_signed_soft + : public make_signed +{ }; +template<> +struct make_signed_soft< bool > +{ typedef bool type; }; + /******************************************************************************* * struct sizeof_t * typedef ... yes_type @@ -127,7 +151,7 @@ yes_type rvalue_test(...); template< class First, class Last, std::size_t Index > struct conversion_test_overloads_iterate - : conversion_test_overloads_iterate< + : public conversion_test_overloads_iterate< typename mpl::next< First >::type, Last, Index + 1 > { @@ -144,7 +168,7 @@ struct conversion_test_overloads_iterate< Last, Last, Index > template< class Sequence > struct conversion_test_overloads - : conversion_test_overloads_iterate< + : public conversion_test_overloads_iterate< typename mpl::begin< Sequence >::type, typename mpl::end< Sequence >::type, 0 @@ -163,7 +187,7 @@ template< int N = mpl::size< Sequence >::value > struct select - : mpl::at_c< Sequence, Index > + : public mpl::at_c< Sequence, Index > { }; template< class Sequence, int N > struct select< Sequence, N, N > @@ -185,12 +209,21 @@ struct select< Sequence, N, N > * { V*, W*, V'*, W'* } * where V' is V with whatever cv-qualifiers are on W, and W' is W * with whatever cv-qualifiers are on V - * else T' and U' are both "signable integral types" (integral and enum - * types excepting bool), then: + * else if T' and U' are both integral or enum types, then: * define the set of NominalCandidates to be - * { unsigned(T'), unsigned(U'), signed(T'), signed(U') } - * where unsigned(X) is make_unsigned::type and signed(X) is - * make_signed::type + * { + * unsigned_soft(T'), + * unsigned_soft(U'), + * signed_soft(T'), + * signed_soft(U'), + * T', + * U', + * unsigned int, + * int + * } + * where unsigned_soft(X) is make_unsigned_soft::type and + * signed_soft(X) is make_signed_soft::type (these are all + * generally necessary to cover the various integral promotion cases) * else * define the set of NominalCandidates to be * { T', U' } @@ -231,22 +264,20 @@ template< class T, class U, class V = typename remove_cv< typename remove_reference::type >::type, class W = typename remove_cv< typename remove_reference::type >::type, - bool = is_signable_integral::value && is_signable_integral::value + bool = is_integral_or_enum::value && is_integral_or_enum::value > -struct nominal_candidates; - -template< class T, class U, class V, class W > -struct nominal_candidates< T, U, V, W, false > +struct nominal_candidates { typedef mpl::vector2 type; }; template< class T, class U, class V, class W > struct nominal_candidates< T, U, V, W, true > { - typedef mpl::vector4< - typename make_unsigned::type, - typename make_unsigned::type, - typename make_signed::type, - typename make_signed::type + typedef boost::mpl::vector8< + typename make_unsigned_soft::type, + typename make_unsigned_soft::type, + typename make_signed_soft::type, + typename make_signed_soft::type, + V, W, unsigned int, int > type; }; @@ -262,7 +293,7 @@ struct nominal_candidates< T, U, V*, W*, false > template struct common_type_dispatch_on_rvalueness - : deduce_common_type< T, U, typename nominal_candidates::type > + : public deduce_common_type< T, U, typename nominal_candidates::type > { }; template< class T, class U > @@ -285,7 +316,7 @@ public: template< class T, class U > struct common_type_impl - : common_type_dispatch_on_rvalueness() ? declval() : declval() ) ) == sizeof( yes_type ) > { }; diff --git a/include/boost/type_traits/detail/cv_traits_impl.hpp b/include/boost/type_traits/detail/cv_traits_impl.hpp index b3fa595..ed20c9d 100644 --- a/include/boost/type_traits/detail/cv_traits_impl.hpp +++ b/include/boost/type_traits/detail/cv_traits_impl.hpp @@ -77,7 +77,7 @@ namespace detail { // Use the implementation above for non function pointers template -struct cv_traits_imp : ::boost::type_traits::gcc8503::cv_traits_imp { }; +struct cv_traits_imp : public ::boost::type_traits::gcc8503::cv_traits_imp { }; // Functions are never cv-qualified template struct cv_traits_imp diff --git a/include/boost/type_traits/detail/size_t_trait_def.hpp b/include/boost/type_traits/detail/size_t_trait_def.hpp index af479f5..ff471a0 100644 --- a/include/boost/type_traits/detail/size_t_trait_def.hpp +++ b/include/boost/type_traits/detail/size_t_trait_def.hpp @@ -19,10 +19,10 @@ #include #if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300 -# define BOOST_TT_AUX_SIZE_T_BASE(C) ::boost::integral_constant +# define BOOST_TT_AUX_SIZE_T_BASE(C) public ::boost::integral_constant # define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) /**/ #else -# define BOOST_TT_AUX_SIZE_T_BASE(C) ::boost::mpl::size_t +# define BOOST_TT_AUX_SIZE_T_BASE(C) public ::boost::mpl::size_t # define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ typedef ::boost::mpl::size_t base_; \ using base_::value; \ @@ -34,6 +34,7 @@ template< typename T > struct trait \ : BOOST_TT_AUX_SIZE_T_BASE(C) \ { \ +public:\ BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ }; \ @@ -45,6 +46,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ template<> struct trait \ : BOOST_TT_AUX_SIZE_T_BASE(C) \ { \ +public:\ BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \ }; \ diff --git a/include/boost/type_traits/detail/type_trait_def.hpp b/include/boost/type_traits/detail/type_trait_def.hpp index 7438267..bc54696 100644 --- a/include/boost/type_traits/detail/type_trait_def.hpp +++ b/include/boost/type_traits/detail/type_trait_def.hpp @@ -17,6 +17,7 @@ #define BOOST_TT_AUX_TYPE_TRAIT_DEF1(trait,T,result) \ template< typename T > struct trait \ { \ +public:\ typedef result type; \ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ }; \ @@ -27,6 +28,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ #define BOOST_TT_AUX_TYPE_TRAIT_SPEC1(trait,spec,result) \ template<> struct trait \ { \ +public:\ typedef result type; \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \ }; \ @@ -35,6 +37,7 @@ template<> struct trait \ #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(trait,spec,result) \ template<> struct trait##_impl \ { \ +public:\ typedef result type; \ }; \ /**/ @@ -42,6 +45,7 @@ template<> struct trait##_impl \ #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,result) \ template< param > struct trait \ { \ +public:\ typedef result type; \ }; \ /**/ @@ -49,6 +53,7 @@ template< param > struct trait \ #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,spec,result) \ template< param1, param2 > struct trait \ { \ +public:\ typedef result; \ }; \ /**/ @@ -56,6 +61,7 @@ template< param1, param2 > struct trait \ #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(param,trait,spec,result) \ template< param > struct trait##_impl \ { \ +public:\ typedef result type; \ }; \ /**/ diff --git a/include/boost/type_traits/has_nothrow_assign.hpp b/include/boost/type_traits/has_nothrow_assign.hpp index 3cef735..83e5968 100644 --- a/include/boost/type_traits/has_nothrow_assign.hpp +++ b/include/boost/type_traits/has_nothrow_assign.hpp @@ -20,16 +20,22 @@ namespace detail{ template struct has_nothrow_assign_imp{ - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_or< - ::boost::has_trivial_assign::value, - BOOST_HAS_NOTHROW_ASSIGN(T) - >::value)); +#ifndef BOOST_HAS_NOTHROW_ASSIGN + BOOST_STATIC_CONSTANT(bool, value = ::boost::has_trivial_assign::value); +#else + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_NOTHROW_ASSIGN(T)); +#endif }; } BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_nothrow_assign,T,::boost::detail::has_nothrow_assign_imp::value) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_assign,void volatile,false) +#endif } // namespace boost diff --git a/include/boost/type_traits/has_nothrow_constructor.hpp b/include/boost/type_traits/has_nothrow_constructor.hpp index e807fd4..3bc4f80 100644 --- a/include/boost/type_traits/has_nothrow_constructor.hpp +++ b/include/boost/type_traits/has_nothrow_constructor.hpp @@ -20,11 +20,11 @@ namespace detail{ template struct has_nothrow_constructor_imp{ - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_or< - ::boost::has_trivial_constructor::value, - BOOST_HAS_NOTHROW_CONSTRUCTOR(T) - >::value)); +#ifdef BOOST_HAS_NOTHROW_CONSTRUCTOR + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_NOTHROW_CONSTRUCTOR(T)); +#else + BOOST_STATIC_CONSTANT(bool, value = ::boost::has_trivial_constructor::value); +#endif }; } @@ -32,6 +32,20 @@ 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) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_constructor,void volatile,false) +#endif + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_default_constructor,void volatile,false) +#endif + } // namespace boost #include diff --git a/include/boost/type_traits/has_nothrow_copy.hpp b/include/boost/type_traits/has_nothrow_copy.hpp index c06b4a3..9c3c903 100644 --- a/include/boost/type_traits/has_nothrow_copy.hpp +++ b/include/boost/type_traits/has_nothrow_copy.hpp @@ -20,11 +20,11 @@ namespace detail{ template struct has_nothrow_copy_imp{ - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_or< - ::boost::has_trivial_copy::value, - BOOST_HAS_NOTHROW_COPY(T) - >::value)); +#ifdef BOOST_HAS_NOTHROW_COPY + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_NOTHROW_COPY(T)); +#else + BOOST_STATIC_CONSTANT(bool, value = ::boost::has_trivial_copy::value); +#endif }; } @@ -32,6 +32,20 @@ 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) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy,void volatile,false) +#endif + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_nothrow_copy_constructor,void volatile,false) +#endif + } // namespace boost #include diff --git a/include/boost/type_traits/has_trivial_assign.hpp b/include/boost/type_traits/has_trivial_assign.hpp index 4179e8d..404b62c 100644 --- a/include/boost/type_traits/has_trivial_assign.hpp +++ b/include/boost/type_traits/has_trivial_assign.hpp @@ -28,20 +28,27 @@ namespace detail { template struct has_trivial_assign_impl { +#ifdef BOOST_HAS_TRIVIAL_ASSIGN + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_ASSIGN(T)); +#else BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< - ::boost::type_traits::ice_or< - ::boost::is_pod::value, - BOOST_HAS_TRIVIAL_ASSIGN(T) - >::value, - ::boost::type_traits::ice_not< ::boost::is_const::value >::value, + ::boost::is_pod::value, + ::boost::type_traits::ice_not< ::boost::is_const::value >::value, ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value >::value)); +#endif }; } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_assign,T,::boost::detail::has_trivial_assign_impl::value) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_assign,void volatile,false) +#endif } // namespace boost diff --git a/include/boost/type_traits/has_trivial_constructor.hpp b/include/boost/type_traits/has_trivial_constructor.hpp index f9ade5d..30dbdd8 100644 --- a/include/boost/type_traits/has_trivial_constructor.hpp +++ b/include/boost/type_traits/has_trivial_constructor.hpp @@ -24,11 +24,19 @@ namespace detail { template struct has_trivial_ctor_impl { +#ifdef BOOST_HAS_TRIVIAL_CONSTRUCTOR BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_or< ::boost::is_pod::value, BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) >::value)); +#else + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_or< + ::boost::is_pod::value, + false + >::value)); +#endif }; } // namespace detail diff --git a/include/boost/type_traits/has_trivial_copy.hpp b/include/boost/type_traits/has_trivial_copy.hpp index 8c75361..ba4d884 100644 --- a/include/boost/type_traits/has_trivial_copy.hpp +++ b/include/boost/type_traits/has_trivial_copy.hpp @@ -27,14 +27,15 @@ namespace detail { template struct has_trivial_copy_impl { +#ifdef BOOST_HAS_TRIVIAL_COPY + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_COPY(T)); +#else BOOST_STATIC_CONSTANT(bool, value = (::boost::type_traits::ice_and< - ::boost::type_traits::ice_or< - ::boost::is_pod::value, - BOOST_HAS_TRIVIAL_COPY(T) - >::value, - ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value + ::boost::is_pod::value, + ::boost::type_traits::ice_not< ::boost::is_volatile::value >::value >::value)); +#endif }; } // namespace detail @@ -42,6 +43,20 @@ struct has_trivial_copy_impl 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) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy,void volatile,false) +#endif + +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_copy_constructor,void volatile,false) +#endif + } // namespace boost #include diff --git a/include/boost/type_traits/has_trivial_destructor.hpp b/include/boost/type_traits/has_trivial_destructor.hpp index f2a8ce6..79d7522 100644 --- a/include/boost/type_traits/has_trivial_destructor.hpp +++ b/include/boost/type_traits/has_trivial_destructor.hpp @@ -24,17 +24,24 @@ namespace detail { template struct has_trivial_dtor_impl { - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_or< - ::boost::is_pod::value, - BOOST_HAS_TRIVIAL_DESTRUCTOR(T) - >::value)); +#ifdef BOOST_HAS_TRIVIAL_DESTRUCTOR + BOOST_STATIC_CONSTANT(bool, value = BOOST_HAS_TRIVIAL_DESTRUCTOR(T)); +#else + BOOST_STATIC_CONSTANT(bool, value = ::boost::is_pod::value); +#endif }; } // namespace detail BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_trivial_destructor,T,::boost::detail::has_trivial_dtor_impl::value) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void,false) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void const,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void const volatile,false) +BOOST_TT_AUX_BOOL_TRAIT_SPEC1(has_trivial_destructor,void volatile,false) +#endif + } // namespace boost #include diff --git a/include/boost/type_traits/has_virtual_destructor.hpp b/include/boost/type_traits/has_virtual_destructor.hpp old mode 100755 new mode 100644 index 8f99ff4..b741197 --- a/include/boost/type_traits/has_virtual_destructor.hpp +++ b/include/boost/type_traits/has_virtual_destructor.hpp @@ -16,7 +16,11 @@ namespace boost { +#ifdef BOOST_HAS_VIRTUAL_DESTRUCTOR BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_virtual_destructor,T,BOOST_HAS_VIRTUAL_DESTRUCTOR(T)) +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(has_virtual_destructor,T,false) +#endif } // namespace boost diff --git a/include/boost/type_traits/integral_promotion.hpp b/include/boost/type_traits/integral_promotion.hpp index a85e243..2109b9c 100644 --- a/include/boost/type_traits/integral_promotion.hpp +++ b/include/boost/type_traits/integral_promotion.hpp @@ -24,14 +24,14 @@ namespace boost { namespace type_traits { namespace detail { // 4.5/2 -template struct need_promotion : boost::is_enum {}; +template struct need_promotion : public boost::is_enum {}; // 4.5/1 -template<> struct need_promotion : true_type {}; -template<> struct need_promotion : true_type {}; -template<> struct need_promotion : true_type {}; -template<> struct need_promotion : true_type {}; -template<> struct need_promotion : true_type {}; +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; +template<> struct need_promotion : public true_type {}; // Specializations for non-standard types. @@ -39,7 +39,7 @@ template<> struct need_promotion : true_type {}; #define BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE(T) \ template<> struct need_promotion \ - : integral_constant {}; + : public integral_constant {}; // Same set of integral types as in boost/type_traits/is_integral.hpp. // Please, keep in sync. @@ -72,13 +72,13 @@ BOOST_TT_AUX_PROMOTE_NONSTANDARD_TYPE( __int64) #ifndef BOOST_NO_INTRINSIC_WCHAR_T // 4.5/2 -template<> struct need_promotion : true_type {}; +template<> struct need_promotion : public true_type {}; #endif // 4.5/3 (integral bit-field) is not supported. // 4.5/4 -template<> struct need_promotion : true_type {}; +template<> struct need_promotion : public true_type {}; // Get promoted type by index and cv qualifiers. @@ -171,7 +171,7 @@ struct integral_promotion_impl template struct integral_promotion - : boost::mpl::eval_if< + : public boost::mpl::eval_if< need_promotion::type> , integral_promotion_impl , boost::mpl::identity diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 9666456..6057249 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -33,8 +33,6 @@ // BOOST_HAS_VIRTUAL_DESTRUCTOR(T) should evaluate to true T has a virtual destructor // // The following can also be defined: when detected our implementation is greatly simplified. -// Note that unlike the macros above these do not have default definitions, so we can use -// #ifdef MACRONAME to detect when these are available. // // BOOST_IS_ABSTRACT(T) true if T is an abstract type // BOOST_IS_BASE_OF(T,U) true if T is a base class of U @@ -89,19 +87,18 @@ # define BOOST_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T)) # define BOOST_IS_EMPTY(T) __is_empty(T) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) -# define BOOST_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T) -# define BOOST_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T) -# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) -# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) -# define BOOST_HAS_NOTHROW_COPY(T) __has_nothrow_copy(T) -# define BOOST_HAS_NOTHROW_ASSIGN(T) __has_nothrow_assign(T) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T)|| ( ::boost::is_pod::value && !::boost::is_volatile::value)) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ( ::boost::is_pod::value && ! ::boost::is_const::value && !::boost::is_volatile::value)) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::is_pod::value) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::has_trivial_constructor::value) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) || ::boost::has_trivial_copy::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::has_trivial_assign::value) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) # 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) @@ -132,16 +129,22 @@ # include # include +#ifdef BOOST_INTEL +# define BOOST_INTEL_TT_OPTS || is_pod::value +#else +# define BOOST_INTEL_TT_OPTS +#endif + # define BOOST_IS_UNION(T) __is_union(T) # define BOOST_IS_POD(T) __is_pod(T) # define BOOST_IS_EMPTY(T) __is_empty(T) -# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) -# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value) -# define BOOST_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T) -# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) -# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) -# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) -# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_INTEL_TT_OPTS) && !is_reference::value && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_INTEL_TT_OPTS) && ! ::boost::is_volatile::value && ! ::boost::is_const::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_INTEL_TT_OPTS) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_INTEL_TT_OPTS) +# define BOOST_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_INTEL_TT_OPTS) && !is_volatile::value && !is_const::value) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) # define BOOST_IS_ABSTRACT(T) __is_abstract(T) @@ -168,8 +171,8 @@ # define BOOST_IS_POD(T) __is_pod(T) # define BOOST_IS_EMPTY(T) __is_empty(T) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) -# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value) -# define BOOST_HAS_TRIVIAL_ASSIGN(T) __has_trivial_assign(T) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value && && !is_volatile::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) # define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) # define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) # define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) @@ -195,13 +198,13 @@ # define BOOST_IS_UNION(T) __is_union(T) # define BOOST_IS_POD(T) __is_pod(T) # define BOOST_IS_EMPTY(T) __is_empty(T) -# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T) || is_void::value) -# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_volatile::value && !is_reference::value || is_void::value) -# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value || is_void::value) -# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || is_void::value) -# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T) || is_void::value) -# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile::value && !is_reference::value || is_void::value) -# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value || is_void::value) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T)) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T)) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T)) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T) && !is_volatile::value && !is_reference::value) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) # define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) # define BOOST_IS_ABSTRACT(T) __is_abstract(T) @@ -215,50 +218,6 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif -#ifndef BOOST_IS_UNION -# define BOOST_IS_UNION(T) false -#endif - -#ifndef BOOST_IS_POD -# define BOOST_IS_POD(T) false -#endif - -#ifndef BOOST_IS_EMPTY -# define BOOST_IS_EMPTY(T) false -#endif - -#ifndef BOOST_HAS_TRIVIAL_CONSTRUCTOR -# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) false -#endif - -#ifndef BOOST_HAS_TRIVIAL_COPY -# define BOOST_HAS_TRIVIAL_COPY(T) false -#endif - -#ifndef BOOST_HAS_TRIVIAL_ASSIGN -# define BOOST_HAS_TRIVIAL_ASSIGN(T) false -#endif - -#ifndef BOOST_HAS_TRIVIAL_DESTRUCTOR -# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) false -#endif - -#ifndef BOOST_HAS_NOTHROW_CONSTRUCTOR -# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) false -#endif - -#ifndef BOOST_HAS_NOTHROW_COPY -# define BOOST_HAS_NOTHROW_COPY(T) false -#endif - -#ifndef BOOST_HAS_NOTHROW_ASSIGN -# define BOOST_HAS_NOTHROW_ASSIGN(T) false -#endif - -#ifndef BOOST_HAS_VIRTUAL_DESTRUCTOR -# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) false -#endif - #endif // BOOST_TT_INTRINSICS_HPP_INCLUDED diff --git a/include/boost/type_traits/is_const.hpp b/include/boost/type_traits/is_const.hpp index 99b0f36..f24b71a 100644 --- a/include/boost/type_traits/is_const.hpp +++ b/include/boost/type_traits/is_const.hpp @@ -106,7 +106,7 @@ no_type is_const_tester(volatile void *); template struct is_const_helper - : ::boost::type_traits::false_result + : public ::boost::type_traits::false_result { }; @@ -136,7 +136,7 @@ struct is_const_helper template struct is_const_impl - : is_const_helper< + : public is_const_helper< is_reference::value , is_array::value >::template result_ diff --git a/include/boost/type_traits/is_convertible.hpp b/include/boost/type_traits/is_convertible.hpp index c05c297..0d42c46 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) }; }; }; @@ -84,7 +85,7 @@ struct does_conversion_exist template struct is_convertible_basic_impl - : does_conversion_exist::template result_ + : public does_conversion_exist::template result_ { }; @@ -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/include/boost/type_traits/is_empty.hpp b/include/boost/type_traits/is_empty.hpp index 45c4e9e..8a2c5b8 100644 --- a/include/boost/type_traits/is_empty.hpp +++ b/include/boost/type_traits/is_empty.hpp @@ -31,6 +31,12 @@ // should be always the last #include directive #include +#ifndef BOOST_INTERNAL_IS_EMPTY +#define BOOST_INTERNAL_IS_EMPTY(T) false +#else +#define BOOST_INTERNAL_IS_EMPTY(T) BOOST_IS_EMPTY(T) +#endif + namespace boost { namespace detail { @@ -83,7 +89,7 @@ struct is_empty_impl bool, value = ( ::boost::type_traits::ice_or< ::boost::detail::empty_helper::value>::value - , BOOST_IS_EMPTY(cvt) + , BOOST_INTERNAL_IS_EMPTY(cvt) >::value )); }; @@ -118,7 +124,7 @@ struct is_empty_impl , ::boost::is_class::value , ::boost::is_convertible< r_type,int>::value >::value - , BOOST_IS_EMPTY(cvt) + , BOOST_INTERNAL_IS_EMPTY(cvt) >::value)); }; @@ -187,14 +193,14 @@ struct is_empty_impl typedef typename result::type eh_type; BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_or::value)); + (::boost::type_traits::ice_or::value)); }; #else template struct is_empty_impl { - BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_EMPTY(T)); + BOOST_STATIC_CONSTANT(bool, value = BOOST_INTERNAL_IS_EMPTY(T)); }; #endif // BOOST_MSVC6_MEMBER_TEMPLATES @@ -217,5 +223,7 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_empty,T,::boost::detail::is_empty_impl::value #include +#undef BOOST_INTERNAL_IS_EMPTY + #endif // BOOST_TT_IS_EMPTY_HPP_INCLUDED diff --git a/include/boost/type_traits/is_enum.hpp b/include/boost/type_traits/is_enum.hpp index 86fa66d..e35548c 100644 --- a/include/boost/type_traits/is_enum.hpp +++ b/include/boost/type_traits/is_enum.hpp @@ -95,7 +95,7 @@ template <> struct is_enum_helper { template struct type - : ::boost::is_convertible::type,::boost::detail::int_convertible> + : public ::boost::is_convertible::type,::boost::detail::int_convertible> { }; }; diff --git a/include/boost/type_traits/is_function.hpp b/include/boost/type_traits/is_function.hpp index 55c05c1..2cb1bb9 100644 --- a/include/boost/type_traits/is_function.hpp +++ b/include/boost/type_traits/is_function.hpp @@ -40,7 +40,7 @@ namespace detail { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS) template struct is_function_chooser - : ::boost::type_traits::false_result + : public ::boost::type_traits::false_result { }; @@ -48,14 +48,14 @@ template <> struct is_function_chooser { template< typename T > struct result_ - : ::boost::type_traits::is_function_ptr_helper + : public ::boost::type_traits::is_function_ptr_helper { }; }; template struct is_function_impl - : is_function_chooser< ::boost::is_reference::value > + : public is_function_chooser< ::boost::is_reference::value > ::BOOST_NESTED_TEMPLATE result_ { }; diff --git a/include/boost/type_traits/is_fundamental.hpp b/include/boost/type_traits/is_fundamental.hpp index 6aff7dd..138e296 100644 --- a/include/boost/type_traits/is_fundamental.hpp +++ b/include/boost/type_traits/is_fundamental.hpp @@ -22,7 +22,7 @@ namespace detail { template struct is_fundamental_impl - : ::boost::type_traits::ice_or< + : public ::boost::type_traits::ice_or< ::boost::is_arithmetic::value , ::boost::is_void::value > diff --git a/include/boost/type_traits/is_member_function_pointer.hpp b/include/boost/type_traits/is_member_function_pointer.hpp index 81f1eac..38babf4 100644 --- a/include/boost/type_traits/is_member_function_pointer.hpp +++ b/include/boost/type_traits/is_member_function_pointer.hpp @@ -55,7 +55,7 @@ namespace detail { template struct is_mem_fun_pointer_select - : ::boost::type_traits::false_result + : public ::boost::type_traits::false_result { }; @@ -83,7 +83,7 @@ struct is_mem_fun_pointer_select template struct is_member_function_pointer_impl - : is_mem_fun_pointer_select< + : public is_mem_fun_pointer_select< ::boost::type_traits::ice_or< ::boost::is_reference::value , ::boost::is_array::value diff --git a/include/boost/type_traits/is_member_pointer.hpp b/include/boost/type_traits/is_member_pointer.hpp index ba02b89..a4a6d25 100644 --- a/include/boost/type_traits/is_member_pointer.hpp +++ b/include/boost/type_traits/is_member_pointer.hpp @@ -66,7 +66,7 @@ template template struct is_member_pointer_select - : ::boost::type_traits::false_result + : public ::boost::type_traits::false_result { }; @@ -87,7 +87,7 @@ struct is_member_pointer_select template struct is_member_pointer_impl - : is_member_pointer_select< + : public is_member_pointer_select< ::boost::type_traits::ice_or< ::boost::is_reference::value , ::boost::is_array::value diff --git a/include/boost/type_traits/is_pod.hpp b/include/boost/type_traits/is_pod.hpp index af2c3c4..4691e66 100644 --- a/include/boost/type_traits/is_pod.hpp +++ b/include/boost/type_traits/is_pod.hpp @@ -20,6 +20,12 @@ // should be the last #include #include +#ifndef BOOST_IS_POD +#define BOOST_INTERNAL_IS_POD(T) false +#else +#define BOOST_INTERNAL_IS_POD(T) BOOST_IS_POD(T) +#endif + namespace boost { // forward declaration, needed by 'is_pod_array_helper' template below @@ -36,14 +42,14 @@ template struct is_pod_impl (::boost::type_traits::ice_or< ::boost::is_scalar::value, ::boost::is_void::value, - BOOST_IS_POD(T) + BOOST_INTERNAL_IS_POD(T) >::value)); }; #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) template struct is_pod_impl - : is_pod_impl + : public is_pod_impl { }; #endif @@ -60,7 +66,7 @@ struct is_pod_helper (::boost::type_traits::ice_or< ::boost::is_scalar::value, ::boost::is_void::value, - BOOST_IS_POD(T) + BOOST_INTERNAL_IS_POD(T) >::value)); }; }; @@ -132,4 +138,6 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_pod,T,::boost::detail::is_pod_impl::value) #include +#undef BOOST_INTERNAL_IS_POD + #endif // BOOST_TT_IS_POD_HPP_INCLUDED diff --git a/include/boost/type_traits/is_pointer.hpp b/include/boost/type_traits/is_pointer.hpp index f6ecf33..4e29bb3 100644 --- a/include/boost/type_traits/is_pointer.hpp +++ b/include/boost/type_traits/is_pointer.hpp @@ -113,7 +113,7 @@ no_type BOOST_TT_DECL is_pointer_tester(...); template struct is_pointer_select - : ::boost::type_traits::false_result + : public ::boost::type_traits::false_result { }; @@ -133,7 +133,7 @@ struct is_pointer_select template struct is_pointer_impl - : is_pointer_select< + : public is_pointer_select< ::boost::type_traits::ice_or< ::boost::is_reference::value , ::boost::is_array::value diff --git a/include/boost/type_traits/is_union.hpp b/include/boost/type_traits/is_union.hpp index 25bddcc..610f162 100644 --- a/include/boost/type_traits/is_union.hpp +++ b/include/boost/type_traits/is_union.hpp @@ -25,7 +25,11 @@ namespace detail { template struct is_union_impl { typedef typename remove_cv::type cvt; +#ifdef BOOST_IS_UNION BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(cvt)); +#else + BOOST_STATIC_CONSTANT(bool, value = false); +#endif }; #else // @@ -35,7 +39,11 @@ template struct is_union_impl // template struct is_union_impl { +#ifdef BOOST_IS_UNION BOOST_STATIC_CONSTANT(bool, value = BOOST_IS_UNION(T)); +#else + BOOST_STATIC_CONSTANT(bool, value = false); +#endif }; #endif } // namespace detail diff --git a/include/boost/type_traits/is_virtual_base_of.hpp b/include/boost/type_traits/is_virtual_base_of.hpp index 8dcd988..ffb021e 100644 --- a/include/boost/type_traits/is_virtual_base_of.hpp +++ b/include/boost/type_traits/is_virtual_base_of.hpp @@ -52,14 +52,14 @@ struct is_virtual_base_of_impl ~boost_type_traits_internal_struct_Y()throw(); }; #else - struct boost_type_traits_internal_struct_X : Derived, virtual Base + struct boost_type_traits_internal_struct_X : public Derived, virtual Base { boost_type_traits_internal_struct_X(); boost_type_traits_internal_struct_X(const boost_type_traits_internal_struct_X&); boost_type_traits_internal_struct_X& operator=(const boost_type_traits_internal_struct_X&); ~boost_type_traits_internal_struct_X()throw(); }; - struct boost_type_traits_internal_struct_Y : Derived + struct boost_type_traits_internal_struct_Y : public Derived { boost_type_traits_internal_struct_Y(); boost_type_traits_internal_struct_Y(const boost_type_traits_internal_struct_Y&); diff --git a/include/boost/type_traits/is_volatile.hpp b/include/boost/type_traits/is_volatile.hpp index 43c3a8b..863747d 100644 --- a/include/boost/type_traits/is_volatile.hpp +++ b/include/boost/type_traits/is_volatile.hpp @@ -94,7 +94,7 @@ no_type is_volatile_tester(void const*); template struct is_volatile_helper - : ::boost::type_traits::false_result + : public ::boost::type_traits::false_result { }; @@ -124,7 +124,7 @@ struct is_volatile_helper template struct is_volatile_impl - : is_volatile_helper< + : public is_volatile_helper< is_reference::value , is_array::value >::template result_ diff --git a/include/boost/type_traits/msvc/typeof.hpp b/include/boost/type_traits/msvc/typeof.hpp index ebb0e80..b95785d 100644 --- a/include/boost/type_traits/msvc/typeof.hpp +++ b/include/boost/type_traits/msvc/typeof.hpp @@ -20,7 +20,7 @@ namespace boost { namespace detail { }; template - struct msvc_register_type : msvc_extract_type + struct msvc_register_type : public msvc_extract_type { template<> struct id2type_impl //VC7.0 specific bugfeature @@ -36,7 +36,7 @@ namespace boost { namespace detail { }; template - struct msvc_register_type : msvc_extract_type + struct msvc_register_type : public msvc_extract_type { typedef msvc_extract_type base_type; struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature diff --git a/include/boost/type_traits/promote.hpp b/include/boost/type_traits/promote.hpp index 14efad4..60f6278 100644 --- a/include/boost/type_traits/promote.hpp +++ b/include/boost/type_traits/promote.hpp @@ -19,7 +19,7 @@ namespace detail { template struct promote_impl - : integral_promotion< + : public integral_promotion< BOOST_DEDUCED_TYPENAME floating_point_promotion::type > { diff --git a/include/boost/type_traits/remove_pointer.hpp b/include/boost/type_traits/remove_pointer.hpp index 5359992..01253db 100644 --- a/include/boost/type_traits/remove_pointer.hpp +++ b/include/boost/type_traits/remove_pointer.hpp @@ -9,12 +9,17 @@ #ifndef BOOST_TT_REMOVE_POINTER_HPP_INCLUDED #define BOOST_TT_REMOVE_POINTER_HPP_INCLUDED -#include #include #include +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#include +#endif #if BOOST_WORKAROUND(BOOST_MSVC,<=1300) #include +#elif defined(BOOST_MSVC) +#include +#include #endif // should be the last #include @@ -22,7 +27,51 @@ namespace boost { -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#ifdef BOOST_MSVC + +namespace detail{ + + // + // We need all this crazy indirection because a type such as: + // + // T (*const)(U) + // + // Does not bind to a or partial specialization with VC10 and earlier + // + template + struct remove_pointer_imp + { + typedef T type; + }; + + template + struct remove_pointer_imp + { + typedef T type; + }; + + template + struct remove_pointer_imp3 + { + typedef typename remove_pointer_imp::type>::type type; + }; + + template + struct remove_pointer_imp3 + { + typedef T type; + }; + + template + struct remove_pointer_imp2 + { + typedef typename remove_pointer_imp3::value>::type type; + }; +} + +BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,typename boost::detail::remove_pointer_imp2::type) + +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_pointer,T,T) BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(typename T,remove_pointer,T*,T) diff --git a/include/boost/type_traits/type_with_alignment.hpp b/include/boost/type_traits/type_with_alignment.hpp index ac31055..5de3bce 100644 --- a/include/boost/type_traits/type_with_alignment.hpp +++ b/include/boost/type_traits/type_with_alignment.hpp @@ -86,7 +86,7 @@ struct lower_alignment_helper_impl { template struct apply - : mpl::if_c<(alignment_of::value == target), TestType, char> + : public mpl::if_c<(alignment_of::value == target), TestType, char> { enum { value = (alignment_of::value == target) }; }; @@ -94,7 +94,7 @@ struct lower_alignment_helper_impl template struct lower_alignment_helper - : lower_alignment_helper_impl::template apply + : public lower_alignment_helper_impl::template apply { }; #else diff --git a/test/check_type.hpp b/test/check_type.hpp index 700551a..33ed399 100644 --- a/test/check_type.hpp +++ b/test/check_type.hpp @@ -40,6 +40,32 @@ do{\ << BOOST_STRINGIZE(expression) << "\"");\ }while(0) +#define BOOST_CHECK_TYPE3(type_expression, type_expression_suffix, expected_type)\ +do{\ + if(!::boost::is_same< type_expression, type_expression_suffix, expected_type >::value){\ + BOOST_CHECK_MESSAGE(false, "The expression: \"" << BOOST_STRINGIZE(expression)\ + << "\" did not have the expected type:\n\tevaluating: boost::is_same<"\ + << BOOST_STRINGIZE((type_expression, type_expression_suffix)) << ", " << BOOST_STRINGIZE(expected_type)\ + << ">" << "\n\tfound: "\ + << typeid(::boost::is_same< type_expression, type_expression_suffix, expected_type >).name());\ + }else\ + BOOST_CHECK_MESSAGE(true, "Validating Type Expression: \""\ + << BOOST_STRINGIZE(expression) << "\"");\ +}while(0) + +#define BOOST_CHECK_TYPE4(type_expression, suffix1, suffix2, expected_type)\ +do{\ + if(!::boost::is_same< type_expression, suffix1, suffix2, expected_type >::value){\ + BOOST_CHECK_MESSAGE(false, "The expression: \"" << BOOST_STRINGIZE(expression)\ + << "\" did not have the expected type:\n\tevaluating: boost::is_same<"\ + << BOOST_STRINGIZE((type_expression, suffix1, suffix2)) << ", " << BOOST_STRINGIZE(expected_type)\ + << ">" << "\n\tfound: "\ + << typeid(::boost::is_same< type_expression, suffix1, suffix2, expected_type >).name());\ + }else\ + BOOST_CHECK_MESSAGE(true, "Validating Type Expression: \""\ + << BOOST_STRINGIZE(expression) << "\"");\ +}while(0) + #endif diff --git a/test/common_type_2_test.cpp b/test/common_type_2_test.cpp new file mode 100644 index 0000000..c76c2ef --- /dev/null +++ b/test/common_type_2_test.cpp @@ -0,0 +1,217 @@ +// common_type_test.cpp ----------------------------------------------------// + +// Copyright 2010 Beman Dawes + +// Distributed under the Boost Software License, Version 1.0. +// See http://www.boost.org/LICENSE_1_0.txt + +#define BOOST_COMMON_TYPE_DONT_USE_TYPEOF 1 + +#include "test.hpp" +#include "check_type.hpp" +#ifdef TEST_STD +# include +#else +# include +#endif +#include + +#ifdef BOOST_INTEL +#pragma warning(disable: 304 383) +#endif + +struct C1 {}; + +struct C2 {}; + + +struct C3 : C2 {}; +struct C1C2 { + C1C2() {} + C1C2(C1 const&) {} + C1C2(C2 const&) {} + C1C2& operator=(C1C2 const&) { + return *this; + } +}; + +template +void proc2(typename boost::common_type::type const& ) {} + +template +void proc3(typename boost::common_type::type const& ) {} + +template +void assignation_2() { +typedef typename boost::common_type::type AC; + A a; + C c; + AC ac; + ac=a; + ac=c; + + proc2(a); + proc2(c); + +} + +template +void assignation_3() { +typedef typename boost::common_type::type ABC; + A a; + B b; + C c; + ABC abc; + + abc=a; + abc=b; + abc=c; + + proc3(a); + proc3(b); + proc3(c); +} + +C1C2 c1c2; +C1 c1; + +int f(C1C2 ) { return 1;} +int f(C1 ) { return 2;} +template +OSTREAM& operator<<(OSTREAM& os, C1 const&) {return os;} + +C1C2& declval_C1C2() {return c1c2;} +C1& declval_C1(){return c1;} +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; + typedef tt::common_type::type T3; +#if defined(BOOST_NO_DECLTYPE) && !defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) + // fails if BOOST_COMMON_TYPE_DONT_USE_TYPEOF: + typedef tt::common_type::type T4; +#endif + typedef tt::common_type::type T5; + + assignation_2(); + assignation_2(); + assignation_2(); + assignation_3(); + assignation_3(); + 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); + + BOOST_CHECK_TYPE3(tt::common_type::type, char); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned char); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, short); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned short); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, double); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + BOOST_CHECK_TYPE3(tt::common_type::type, double); + BOOST_CHECK_TYPE3(tt::common_type::type, double); + BOOST_CHECK_TYPE3(tt::common_type::type, double); + BOOST_CHECK_TYPE3(tt::common_type::type, double); + BOOST_CHECK_TYPE3(tt::common_type::type, double); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, double); + BOOST_CHECK_TYPE3(tt::common_type::type, double); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + + BOOST_CHECK_TYPE4(tt::common_type::type, double); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE4(tt::common_type::type, boost::long_long_type); +#endif +} +TT_TEST_END diff --git a/test/common_type_test.cpp b/test/common_type_test.cpp index 22a0fd0..bd1a54a 100644 --- a/test/common_type_test.cpp +++ b/test/common_type_test.cpp @@ -103,5 +103,108 @@ TT_TEST_BEGIN(common_type) assignation_3(); assignation_3(); //assignation_3(); // fails because the common type is the third + + BOOST_CHECK_TYPE(tt::common_type::type, int); + BOOST_CHECK_TYPE(tt::common_type::type, char); + + BOOST_CHECK_TYPE3(tt::common_type::type, char); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned char); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, short); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned short); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); + BOOST_CHECK_TYPE3(tt::common_type::type, unsigned int); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::long_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, boost::ulong_long_type); + BOOST_CHECK_TYPE3(tt::common_type::type, double); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + BOOST_CHECK_TYPE3(tt::common_type::type, double); + BOOST_CHECK_TYPE3(tt::common_type::type, double); + BOOST_CHECK_TYPE3(tt::common_type::type, double); + BOOST_CHECK_TYPE3(tt::common_type::type, double); + BOOST_CHECK_TYPE3(tt::common_type::type, double); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE3(tt::common_type::type, double); + BOOST_CHECK_TYPE3(tt::common_type::type, double); +#endif + BOOST_CHECK_TYPE3(tt::common_type::type, double); + + BOOST_CHECK_TYPE4(tt::common_type::type, double); +#ifndef BOOST_NO_LONG_LONG + BOOST_CHECK_TYPE4(tt::common_type::type, boost::long_long_type); +#endif } TT_TEST_END diff --git a/test/has_nothrow_assign_test.cpp b/test/has_nothrow_assign_test.cpp index a007396..1bcf3ac 100644 --- a/test/has_nothrow_assign_test.cpp +++ b/test/has_nothrow_assign_test.cpp @@ -193,7 +193,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, false); // cases we would like to succeed but can't implement in the language: BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, true, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_assign::value, true, false); diff --git a/test/has_nothrow_constr_test.cpp b/test/has_nothrow_constr_test.cpp index ad60226..94bce1e 100644 --- a/test/has_nothrow_constr_test.cpp +++ b/test/has_nothrow_constr_test.cpp @@ -151,7 +151,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, t BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, false); // cases we would like to succeed but can't implement in the language: BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, true, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_constructor::value, true, false); diff --git a/test/has_nothrow_copy_test.cpp b/test/has_nothrow_copy_test.cpp index 216168a..8b993f9 100644 --- a/test/has_nothrow_copy_test.cpp +++ b/test/has_nothrow_copy_test.cpp @@ -189,7 +189,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, false); // cases we would like to succeed but can't implement in the language: BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, true, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_nothrow_copy::value, true, false); diff --git a/test/has_trivial_assign_test.cpp b/test/has_trivial_assign_test.cpp index 44254c5..39b1716 100644 --- a/test/has_trivial_assign_test.cpp +++ b/test/has_trivial_assign_test.cpp @@ -185,7 +185,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, false); // cases we would like to succeed but can't implement in the language: BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, true, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_assign::value, true, false); diff --git a/test/has_trivial_copy_test.cpp b/test/has_trivial_copy_test.cpp index 43e3fad..85e9d0d 100644 --- a/test/has_trivial_copy_test.cpp +++ b/test/has_trivial_copy_test.cpp @@ -185,7 +185,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, false); // cases we would like to succeed but can't implement in the language: BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, true, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_copy::value, true, false); diff --git a/test/has_trivial_destructor_test.cpp b/test/has_trivial_destructor_test.cpp index 98db25d..a2f1632 100644 --- a/test/has_trivial_destructor_test.cpp +++ b/test/has_trivial_destructor_test.cpp @@ -154,7 +154,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, tr BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, true); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, false); BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, false); -BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, true); +BOOST_CHECK_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, false); // cases we would like to succeed but can't implement in the language: BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, true, false); BOOST_CHECK_SOFT_INTEGRAL_CONSTANT(::tt::has_trivial_destructor::value, true, false); diff --git a/test/is_convertible_test.cpp b/test/is_convertible_test.cpp index e88a2ef..7c04e91 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 { }; +#if !defined(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 + +#if defined(BOOST_MSVC) && (BOOST_MSVC > 1310) +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), false); +BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible::value), true); +#endif TT_TEST_END - - - - - - - diff --git a/test/remove_pointer_test.cpp b/test/remove_pointer_test.cpp index a04146e..8ea738b 100644 --- a/test/remove_pointer_test.cpp +++ b/test/remove_pointer_test.cpp @@ -15,6 +15,7 @@ BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_1, ::tt::remove_pointer, const, const) BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_2, ::tt::remove_pointer, volatile, volatile) BOOST_DECL_TRANSFORM_TEST3(remove_pointer_test_3, ::tt::remove_pointer, *) +BOOST_DECL_TRANSFORM_TEST3(remove_pointer_test_3b, ::tt::remove_pointer, *const) BOOST_DECL_TRANSFORM_TEST0(remove_pointer_test_4, ::tt::remove_pointer) BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_5, ::tt::remove_pointer, const &, const&) BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_6, ::tt::remove_pointer, &, &) @@ -30,12 +31,15 @@ BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_5a, ::tt::remove_pointer, const && BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_6a, ::tt::remove_pointer, &&, &&) BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_13a, ::tt::remove_pointer, (&&)[2], (&&)[2]) #endif +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_14, ::tt::remove_pointer, (*)(long), (long)) +BOOST_DECL_TRANSFORM_TEST(remove_pointer_test_14b, ::tt::remove_pointer, (*const)(long), (long)) TT_TEST_BEGIN(remove_pointer) remove_pointer_test_1(); remove_pointer_test_2(); remove_pointer_test_3(); + remove_pointer_test_3b(); remove_pointer_test_4(); remove_pointer_test_5(); remove_pointer_test_6(); @@ -51,7 +55,8 @@ TT_TEST_BEGIN(remove_pointer) remove_pointer_test_6a(); remove_pointer_test_13a(); #endif - + remove_pointer_test_14(); + remove_pointer_test_14b(); TT_TEST_END diff --git a/test/test.hpp b/test/test.hpp index d1facd2..8bd6b90 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -7,6 +7,12 @@ #ifndef TT_TEST_HPP #define TT_TEST_HPP +#include + +#if defined(_WIN32_WCE) && defined(BOOST_MSVC) +#pragma warning(disable:4201) +#endif + #ifdef USE_UNIT_TEST # include #endif @@ -206,7 +212,12 @@ typedef int (UDT::*cmf)(int) const; // on some compilers): // typedef int& r_type; +#ifndef BOOST_INTEL typedef const r_type cr_type; +#else +// recent Intel compilers generate a hard error on the above: +typedef r_type cr_type; +#endif # ifdef BOOST_MSVC # pragma warning(pop) # elif defined(BOOST_INTEL)