From 19b82cc55b3fef9fcad278448f7239e161ec713d Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 6 Jan 2011 17:09:17 +0000 Subject: [PATCH 01/82] Fix inspection report issues. [SVN r67728] --- doc/common_type.qbk | 8 ++++++++ doc/conditional.qbk | 6 ++++++ include/boost/type_traits/function_traits.hpp | 2 +- include/boost/type_traits/is_const.hpp | 6 +++--- include/boost/type_traits/is_volatile.hpp | 6 +++--- include/boost/type_traits/remove_cv.hpp | 4 ++-- include/boost/type_traits/remove_reference.hpp | 4 ++-- test/common_type_fail.cpp | 3 +-- test/is_virtual_base_of_test.cpp | 8 ++++---- 9 files changed, 30 insertions(+), 17 deletions(-) diff --git a/doc/common_type.qbk b/doc/common_type.qbk index 71cfbf6..cc7cf21 100644 --- a/doc/common_type.qbk +++ b/doc/common_type.qbk @@ -1,3 +1,11 @@ +[/ + Copyright 2008 Howard Hinnant + Copyright 2008 Beman Dawes + Copyright 2010 John Maddock + 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). +] [/===================================================================] [section:common_type common_type] diff --git a/doc/conditional.qbk b/doc/conditional.qbk index 317bf53..af72844 100644 --- a/doc/conditional.qbk +++ b/doc/conditional.qbk @@ -1,3 +1,9 @@ +[/ + Copyright 2010 John Maddock. + 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). +] [/===================================================================] [section:conditional conditional] diff --git a/include/boost/type_traits/function_traits.hpp b/include/boost/type_traits/function_traits.hpp index 6d708cd..d715345 100644 --- a/include/boost/type_traits/function_traits.hpp +++ b/include/boost/type_traits/function_traits.hpp @@ -166,7 +166,7 @@ struct function_traits_helper template struct function_traits : - public boost::detail::function_traits_helper::type> + public boost::detail::function_traits_helper::type> { }; diff --git a/include/boost/type_traits/is_const.hpp b/include/boost/type_traits/is_const.hpp index 812ed15..99b0f36 100644 --- a/include/boost/type_traits/is_const.hpp +++ b/include/boost/type_traits/is_const.hpp @@ -59,16 +59,16 @@ template struct is_const_rvalue_filter { #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) - BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_const); + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_const); #else - BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_const); + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_const); #endif }; #ifndef BOOST_NO_RVALUE_REFERENCES template struct is_const_rvalue_filter { - BOOST_STATIC_CONSTANT(bool, value = false); + BOOST_STATIC_CONSTANT(bool, value = false); }; #endif } diff --git a/include/boost/type_traits/is_volatile.hpp b/include/boost/type_traits/is_volatile.hpp index e531263..43c3a8b 100644 --- a/include/boost/type_traits/is_volatile.hpp +++ b/include/boost/type_traits/is_volatile.hpp @@ -46,9 +46,9 @@ template struct is_volatile_rval_filter { #if BOOST_WORKAROUND(BOOST_MSVC, < 1400) - BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_volatile); + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::type*>::is_volatile); #else - BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_volatile); + BOOST_STATIC_CONSTANT(bool, value = ::boost::detail::cv_traits_imp::is_volatile); #endif }; #ifndef BOOST_NO_RVALUE_REFERENCES @@ -59,7 +59,7 @@ struct is_volatile_rval_filter template struct is_volatile_rval_filter { - BOOST_STATIC_CONSTANT(bool, value = false); + BOOST_STATIC_CONSTANT(bool, value = false); }; #endif } diff --git a/include/boost/type_traits/remove_cv.hpp b/include/boost/type_traits/remove_cv.hpp index 668e755..4061fd2 100644 --- a/include/boost/type_traits/remove_cv.hpp +++ b/include/boost/type_traits/remove_cv.hpp @@ -32,7 +32,7 @@ namespace detail{ template struct rvalue_ref_filter_rem_cv { - typedef typename boost::detail::cv_traits_imp::unqualified_type type; + typedef typename boost::detail::cv_traits_imp::unqualified_type type; }; #ifndef BOOST_NO_RVALUE_REFERENCES @@ -43,7 +43,7 @@ struct rvalue_ref_filter_rem_cv template struct rvalue_ref_filter_rem_cv { - typedef T&& type; + typedef T&& type; }; #endif diff --git a/include/boost/type_traits/remove_reference.hpp b/include/boost/type_traits/remove_reference.hpp index a87db33..f453086 100644 --- a/include/boost/type_traits/remove_reference.hpp +++ b/include/boost/type_traits/remove_reference.hpp @@ -32,13 +32,13 @@ namespace detail{ template struct remove_rvalue_ref { - typedef T type; + typedef T type; }; #ifndef BOOST_NO_RVALUE_REFERENCES template struct remove_rvalue_ref { - typedef T type; + typedef T type; }; #endif diff --git a/test/common_type_fail.cpp b/test/common_type_fail.cpp index fc97d2e..2b52252 100644 --- a/test/common_type_fail.cpp +++ b/test/common_type_fail.cpp @@ -24,5 +24,4 @@ struct C2 {}; typedef tt::common_type::type AC; - - \ No newline at end of file + diff --git a/test/is_virtual_base_of_test.cpp b/test/is_virtual_base_of_test.cpp index a9355f5..2877b4a 100644 --- a/test/is_virtual_base_of_test.cpp +++ b/test/is_virtual_base_of_test.cpp @@ -28,14 +28,14 @@ public: class non_virtual_base { public: - non_virtual_base(); + non_virtual_base(); }; class non_virtual_derived : public non_virtual_base { public: - non_virtual_derived(); - virtual int Y(); - virtual int X(); + non_virtual_derived(); + virtual int Y(); + virtual int X(); }; TT_TEST_BEGIN(is_virtual_base_of) From a865f64c2ff8a44b3a362e0956ef3fb03240d149 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 10 Jan 2011 13:17:45 +0000 Subject: [PATCH 02/82] Document the restrictions on is_virtual_base_of. Refs #3730. [SVN r67912] --- 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 | 7 ++--- doc/html/boost_typetraits/intrinsics.html | 1 + doc/html/boost_typetraits/intro.html | 1 + doc/html/boost_typetraits/mpl.html | 1 + doc/html/boost_typetraits/reference.html | 1 + .../boost_typetraits/reference/add_const.html | 1 + .../boost_typetraits/reference/add_cv.html | 1 + .../reference/add_lvalue_reference.html | 1 + .../reference/add_pointer.html | 1 + .../reference/add_reference.html | 1 + .../reference/add_rvalue_reference.html | 1 + .../reference/add_volatile.html | 1 + .../reference/aligned_storage.html | 1 + .../reference/alignment_of.html | 1 + .../reference/common_type.html | 15 ++++++----- .../reference/conditional.html | 1 + .../boost_typetraits/reference/decay.html | 1 + .../boost_typetraits/reference/extent.html | 1 + .../reference/floating_point_promotion.html | 1 + .../reference/function_traits.html | 1 + .../reference/has_new_operator.html | 1 + .../reference/has_no_throw_def_cons.html | 1 + .../reference/has_nothrow_assign.html | 1 + .../reference/has_nothrow_constructor.html | 1 + .../reference/has_nothrow_copy.html | 1 + .../reference/has_nothrow_cp_cons.html | 1 + .../reference/has_trivial_assign.html | 1 + .../reference/has_trivial_constructor.html | 1 + .../reference/has_trivial_copy.html | 1 + .../reference/has_trivial_cp_cons.html | 1 + .../reference/has_trivial_def_cons.html | 1 + .../reference/has_trivial_destructor.html | 1 + .../reference/has_virtual_destructor.html | 1 + .../reference/integral_constant.html | 1 + .../reference/integral_promotion.html | 1 + .../reference/is_abstract.html | 1 + .../reference/is_arithmetic.html | 1 + .../boost_typetraits/reference/is_array.html | 1 + .../reference/is_base_of.html | 1 + .../boost_typetraits/reference/is_class.html | 1 + .../reference/is_complex.html | 1 + .../reference/is_compound.html | 1 + .../boost_typetraits/reference/is_const.html | 1 + .../reference/is_convertible.html | 1 + .../boost_typetraits/reference/is_empty.html | 1 + .../boost_typetraits/reference/is_enum.html | 1 + .../reference/is_floating_point.html | 1 + .../reference/is_function.html | 1 + .../reference/is_fundamental.html | 1 + .../reference/is_integral.html | 1 + .../reference/is_lvalue_reference.html | 1 + .../reference/is_member_function_pointer.html | 1 + .../reference/is_member_object_pointer.html | 1 + .../reference/is_member_pointer.html | 1 + .../boost_typetraits/reference/is_object.html | 1 + .../boost_typetraits/reference/is_pod.html | 1 + .../reference/is_pointer.html | 1 + .../reference/is_polymorphic.html | 1 + .../reference/is_reference.html | 1 + .../reference/is_rvalue_reference.html | 1 + .../boost_typetraits/reference/is_same.html | 1 + .../boost_typetraits/reference/is_scalar.html | 1 + .../boost_typetraits/reference/is_signed.html | 1 + .../reference/is_stateless.html | 1 + .../boost_typetraits/reference/is_union.html | 1 + .../reference/is_unsigned.html | 1 + .../reference/is_virtual_base_of.html | 27 +++++++++++++++---- .../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 | 5 ++-- doc/html/index/s11.html | 3 ++- doc/html/index/s12.html | 3 ++- doc/html/index/s13.html | 3 ++- doc/html/index/s14.html | 3 ++- doc/is_virtual_base_of.qbk | 7 +++++ 105 files changed, 157 insertions(+), 30 deletions(-) diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index 7a5d858..2585545 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -1,3 +1,4 @@ + @@ -56,7 +57,7 @@ method available to them.

- + Type Traits

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

- + Implementation

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

- + Optimized copy

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

- + Was it worth it?

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

- + Pair of References

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

- + Conclusion

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

- + Acknowledgements

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

- + References
    diff --git a/doc/html/boost_typetraits/category.html b/doc/html/boost_typetraits/category.html index 3809935..228f739 100644 --- a/doc/html/boost_typetraits/category.html +++ b/doc/html/boost_typetraits/category.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/category/alignment.html b/doc/html/boost_typetraits/category/alignment.html index 0a07d56..c4a43f3 100644 --- a/doc/html/boost_typetraits/category/alignment.html +++ b/doc/html/boost_typetraits/category/alignment.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/category/function.html b/doc/html/boost_typetraits/category/function.html index 567e397..f98db03 100644 --- a/doc/html/boost_typetraits/category/function.html +++ b/doc/html/boost_typetraits/category/function.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index 46abc9b..749e621 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -1,3 +1,4 @@ + @@ -103,7 +104,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 aacdfb6..a9e456b 100644 --- a/doc/html/boost_typetraits/category/value_traits.html +++ b/doc/html/boost_typetraits/category/value_traits.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/category/value_traits/primary.html b/doc/html/boost_typetraits/category/value_traits/primary.html index 88c8481..53eedc6 100644 --- a/doc/html/boost_typetraits/category/value_traits/primary.html +++ b/doc/html/boost_typetraits/category/value_traits/primary.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/category/value_traits/properties.html b/doc/html/boost_typetraits/category/value_traits/properties.html index b212687..e870e41 100644 --- a/doc/html/boost_typetraits/category/value_traits/properties.html +++ b/doc/html/boost_typetraits/category/value_traits/properties.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/category/value_traits/relate.html b/doc/html/boost_typetraits/category/value_traits/relate.html index 7aec8fc..d885f05 100644 --- a/doc/html/boost_typetraits/category/value_traits/relate.html +++ b/doc/html/boost_typetraits/category/value_traits/relate.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/credits.html b/doc/html/boost_typetraits/credits.html index 8fa1efa..7754f97 100644 --- a/doc/html/boost_typetraits/credits.html +++ b/doc/html/boost_typetraits/credits.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/examples.html b/doc/html/boost_typetraits/examples.html index ff51628..ef277b0 100644 --- a/doc/html/boost_typetraits/examples.html +++ b/doc/html/boost_typetraits/examples.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/examples/copy.html b/doc/html/boost_typetraits/examples/copy.html index bdce58c..c5b086c 100644 --- a/doc/html/boost_typetraits/examples/copy.html +++ b/doc/html/boost_typetraits/examples/copy.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/examples/destruct.html b/doc/html/boost_typetraits/examples/destruct.html index 2e7b8ea..1a891e7 100644 --- a/doc/html/boost_typetraits/examples/destruct.html +++ b/doc/html/boost_typetraits/examples/destruct.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/examples/fill.html b/doc/html/boost_typetraits/examples/fill.html index aab0cf1..e1696f2 100644 --- a/doc/html/boost_typetraits/examples/fill.html +++ b/doc/html/boost_typetraits/examples/fill.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/examples/improved_min.html b/doc/html/boost_typetraits/examples/improved_min.html index c062ea3..c927db4 100644 --- a/doc/html/boost_typetraits/examples/improved_min.html +++ b/doc/html/boost_typetraits/examples/improved_min.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/examples/iter.html b/doc/html/boost_typetraits/examples/iter.html index 338d218..5085e7c 100644 --- a/doc/html/boost_typetraits/examples/iter.html +++ b/doc/html/boost_typetraits/examples/iter.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/examples/to_double.html b/doc/html/boost_typetraits/examples/to_double.html index 829bd27..e639aa1 100644 --- a/doc/html/boost_typetraits/examples/to_double.html +++ b/doc/html/boost_typetraits/examples/to_double.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/history.html b/doc/html/boost_typetraits/history.html index 08cd539..1df26a0 100644 --- a/doc/html/boost_typetraits/history.html +++ b/doc/html/boost_typetraits/history.html @@ -1,3 +1,4 @@ + @@ -27,7 +28,7 @@ History
- + Boost 1.45.0
    @@ -43,7 +44,7 @@
- + Boost 1.44.0
    @@ -59,7 +60,7 @@
- + Boost 1.42.0
  • diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html index d616d58..dcee173 100644 --- a/doc/html/boost_typetraits/intrinsics.html +++ b/doc/html/boost_typetraits/intrinsics.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/intro.html b/doc/html/boost_typetraits/intro.html index c825318..5bc4a2a 100644 --- a/doc/html/boost_typetraits/intro.html +++ b/doc/html/boost_typetraits/intro.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/mpl.html b/doc/html/boost_typetraits/mpl.html index 9ab019d..1b8aca7 100644 --- a/doc/html/boost_typetraits/mpl.html +++ b/doc/html/boost_typetraits/mpl.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference.html b/doc/html/boost_typetraits/reference.html index bad49b6..6d0f082 100644 --- a/doc/html/boost_typetraits/reference.html +++ b/doc/html/boost_typetraits/reference.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index 032e357..c39cd96 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index 038f15b..d83f5f9 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/add_lvalue_reference.html b/doc/html/boost_typetraits/reference/add_lvalue_reference.html index 80ef4f9..131f565 100644 --- a/doc/html/boost_typetraits/reference/add_lvalue_reference.html +++ b/doc/html/boost_typetraits/reference/add_lvalue_reference.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index 0399722..d1fca71 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index d66c9a6..86727b4 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/add_rvalue_reference.html b/doc/html/boost_typetraits/reference/add_rvalue_reference.html index 11b5a54..06ea976 100644 --- a/doc/html/boost_typetraits/reference/add_rvalue_reference.html +++ b/doc/html/boost_typetraits/reference/add_rvalue_reference.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index 0f4f782..2cbef17 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/aligned_storage.html b/doc/html/boost_typetraits/reference/aligned_storage.html index 4f63b65..bcc47af 100644 --- a/doc/html/boost_typetraits/reference/aligned_storage.html +++ b/doc/html/boost_typetraits/reference/aligned_storage.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/alignment_of.html b/doc/html/boost_typetraits/reference/alignment_of.html index 866a25e..fa4f4cd 100644 --- a/doc/html/boost_typetraits/reference/alignment_of.html +++ b/doc/html/boost_typetraits/reference/alignment_of.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/common_type.html b/doc/html/boost_typetraits/reference/common_type.html index 778e21a..d0a6b5a 100644 --- a/doc/html/boost_typetraits/reference/common_type.html +++ b/doc/html/boost_typetraits/reference/common_type.html @@ -1,3 +1,4 @@ + @@ -73,7 +74,7 @@ template arguments is 3.

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

    - + Tutorial

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

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

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

    - + How common_type behaves with pointers?
    @@ -303,7 +304,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 f2a044b..cd57451 100644 --- a/doc/html/boost_typetraits/reference/conditional.html +++ b/doc/html/boost_typetraits/reference/conditional.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index ec66715..8f03397 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/extent.html b/doc/html/boost_typetraits/reference/extent.html index c0bd830..6d2ae6e 100644 --- a/doc/html/boost_typetraits/reference/extent.html +++ b/doc/html/boost_typetraits/reference/extent.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index 747e10b..0d8d2ce 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/function_traits.html b/doc/html/boost_typetraits/reference/function_traits.html index fbd138f..29f8828 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/has_new_operator.html b/doc/html/boost_typetraits/reference/has_new_operator.html index b8e1deb..c7c8c73 100644 --- a/doc/html/boost_typetraits/reference/has_new_operator.html +++ b/doc/html/boost_typetraits/reference/has_new_operator.html @@ -1,3 +1,4 @@ + 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 093e956..316ac8e 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,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/has_nothrow_assign.html b/doc/html/boost_typetraits/reference/has_nothrow_assign.html index 0b37ded..c9c4b2c 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_assign.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_assign.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html index ab1fc2d..80d929a 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/has_nothrow_copy.html b/doc/html/boost_typetraits/reference/has_nothrow_copy.html index 116528a..ef0eddb 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_copy.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_copy.html @@ -1,3 +1,4 @@ + 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 9f71baa..148b56a 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/has_trivial_assign.html b/doc/html/boost_typetraits/reference/has_trivial_assign.html index eac89ef..d0c50b5 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_assign.html +++ b/doc/html/boost_typetraits/reference/has_trivial_assign.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/has_trivial_constructor.html b/doc/html/boost_typetraits/reference/has_trivial_constructor.html index 152cbae..0205c43 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_constructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_constructor.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/has_trivial_copy.html b/doc/html/boost_typetraits/reference/has_trivial_copy.html index 1325a1c..9f98228 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_copy.html +++ b/doc/html/boost_typetraits/reference/has_trivial_copy.html @@ -1,3 +1,4 @@ + 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 820d3fd..ad26838 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html @@ -1,3 +1,4 @@ + 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 64b603c..92d45f0 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/has_trivial_destructor.html b/doc/html/boost_typetraits/reference/has_trivial_destructor.html index 8419cec..5b8af16 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_destructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_destructor.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/has_virtual_destructor.html b/doc/html/boost_typetraits/reference/has_virtual_destructor.html index b80bf98..1198686 100644 --- a/doc/html/boost_typetraits/reference/has_virtual_destructor.html +++ b/doc/html/boost_typetraits/reference/has_virtual_destructor.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/integral_constant.html b/doc/html/boost_typetraits/reference/integral_constant.html index d6c187f..4b3429a 100644 --- a/doc/html/boost_typetraits/reference/integral_constant.html +++ b/doc/html/boost_typetraits/reference/integral_constant.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/integral_promotion.html b/doc/html/boost_typetraits/reference/integral_promotion.html index f4394d4..9682256 100644 --- a/doc/html/boost_typetraits/reference/integral_promotion.html +++ b/doc/html/boost_typetraits/reference/integral_promotion.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_abstract.html b/doc/html/boost_typetraits/reference/is_abstract.html index 2ef1fcb..0574ba0 100644 --- a/doc/html/boost_typetraits/reference/is_abstract.html +++ b/doc/html/boost_typetraits/reference/is_abstract.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_arithmetic.html b/doc/html/boost_typetraits/reference/is_arithmetic.html index bc4391d..fb52c94 100644 --- a/doc/html/boost_typetraits/reference/is_arithmetic.html +++ b/doc/html/boost_typetraits/reference/is_arithmetic.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_array.html b/doc/html/boost_typetraits/reference/is_array.html index 9e9ca8a..ddaa49a 100644 --- a/doc/html/boost_typetraits/reference/is_array.html +++ b/doc/html/boost_typetraits/reference/is_array.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_base_of.html b/doc/html/boost_typetraits/reference/is_base_of.html index 3f0d77e..d815752 100644 --- a/doc/html/boost_typetraits/reference/is_base_of.html +++ b/doc/html/boost_typetraits/reference/is_base_of.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_class.html b/doc/html/boost_typetraits/reference/is_class.html index 3a76a48..313d8a2 100644 --- a/doc/html/boost_typetraits/reference/is_class.html +++ b/doc/html/boost_typetraits/reference/is_class.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_complex.html b/doc/html/boost_typetraits/reference/is_complex.html index 48f8f4e..df16a2c 100644 --- a/doc/html/boost_typetraits/reference/is_complex.html +++ b/doc/html/boost_typetraits/reference/is_complex.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_compound.html b/doc/html/boost_typetraits/reference/is_compound.html index 5a0713e..c20f3f0 100644 --- a/doc/html/boost_typetraits/reference/is_compound.html +++ b/doc/html/boost_typetraits/reference/is_compound.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_const.html b/doc/html/boost_typetraits/reference/is_const.html index b2ba6a9..5ecd1a2 100644 --- a/doc/html/boost_typetraits/reference/is_const.html +++ b/doc/html/boost_typetraits/reference/is_const.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_convertible.html b/doc/html/boost_typetraits/reference/is_convertible.html index 7d139c3..a6a57ee 100644 --- a/doc/html/boost_typetraits/reference/is_convertible.html +++ b/doc/html/boost_typetraits/reference/is_convertible.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_empty.html b/doc/html/boost_typetraits/reference/is_empty.html index f79e5d6..32e1c5a 100644 --- a/doc/html/boost_typetraits/reference/is_empty.html +++ b/doc/html/boost_typetraits/reference/is_empty.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_enum.html b/doc/html/boost_typetraits/reference/is_enum.html index fad1ab1..c405c13 100644 --- a/doc/html/boost_typetraits/reference/is_enum.html +++ b/doc/html/boost_typetraits/reference/is_enum.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_floating_point.html b/doc/html/boost_typetraits/reference/is_floating_point.html index 208e979..bda2b1c 100644 --- a/doc/html/boost_typetraits/reference/is_floating_point.html +++ b/doc/html/boost_typetraits/reference/is_floating_point.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_function.html b/doc/html/boost_typetraits/reference/is_function.html index 80259f1..1088932 100644 --- a/doc/html/boost_typetraits/reference/is_function.html +++ b/doc/html/boost_typetraits/reference/is_function.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_fundamental.html b/doc/html/boost_typetraits/reference/is_fundamental.html index 5426d76..4a23361 100644 --- a/doc/html/boost_typetraits/reference/is_fundamental.html +++ b/doc/html/boost_typetraits/reference/is_fundamental.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_integral.html b/doc/html/boost_typetraits/reference/is_integral.html index 0bc3719..fa9e547 100644 --- a/doc/html/boost_typetraits/reference/is_integral.html +++ b/doc/html/boost_typetraits/reference/is_integral.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_lvalue_reference.html b/doc/html/boost_typetraits/reference/is_lvalue_reference.html index 3d1cf79..634104f 100644 --- a/doc/html/boost_typetraits/reference/is_lvalue_reference.html +++ b/doc/html/boost_typetraits/reference/is_lvalue_reference.html @@ -1,3 +1,4 @@ + 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 83d649e..fc1b1aa 100644 --- a/doc/html/boost_typetraits/reference/is_member_function_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_function_pointer.html @@ -1,3 +1,4 @@ + 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 0566d85..49de07f 100644 --- a/doc/html/boost_typetraits/reference/is_member_object_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_object_pointer.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_member_pointer.html b/doc/html/boost_typetraits/reference/is_member_pointer.html index 09781dc..b2a3461 100644 --- a/doc/html/boost_typetraits/reference/is_member_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_pointer.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_object.html b/doc/html/boost_typetraits/reference/is_object.html index d8b7069..41c054b 100644 --- a/doc/html/boost_typetraits/reference/is_object.html +++ b/doc/html/boost_typetraits/reference/is_object.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_pod.html b/doc/html/boost_typetraits/reference/is_pod.html index 59a698c..7efb506 100644 --- a/doc/html/boost_typetraits/reference/is_pod.html +++ b/doc/html/boost_typetraits/reference/is_pod.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_pointer.html b/doc/html/boost_typetraits/reference/is_pointer.html index b1c5fcc..86c4219 100644 --- a/doc/html/boost_typetraits/reference/is_pointer.html +++ b/doc/html/boost_typetraits/reference/is_pointer.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_polymorphic.html b/doc/html/boost_typetraits/reference/is_polymorphic.html index a0e9459..9b1ed12 100644 --- a/doc/html/boost_typetraits/reference/is_polymorphic.html +++ b/doc/html/boost_typetraits/reference/is_polymorphic.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_reference.html b/doc/html/boost_typetraits/reference/is_reference.html index 8ed01a8..146f0a1 100644 --- a/doc/html/boost_typetraits/reference/is_reference.html +++ b/doc/html/boost_typetraits/reference/is_reference.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_rvalue_reference.html b/doc/html/boost_typetraits/reference/is_rvalue_reference.html index 339a9ce..ffabd8f 100644 --- a/doc/html/boost_typetraits/reference/is_rvalue_reference.html +++ b/doc/html/boost_typetraits/reference/is_rvalue_reference.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_same.html b/doc/html/boost_typetraits/reference/is_same.html index 5de12a9..c6aced7 100644 --- a/doc/html/boost_typetraits/reference/is_same.html +++ b/doc/html/boost_typetraits/reference/is_same.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_scalar.html b/doc/html/boost_typetraits/reference/is_scalar.html index 7d935c2..623094b 100644 --- a/doc/html/boost_typetraits/reference/is_scalar.html +++ b/doc/html/boost_typetraits/reference/is_scalar.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_signed.html b/doc/html/boost_typetraits/reference/is_signed.html index 91dcb58..b5ef201 100644 --- a/doc/html/boost_typetraits/reference/is_signed.html +++ b/doc/html/boost_typetraits/reference/is_signed.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_stateless.html b/doc/html/boost_typetraits/reference/is_stateless.html index fbd994d..f5e804d 100644 --- a/doc/html/boost_typetraits/reference/is_stateless.html +++ b/doc/html/boost_typetraits/reference/is_stateless.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_union.html b/doc/html/boost_typetraits/reference/is_union.html index 6906b97..930ead7 100644 --- a/doc/html/boost_typetraits/reference/is_union.html +++ b/doc/html/boost_typetraits/reference/is_union.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_unsigned.html b/doc/html/boost_typetraits/reference/is_unsigned.html index be5dbc8..9f3d282 100644 --- a/doc/html/boost_typetraits/reference/is_unsigned.html +++ b/doc/html/boost_typetraits/reference/is_unsigned.html @@ -1,3 +1,4 @@ + 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 21ae774..8ef1c8b 100644 --- a/doc/html/boost_typetraits/reference/is_virtual_base_of.html +++ b/doc/html/boost_typetraits/reference/is_virtual_base_of.html @@ -1,3 +1,4 @@ + @@ -50,13 +51,29 @@ requires a working is_base_of trait.

    +
    + + + + + +
    [Note]Note

    - Examples: -

    -

    - Given: class Base{}; class Derived : public virtual + There are a small number of cases where it's simply not possible for this + trait to work, and where attempting to instantiate the trait will cause + compiler errors (see bug report #3730). + Further more the issues may well be compiler specific. In this situation + the user should supply a full specialization of the trait to work around + the problem. +

    +

    + Examples: +

    +

    + [:Given: class Base{}; class Derived : public virtual Base{}; -

    +

    +

    is_virtual_base_of<Base, Derived> inherits from true_type. diff --git a/doc/html/boost_typetraits/reference/is_void.html b/doc/html/boost_typetraits/reference/is_void.html index defa838..693c9bc 100644 --- a/doc/html/boost_typetraits/reference/is_void.html +++ b/doc/html/boost_typetraits/reference/is_void.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/is_volatile.html b/doc/html/boost_typetraits/reference/is_volatile.html index 4556531..89d32ef 100644 --- a/doc/html/boost_typetraits/reference/is_volatile.html +++ b/doc/html/boost_typetraits/reference/is_volatile.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/make_signed.html b/doc/html/boost_typetraits/reference/make_signed.html index 08fd753..b4f48ac 100644 --- a/doc/html/boost_typetraits/reference/make_signed.html +++ b/doc/html/boost_typetraits/reference/make_signed.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/make_unsigned.html b/doc/html/boost_typetraits/reference/make_unsigned.html index 4df01aa..06fc250 100644 --- a/doc/html/boost_typetraits/reference/make_unsigned.html +++ b/doc/html/boost_typetraits/reference/make_unsigned.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/promote.html b/doc/html/boost_typetraits/reference/promote.html index ad566af..583cdd2 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/rank.html b/doc/html/boost_typetraits/reference/rank.html index 4ea0d33..3ef6a0e 100644 --- a/doc/html/boost_typetraits/reference/rank.html +++ b/doc/html/boost_typetraits/reference/rank.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/remove_all_extents.html b/doc/html/boost_typetraits/reference/remove_all_extents.html index 533b83b..afe4b6c 100644 --- a/doc/html/boost_typetraits/reference/remove_all_extents.html +++ b/doc/html/boost_typetraits/reference/remove_all_extents.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/remove_const.html b/doc/html/boost_typetraits/reference/remove_const.html index ce2fa9d..e287106 100644 --- a/doc/html/boost_typetraits/reference/remove_const.html +++ b/doc/html/boost_typetraits/reference/remove_const.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/remove_cv.html b/doc/html/boost_typetraits/reference/remove_cv.html index 607529b..479335f 100644 --- a/doc/html/boost_typetraits/reference/remove_cv.html +++ b/doc/html/boost_typetraits/reference/remove_cv.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/remove_extent.html b/doc/html/boost_typetraits/reference/remove_extent.html index cc5d193..fb929fb 100644 --- a/doc/html/boost_typetraits/reference/remove_extent.html +++ b/doc/html/boost_typetraits/reference/remove_extent.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/remove_pointer.html b/doc/html/boost_typetraits/reference/remove_pointer.html index 1569795..53c75c6 100644 --- a/doc/html/boost_typetraits/reference/remove_pointer.html +++ b/doc/html/boost_typetraits/reference/remove_pointer.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/remove_reference.html b/doc/html/boost_typetraits/reference/remove_reference.html index 16dbcc3..2dbcf92 100644 --- a/doc/html/boost_typetraits/reference/remove_reference.html +++ b/doc/html/boost_typetraits/reference/remove_reference.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/remove_volatile.html b/doc/html/boost_typetraits/reference/remove_volatile.html index 0954c14..63a7942 100644 --- a/doc/html/boost_typetraits/reference/remove_volatile.html +++ b/doc/html/boost_typetraits/reference/remove_volatile.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/reference/type_with_alignment.html b/doc/html/boost_typetraits/reference/type_with_alignment.html index a9e7401..e9d7dfa 100644 --- a/doc/html/boost_typetraits/reference/type_with_alignment.html +++ b/doc/html/boost_typetraits/reference/type_with_alignment.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/boost_typetraits/user_defined.html b/doc/html/boost_typetraits/user_defined.html index 521f7ac..a6b6660 100644 --- a/doc/html/boost_typetraits/user_defined.html +++ b/doc/html/boost_typetraits/user_defined.html @@ -1,3 +1,4 @@ + diff --git a/doc/html/index.html b/doc/html/index.html index d3e5774..8df9c0e 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -1,3 +1,4 @@ + @@ -30,7 +31,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)

    @@ -171,7 +172,7 @@

    - +

    Last revised: November 07, 2010 at 15:10:13 +0000

    Last revised: January 01, 2011 at 17:01:48 +0000


    diff --git a/doc/html/index/s11.html b/doc/html/index/s11.html index c919553..982785e 100644 --- a/doc/html/index/s11.html +++ b/doc/html/index/s11.html @@ -1,3 +1,4 @@ + @@ -24,7 +25,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 4422062..0d4780e 100644 --- a/doc/html/index/s12.html +++ b/doc/html/index/s12.html @@ -1,3 +1,4 @@ + @@ -24,7 +25,7 @@

-Typedef Index

+Typedef Index

F R T

diff --git a/doc/html/index/s13.html b/doc/html/index/s13.html index 6a4c8eb..e577a36 100644 --- a/doc/html/index/s13.html +++ b/doc/html/index/s13.html @@ -1,3 +1,4 @@ + @@ -24,7 +25,7 @@

-Macro Index

+Macro Index

B

diff --git a/doc/html/index/s14.html b/doc/html/index/s14.html index 6072f6d..401ef2c 100644 --- a/doc/html/index/s14.html +++ b/doc/html/index/s14.html @@ -1,3 +1,4 @@ + @@ -23,7 +24,7 @@

-Index

+Index

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

diff --git a/doc/is_virtual_base_of.qbk b/doc/is_virtual_base_of.qbk index 72cf23a..54202de 100644 --- a/doc/is_virtual_base_of.qbk +++ b/doc/is_virtual_base_of.qbk @@ -20,6 +20,13 @@ __header ` #include ` or ` #include Date: Mon, 10 Jan 2011 13:23:51 +0000 Subject: [PATCH 03/82] Document the restrictions on is_virtual_base_of. Refs #3730. [SVN r67913] --- doc/html/boost_typetraits/background.html | 16 ++++++------- .../boost_typetraits/category/transform.html | 2 +- doc/html/boost_typetraits/history.html | 6 ++--- .../reference/common_type.html | 14 +++++------ .../reference/is_virtual_base_of.html | 24 +++++++++---------- doc/html/index.html | 2 +- doc/html/index/s11.html | 2 +- doc/html/index/s12.html | 2 +- doc/html/index/s13.html | 2 +- doc/html/index/s14.html | 2 +- doc/is_virtual_base_of.qbk | 2 +- 11 files changed, 36 insertions(+), 38 deletions(-) diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index 2585545..add632a 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -57,7 +57,7 @@ method available to them.

- + Type Traits

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

- + Implementation

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

- + Optimized copy

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

- + Was it worth it?

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


- + Pair of References

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

- + Conclusion

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

- + Acknowledgements

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

- + References
    diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index 749e621..1006b48 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -104,7 +104,7 @@ struct remove_volatile;
    - + Broken Compiler Workarounds:
    diff --git a/doc/html/boost_typetraits/history.html b/doc/html/boost_typetraits/history.html index 1df26a0..e9e116b 100644 --- a/doc/html/boost_typetraits/history.html +++ b/doc/html/boost_typetraits/history.html @@ -28,7 +28,7 @@ History
- + Boost 1.45.0
    @@ -44,7 +44,7 @@
- + Boost 1.44.0
    @@ -60,7 +60,7 @@
- + Boost 1.42.0
  • diff --git a/doc/html/boost_typetraits/reference/common_type.html b/doc/html/boost_typetraits/reference/common_type.html index d0a6b5a..a59a850 100644 --- a/doc/html/boost_typetraits/reference/common_type.html +++ b/doc/html/boost_typetraits/reference/common_type.html @@ -74,7 +74,7 @@ template arguments is 3.

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

    - + Tutorial

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

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

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

    - + How common_type behaves with pointers?
    @@ -304,7 +304,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/is_virtual_base_of.html b/doc/html/boost_typetraits/reference/is_virtual_base_of.html index 8ef1c8b..ece8545 100644 --- a/doc/html/boost_typetraits/reference/is_virtual_base_of.html +++ b/doc/html/boost_typetraits/reference/is_virtual_base_of.html @@ -56,24 +56,22 @@ [Note] Note - -

    +

    There are a small number of cases where it's simply not possible for this trait to work, and where attempting to instantiate the trait will cause - compiler errors (see bug report #3730). + compiler errors (see bug report #3730). Further more the issues may well be compiler specific. In this situation the user should supply a full specialization of the trait to work around - the problem. -

    -

    - Examples: -

    -

    - [:Given: class Base{}; class Derived : public virtual - Base{}; -

    - + the problem. +

+

+ Examples: +

+

+ Given: class Base{}; class Derived : public virtual + Base{}; +

is_virtual_base_of<Base, Derived> inherits from true_type. diff --git a/doc/html/index.html b/doc/html/index.html index 8df9c0e..06eee07 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -31,7 +31,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 982785e..a875e7d 100644 --- a/doc/html/index/s11.html +++ b/doc/html/index/s11.html @@ -25,7 +25,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 0d4780e..e6e1fe4 100644 --- a/doc/html/index/s12.html +++ b/doc/html/index/s12.html @@ -25,7 +25,7 @@

-Typedef Index

+Typedef Index

F R T

diff --git a/doc/html/index/s13.html b/doc/html/index/s13.html index e577a36..97c9a37 100644 --- a/doc/html/index/s13.html +++ b/doc/html/index/s13.html @@ -25,7 +25,7 @@

-Macro Index

+Macro Index

B

diff --git a/doc/html/index/s14.html b/doc/html/index/s14.html index 401ef2c..66b2729 100644 --- a/doc/html/index/s14.html +++ b/doc/html/index/s14.html @@ -24,7 +24,7 @@

-Index

+Index

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

diff --git a/doc/is_virtual_base_of.qbk b/doc/is_virtual_base_of.qbk index 54202de..f7b5f80 100644 --- a/doc/is_virtual_base_of.qbk +++ b/doc/is_virtual_base_of.qbk @@ -23,7 +23,7 @@ __compat this trait also requires a working __is_base_of trait. [note There are a small number of cases where it's simply not possible for this trait to work, and where attempting to instantiate the trait will cause compiler errors (see bug report -[@https://svn.boost.org/trac/boost/ticket/3730 #3730). Further more the issues may well +[@https://svn.boost.org/trac/boost/ticket/3730 #3730]). Further more the issues may well be compiler specific. In this situation the user should supply a full specialization of the trait to work around the problem.] From c02516b25b2b51c5e835c07427ae3dbe1364af12 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 12 Jan 2011 13:29:37 +0000 Subject: [PATCH 04/82] Fix comon_type to actually work when typeof isn't in use. Applies fixes from Vicente Botet. [SVN r68040] --- .../type_traits/detail/common_type_imp.hpp | 67 ++++-- test/check_type.hpp | 26 +++ test/common_type_2_test.cpp | 212 ++++++++++++++++++ test/common_type_test.cpp | 103 +++++++++ 4 files changed, 390 insertions(+), 18 deletions(-) create mode 100644 test/common_type_2_test.cpp diff --git a/include/boost/type_traits/detail/common_type_imp.hpp b/include/boost/type_traits/detail/common_type_imp.hpp index 9e06282..59c7743 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 +struct is_integral_or_enum : mpl::or_< is_integral, is_enum > { }; template<> -struct is_signable_integral< bool > +struct is_integral_or_enum< bool > : 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 + : make_unsigned +{ }; +template<> +struct make_unsigned_soft< bool > +{ typedef bool type; }; + +template< class T > +struct make_signed_soft + : make_signed +{ }; +template<> +struct make_signed_soft< bool > +{ typedef bool type; }; + /******************************************************************************* * struct sizeof_t * typedef ... yes_type @@ -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; }; 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..f878133 --- /dev/null +++ b/test/common_type_2_test.cpp @@ -0,0 +1,212 @@ +// 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) +{ + 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 + + 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 From 902217df2411129a4d26549fddd65002b433f762 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 13 Jan 2011 12:14:56 +0000 Subject: [PATCH 05/82] Don't try and redefine macros that are already set. [SVN r68095] --- include/boost/type_traits/common_type.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/boost/type_traits/common_type.hpp b/include/boost/type_traits/common_type.hpp index 74b0363..25c877f 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 From 6b8890aec8c91d1008306d6958160a62719edcfe Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 19 Jan 2011 12:49:55 +0000 Subject: [PATCH 06/82] Fix PDF name and PDF index generation. [SVN r68284] --- doc/Jamfile.v2 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 75f627d..31cd750 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -14,7 +14,8 @@ if --enable-index in [ modules.peek : ARGV ] html:on index.idx ../../.. - enable_index ; + enable_index + pdf:index.on.type=1 ; } else { @@ -76,8 +77,10 @@ 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 ; + + + From 5c40f50432a997d56ce85ea0abf39aadd95a5862 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 7 Feb 2011 16:39:33 +0000 Subject: [PATCH 07/82] Fix non-ASCII character. Fixes #5099. [SVN r68691] --- include/boost/type_traits/add_rvalue_reference.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 + From 104afb9ba4642fe52b8b5fa032a1619731ccd113 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 3 Mar 2011 11:23:57 +0000 Subject: [PATCH 08/82] Fix PDF build from within boost-root/doc/pdf. [SVN r69512] --- doc/Jamfile.v2 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 31cd750..096aaeb 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -5,6 +5,8 @@ import modules ; +path-constant here : . ; + if --enable-index in [ modules.peek : ARGV ] { ECHO "Building the type_traits docs with automatic index generation enabled." ; @@ -12,10 +14,9 @@ if --enable-index in [ modules.peek : ARGV ] project : requirements on pdf:off html:on - index.idx - ../../.. - enable_index - pdf:index.on.type=1 ; + $(here)/index.idx + $(here)/../../.. + enable_index ; } else { @@ -85,3 +86,4 @@ install pdf-install : standalone : PDF . type_trai + From ee29b7660f3495f9f7d35ac4080515b03e4d5a1b Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 10 Mar 2011 16:52:00 +0000 Subject: [PATCH 09/82] Change is_convertible to use C++0x behaviour where possible. Change is_converible to use MSVC __is_convertible intrinsic. Fixes #5271. Fixes #4530. [SVN r69822] --- doc/history.qbk | 7 +++ doc/html/boost_typetraits/background.html | 17 +++--- doc/html/boost_typetraits/category.html | 1 - .../boost_typetraits/category/alignment.html | 1 - .../boost_typetraits/category/function.html | 1 - .../boost_typetraits/category/transform.html | 3 +- .../category/value_traits.html | 1 - .../category/value_traits/primary.html | 1 - .../category/value_traits/properties.html | 1 - .../category/value_traits/relate.html | 1 - doc/html/boost_typetraits/credits.html | 1 - doc/html/boost_typetraits/examples.html | 1 - doc/html/boost_typetraits/examples/copy.html | 1 - .../boost_typetraits/examples/destruct.html | 1 - doc/html/boost_typetraits/examples/fill.html | 1 - .../examples/improved_min.html | 1 - doc/html/boost_typetraits/examples/iter.html | 1 - .../boost_typetraits/examples/to_double.html | 1 - doc/html/boost_typetraits/history.html | 21 +++++-- doc/html/boost_typetraits/intrinsics.html | 1 - doc/html/boost_typetraits/intro.html | 1 - doc/html/boost_typetraits/mpl.html | 1 - doc/html/boost_typetraits/reference.html | 1 - .../boost_typetraits/reference/add_const.html | 1 - .../boost_typetraits/reference/add_cv.html | 1 - .../reference/add_lvalue_reference.html | 1 - .../reference/add_pointer.html | 1 - .../reference/add_reference.html | 1 - .../reference/add_rvalue_reference.html | 1 - .../reference/add_volatile.html | 1 - .../reference/aligned_storage.html | 1 - .../reference/alignment_of.html | 1 - .../reference/common_type.html | 15 +++-- .../reference/conditional.html | 1 - .../boost_typetraits/reference/decay.html | 1 - .../boost_typetraits/reference/extent.html | 1 - .../reference/floating_point_promotion.html | 1 - .../reference/function_traits.html | 1 - .../reference/has_new_operator.html | 1 - .../reference/has_no_throw_def_cons.html | 1 - .../reference/has_nothrow_assign.html | 1 - .../reference/has_nothrow_constructor.html | 1 - .../reference/has_nothrow_copy.html | 1 - .../reference/has_nothrow_cp_cons.html | 1 - .../reference/has_trivial_assign.html | 1 - .../reference/has_trivial_constructor.html | 1 - .../reference/has_trivial_copy.html | 1 - .../reference/has_trivial_cp_cons.html | 1 - .../reference/has_trivial_def_cons.html | 1 - .../reference/has_trivial_destructor.html | 1 - .../reference/has_virtual_destructor.html | 1 - .../reference/integral_constant.html | 1 - .../reference/integral_promotion.html | 1 - .../reference/is_abstract.html | 1 - .../reference/is_arithmetic.html | 1 - .../boost_typetraits/reference/is_array.html | 1 - .../reference/is_base_of.html | 10 ++-- .../boost_typetraits/reference/is_class.html | 1 - .../reference/is_complex.html | 1 - .../reference/is_compound.html | 1 - .../boost_typetraits/reference/is_const.html | 1 - .../reference/is_convertible.html | 3 +- .../boost_typetraits/reference/is_empty.html | 1 - .../boost_typetraits/reference/is_enum.html | 1 - .../reference/is_floating_point.html | 1 - .../reference/is_function.html | 1 - .../reference/is_fundamental.html | 1 - .../reference/is_integral.html | 1 - .../reference/is_lvalue_reference.html | 1 - .../reference/is_member_function_pointer.html | 1 - .../reference/is_member_object_pointer.html | 1 - .../reference/is_member_pointer.html | 1 - .../boost_typetraits/reference/is_object.html | 1 - .../boost_typetraits/reference/is_pod.html | 1 - .../reference/is_pointer.html | 1 - .../reference/is_polymorphic.html | 1 - .../reference/is_reference.html | 1 - .../reference/is_rvalue_reference.html | 1 - .../boost_typetraits/reference/is_same.html | 1 - .../boost_typetraits/reference/is_scalar.html | 1 - .../boost_typetraits/reference/is_signed.html | 1 - .../reference/is_stateless.html | 1 - .../boost_typetraits/reference/is_union.html | 1 - .../reference/is_unsigned.html | 1 - .../reference/is_virtual_base_of.html | 1 - .../boost_typetraits/reference/is_void.html | 1 - .../reference/is_volatile.html | 1 - .../reference/make_signed.html | 1 - .../reference/make_unsigned.html | 1 - .../boost_typetraits/reference/promote.html | 1 - doc/html/boost_typetraits/reference/rank.html | 1 - .../reference/remove_all_extents.html | 1 - .../reference/remove_const.html | 1 - .../boost_typetraits/reference/remove_cv.html | 1 - .../reference/remove_extent.html | 1 - .../reference/remove_pointer.html | 1 - .../reference/remove_reference.html | 1 - .../reference/remove_volatile.html | 1 - .../reference/type_with_alignment.html | 1 - doc/html/boost_typetraits/user_defined.html | 1 - doc/html/index.html | 3 +- doc/html/index/s11.html | 3 +- doc/html/index/s12.html | 3 +- doc/html/index/s13.html | 3 +- doc/html/index/s14.html | 3 +- doc/is_base_of.qbk | 9 +-- doc/is_convertible.qbk | 2 +- include/boost/type_traits/intrinsics.hpp | 3 +- include/boost/type_traits/is_convertible.hpp | 25 ++++---- test/common_type_2_test.cpp | 5 ++ test/is_convertible_test.cpp | 59 +++++++++++++++---- 111 files changed, 124 insertions(+), 163 deletions(-) diff --git a/doc/history.qbk b/doc/history.qbk index 43ff333..0cb2ce4 100644 --- a/doc/history.qbk +++ b/doc/history.qbk @@ -7,6 +7,13 @@ [section:history History] +[h4 Boost 1.47.0] + +* [* Breaking change]: changed __is_convertible to C++0x behaviour when possible. +* Fixed issues [@https://svn.boost.org/trac/boost/ticket/5271 #5271], +[@https://svn.boost.org/trac/boost/ticket/4530 #4530]. + + [h4 Boost 1.45.0] * Added new traits __add_rvalue_reference, __add_lvalue_reference and __common_type. diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index add632a..cad28bc 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -1,4 +1,3 @@ - @@ -57,7 +56,7 @@ method available to them.

- + Type Traits

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

- + Implementation

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

- + Optimized copy

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

- + Was it worth it?

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


- + Pair of References

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

- + Conclusion

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

- + Acknowledgements

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

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

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

      - + Tutorial

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

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

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

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

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

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

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

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

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

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

    -

    +

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

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

    -Class Index

    +Class Index

A C D E F H I M P R T

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

-Typedef Index

+Typedef Index

F R T

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

-Macro Index

+Macro Index

B

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

-Index

+Index

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

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

- + Type Traits

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

- + Implementation

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

- + Optimized copy

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

- + Was it worth it?

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


- + Pair of References

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

- + Conclusion

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

- + Acknowledgements

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

- + References
    diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index 9c15b07..abb39ac 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -103,7 +103,7 @@ struct remove_volatile;
    - + Broken Compiler Workarounds:
    diff --git a/doc/html/boost_typetraits/history.html b/doc/html/boost_typetraits/history.html index 5d9ff96..96b3a3c 100644 --- a/doc/html/boost_typetraits/history.html +++ b/doc/html/boost_typetraits/history.html @@ -27,7 +27,7 @@ History
- + Boost 1.47.0
    @@ -41,7 +41,7 @@
- + Boost 1.45.0
    @@ -57,7 +57,7 @@
- + Boost 1.44.0
    @@ -73,7 +73,7 @@
- + Boost 1.42.0
  • diff --git a/doc/html/boost_typetraits/reference/common_type.html b/doc/html/boost_typetraits/reference/common_type.html index 4d321e4..4af6fd2 100644 --- a/doc/html/boost_typetraits/reference/common_type.html +++ b/doc/html/boost_typetraits/reference/common_type.html @@ -73,7 +73,7 @@ template arguments is 3.

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

    - + Tutorial

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

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

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

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

    - + Can you explain the pros/cons of common_type against Boost.Typeof?
    diff --git a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html index ab1fc2d..85f0b1c 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html @@ -48,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 116528a..62b3606 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_copy.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_copy.html @@ -50,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_trivial_assign.html b/doc/html/boost_typetraits/reference/has_trivial_assign.html index eac89ef..0094a69 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_assign.html +++ b/doc/html/boost_typetraits/reference/has_trivial_assign.html @@ -47,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 152cbae..8892c44 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_constructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_constructor.html @@ -55,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 1325a1c..4f37c23 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_copy.html +++ b/doc/html/boost_typetraits/reference/has_trivial_copy.html @@ -53,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_destructor.html b/doc/html/boost_typetraits/reference/has_trivial_destructor.html index 8419cec..1e92116 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_destructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_destructor.html @@ -49,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 b80bf98..c93d4b0 100644 --- a/doc/html/boost_typetraits/reference/has_virtual_destructor.html +++ b/doc/html/boost_typetraits/reference/has_virtual_destructor.html @@ -41,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/is_class.html b/doc/html/boost_typetraits/reference/is_class.html index 3a76a48..25fdf92 100644 --- a/doc/html/boost_typetraits/reference/is_class.html +++ b/doc/html/boost_typetraits/reference/is_class.html @@ -47,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_empty.html b/doc/html/boost_typetraits/reference/is_empty.html index f79e5d6..1aefaff 100644 --- a/doc/html/boost_typetraits/reference/is_empty.html +++ b/doc/html/boost_typetraits/reference/is_empty.html @@ -52,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_pod.html b/doc/html/boost_typetraits/reference/is_pod.html index 59a698c..a7001b1 100644 --- a/doc/html/boost_typetraits/reference/is_pod.html +++ b/doc/html/boost_typetraits/reference/is_pod.html @@ -53,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_stateless.html b/doc/html/boost_typetraits/reference/is_stateless.html index fbd994d..0786250 100644 --- a/doc/html/boost_typetraits/reference/is_stateless.html +++ b/doc/html/boost_typetraits/reference/is_stateless.html @@ -65,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 6906b97..37d2a8e 100644 --- a/doc/html/boost_typetraits/reference/is_union.html +++ b/doc/html/boost_typetraits/reference/is_union.html @@ -46,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/index.html b/doc/html/index.html index 321cc9c..8c91095 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -30,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 29b619f..28ed747 100644 --- a/doc/html/index/s11.html +++ b/doc/html/index/s11.html @@ -24,7 +24,7 @@

-Class Index

+Class Index

A C D E F H I M P R T

diff --git a/doc/html/index/s12.html b/doc/html/index/s12.html index 371ee9a..3ca1275 100644 --- a/doc/html/index/s12.html +++ b/doc/html/index/s12.html @@ -24,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 b415ea9..758c23e 100644 --- a/doc/html/index/s13.html +++ b/doc/html/index/s13.html @@ -24,7 +24,7 @@

-Macro Index

+Macro Index

B

@@ -40,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 9bbd960..27f7280 100644 --- a/doc/html/index/s14.html +++ b/doc/html/index/s14.html @@ -23,7 +23,7 @@

-Index

+Index

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

@@ -71,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 @@ -155,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

@@ -168,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

@@ -184,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 @@ -217,6 +263,7 @@

is_base_of

is_class
+

BOOST_IS_CLASS

is_class

User Defined Specializations

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

is_convertible

is_empty
-

is_empty

+
+ + +

BOOST_IS_EMPTY

is_empty

is_enum

is_enum

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

is_object

is_pod
+

BOOST_IS_POD

is_pod

User Defined Specializations

@@ -279,6 +330,7 @@

is_stateless

is_union
+

BOOST_IS_UNION

is_union

User Defined Specializations

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 ` or ` #include ` or ` #include ` diff --git a/doc/is_stateless.qbk b/doc/is_stateless.qbk index 22f9648..79db8b1 100644 --- a/doc/is_stateless.qbk +++ b/doc/is_stateless.qbk @@ -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/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/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 00bffda..dcf5e43 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,12 +87,12 @@ # 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) @@ -134,9 +132,9 @@ # 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_CONSTRUCTOR(T) (__has_trivial_constructor(T) && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value && ! ::boost::is_volatile::value) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && ! ::boost::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) @@ -167,8 +165,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) @@ -194,13 +192,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) @@ -214,50 +212,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_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_pod.hpp b/include/boost/type_traits/is_pod.hpp index af2c3c4..355218f 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,7 +42,7 @@ 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)); }; @@ -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_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/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 e3c2a2d..4a82267 100644 --- a/test/is_convertible_test.cpp +++ b/test/is_convertible_test.cpp @@ -24,7 +24,7 @@ struct base2 { }; struct middle2 : public virtual base2 { }; struct derived2 : public middle2 { }; -#ifndef BOOST_NO_RVALUE_REFERENCES +#if !defined(BOOST_NO_RVALUE_REFERENCES) template struct test_bug_4530 From 4f873ea6327a893ab564d309d0d8e4356b0fe213 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 19 Mar 2011 18:03:57 +0000 Subject: [PATCH 11/82] Don't test msvc bug case for versions of msvc that don't support the fix. [SVN r70203] --- test/is_convertible_test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/is_convertible_test.cpp b/test/is_convertible_test.cpp index 4a82267..7c04e91 100644 --- a/test/is_convertible_test.cpp +++ b/test/is_convertible_test.cpp @@ -182,7 +182,7 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible<__int64,float>::value), true BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_convertible,A4530>::value), true); #endif -#ifdef BOOST_MSVC +#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 From 28631034caf62a9e9f6bd53e323eb625629fa916 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 20 Mar 2011 12:18:59 +0000 Subject: [PATCH 12/82] Fix up type_traits intrinsic support when using the Intel compiler. Suppress quite a few Intel-12.0 warnings. [SVN r70221] --- include/boost/type_traits/alignment_of.hpp | 2 +- include/boost/type_traits/common_type.hpp | 2 +- .../type_traits/detail/bool_trait_def.hpp | 13 +++++++++++- .../type_traits/detail/common_type_imp.hpp | 18 ++++++++--------- .../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/integral_promotion.hpp | 20 +++++++++---------- include/boost/type_traits/intrinsics.hpp | 20 ++++++++++++------- include/boost/type_traits/is_const.hpp | 4 ++-- include/boost/type_traits/is_convertible.hpp | 2 +- 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 | 2 +- include/boost/type_traits/is_pointer.hpp | 4 ++-- .../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 +- .../boost/type_traits/type_with_alignment.hpp | 4 ++-- test/test.hpp | 5 +++++ 24 files changed, 86 insertions(+), 56 deletions(-) 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 25c877f..2739688 100644 --- a/include/boost/type_traits/common_type.hpp +++ b/include/boost/type_traits/common_type.hpp @@ -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 59c7743..dd530ca 100644 --- a/include/boost/type_traits/detail/common_type_imp.hpp +++ b/include/boost/type_traits/detail/common_type_imp.hpp @@ -80,11 +80,11 @@ struct propagate_cv< const volatile From, To > template< class T > struct is_integral_or_enum - : mpl::or_< is_integral, is_enum > + : public mpl::or_< is_integral, is_enum > { }; template<> struct is_integral_or_enum< bool > - : false_type + : public false_type { }; /******************************************************************************* @@ -97,7 +97,7 @@ struct is_integral_or_enum< bool > template< class T > struct make_unsigned_soft - : make_unsigned + : public make_unsigned { }; template<> struct make_unsigned_soft< bool > @@ -105,7 +105,7 @@ struct make_unsigned_soft< bool > template< class T > struct make_signed_soft - : make_signed + : public make_signed { }; template<> struct make_signed_soft< bool > @@ -151,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 > { @@ -168,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 @@ -187,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 > @@ -293,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 > @@ -316,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/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 dcf5e43..6057249 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -129,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) && ! ::boost::is_volatile::value) -# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value && ! ::boost::is_volatile::value) -# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && ! ::boost::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) -# 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) 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 e2b9b87..0d42c46 100644 --- a/include/boost/type_traits/is_convertible.hpp +++ b/include/boost/type_traits/is_convertible.hpp @@ -85,7 +85,7 @@ struct does_conversion_exist template struct is_convertible_basic_impl - : does_conversion_exist::template result_ + : public does_conversion_exist::template result_ { }; 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 355218f..4691e66 100644 --- a/include/boost/type_traits/is_pod.hpp +++ b/include/boost/type_traits/is_pod.hpp @@ -49,7 +49,7 @@ template struct is_pod_impl #if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) template struct is_pod_impl - : is_pod_impl + : public is_pod_impl { }; #endif 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_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/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/test.hpp b/test/test.hpp index d1facd2..6fbf156 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -206,7 +206,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) From 0e0c39c08a02b9e66f29b79bbd915331020c5099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 28 Mar 2011 09:03:39 +0000 Subject: [PATCH 13/82] Fixes for MSVC compilers confused with namespace issues. [SVN r70662] --- include/boost/aligned_storage.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/aligned_storage.hpp b/include/boost/aligned_storage.hpp index ce277ab..98eea3a 100644 --- a/include/boost/aligned_storage.hpp +++ b/include/boost/aligned_storage.hpp @@ -48,10 +48,10 @@ struct aligned_storage_imp { char buf[size_]; - typename mpl::eval_if_c< + typename ::boost::mpl::eval_if_c< alignment_ == std::size_t(-1) - , mpl::identity - , type_with_alignment + , ::boost::mpl::identity< ::boost::detail::max_align > + , ::boost::type_with_alignment >::type align_; } data_; void* address() const { return const_cast(this); } @@ -76,12 +76,12 @@ class aligned_storage : #else public #endif - detail::aligned_storage::aligned_storage_imp + ::boost::detail::aligned_storage::aligned_storage_imp { public: // constants - typedef detail::aligned_storage::aligned_storage_imp type; + typedef ::boost::detail::aligned_storage::aligned_storage_imp type; BOOST_STATIC_CONSTANT( std::size_t @@ -166,7 +166,7 @@ const void* aligned_storage::address() const // as a POD (Note that aligned_storage<> itself is not a POD): // template -struct is_pod > +struct is_pod< ::boost::detail::aligned_storage::aligned_storage_imp > BOOST_TT_AUX_BOOL_C_BASE(true) { BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(true) From 74d5955a7af929c9b860116a78ee7825909ec561 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 13 Apr 2011 11:02:44 +0000 Subject: [PATCH 14/82] Fix misc typos and regenerate docs. Fixes #5457. Fixes #5458. Fixes #5459. Fixes #5460. Fixes #5461. [SVN r71222] --- doc/common_type.qbk | 2 +- doc/conditional.qbk | 2 +- doc/html/boost_typetraits/background.html | 16 ++++++++-------- .../boost_typetraits/category/transform.html | 2 +- doc/html/boost_typetraits/history.html | 8 ++++---- .../reference/common_type.html | 18 ++++++++++-------- .../reference/conditional.html | 4 +++- .../reference/is_convertible.html | 2 +- .../reference/is_stateless.html | 2 +- .../reference/is_virtual_base_of.html | 8 +++++++- doc/html/index.html | 2 +- doc/html/index/s11.html | 2 +- doc/html/index/s12.html | 2 +- doc/html/index/s13.html | 2 +- doc/html/index/s14.html | 2 +- doc/is_convertible.qbk | 2 +- doc/is_stateless.qbk | 2 +- doc/is_virtual_base_of.qbk | 5 ++++- 18 files changed, 48 insertions(+), 35 deletions(-) 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/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index bbd7870..97ac3a8 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -56,7 +56,7 @@ method available to them.

- + Type Traits

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

- + Implementation

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

- + Optimized copy

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

- + Was it worth it?

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

- + Pair of References

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

- + Conclusion

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

- + Acknowledgements

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

- + References
    diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index abb39ac..b32c4fe 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -103,7 +103,7 @@ struct remove_volatile;
    - + Broken Compiler Workarounds:
    diff --git a/doc/html/boost_typetraits/history.html b/doc/html/boost_typetraits/history.html index 96b3a3c..0f4d1f7 100644 --- a/doc/html/boost_typetraits/history.html +++ b/doc/html/boost_typetraits/history.html @@ -27,7 +27,7 @@ History
- + Boost 1.47.0
    @@ -41,7 +41,7 @@
- + Boost 1.45.0
    @@ -57,7 +57,7 @@
- + Boost 1.44.0
    @@ -73,7 +73,7 @@
- + Boost 1.42.0
  • diff --git a/doc/html/boost_typetraits/reference/common_type.html b/doc/html/boost_typetraits/reference/common_type.html index 4af6fd2..a65cbd6 100644 --- a/doc/html/boost_typetraits/reference/common_type.html +++ b/doc/html/boost_typetraits/reference/common_type.html @@ -27,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;
@@ -73,7 +75,7 @@
         template arguments is 3.
       

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

- + Tutorial

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

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

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

- + How common_type behaves with pointers?
@@ -303,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 f2a044b..f04fdd7 100644 --- a/doc/html/boost_typetraits/reference/conditional.html +++ b/doc/html/boost_typetraits/reference/conditional.html @@ -27,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/is_convertible.html b/doc/html/boost_typetraits/reference/is_convertible.html
index 0d23f0c..10a7a60 100644
--- a/doc/html/boost_typetraits/reference/is_convertible.html
+++ b/doc/html/boost_typetraits/reference/is_convertible.html
@@ -106,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_stateless.html b/doc/html/boost_typetraits/reference/is_stateless.html index 0786250..ee0c425 100644 --- a/doc/html/boost_typetraits/reference/is_stateless.html +++ b/doc/html/boost_typetraits/reference/is_stateless.html @@ -30,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.

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 997dae6..a1beeaa 100644 --- a/doc/html/boost_typetraits/reference/is_virtual_base_of.html +++ b/doc/html/boost_typetraits/reference/is_virtual_base_of.html @@ -83,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/index.html b/doc/html/index.html index 8c91095..19d4190 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -30,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 28ed747..2e8efe8 100644 --- a/doc/html/index/s11.html +++ b/doc/html/index/s11.html @@ -24,7 +24,7 @@

-Class Index

+Class Index

A C D E F H I M P R T

diff --git a/doc/html/index/s12.html b/doc/html/index/s12.html index 3ca1275..fcac226 100644 --- a/doc/html/index/s12.html +++ b/doc/html/index/s12.html @@ -24,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 758c23e..9562420 100644 --- a/doc/html/index/s13.html +++ b/doc/html/index/s13.html @@ -24,7 +24,7 @@

-Macro Index

+Macro Index

B

diff --git a/doc/html/index/s14.html b/doc/html/index/s14.html index 27f7280..b93cab0 100644 --- a/doc/html/index/s14.html +++ b/doc/html/index/s14.html @@ -23,7 +23,7 @@

-Index

+Index

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

diff --git a/doc/is_convertible.qbk b/doc/is_convertible.qbk index ff6acb1..cbaf2fb 100644 --- a/doc/is_convertible.qbk +++ b/doc/is_convertible.qbk @@ -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_stateless.qbk b/doc/is_stateless.qbk index 79db8b1..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. 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] From 7fdc037defbccac78615522310bf759df9ce4f04 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 19 Apr 2011 11:03:17 +0000 Subject: [PATCH 15/82] Fix remove pointer so it works for cv-qualified function pointers in VC-10 (compiler bug workaround). Fixes #5484. [SVN r71378] --- include/boost/type_traits/remove_pointer.hpp | 53 +++++++++++++++++++- test/remove_pointer_test.cpp | 7 ++- 2 files changed, 57 insertions(+), 3 deletions(-) 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/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 From 8375014c95f32ddcf17a9fc95500d8d61a30e377 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 20 Apr 2011 16:22:29 +0000 Subject: [PATCH 16/82] Disable some embedded win32 warnings. [SVN r71394] --- test/test.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test.hpp b/test/test.hpp index 6fbf156..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 From 0e4093146bfc28b0e551929aa9eb40d7c3aacc1d Mon Sep 17 00:00:00 2001 From: Bryce Adelstein-Lelbach Date: Mon, 30 May 2011 12:41:33 +0000 Subject: [PATCH 17/82] Fix flags for type_with_alignment test on gcc-4.4 (won't compile due to uninitialized warning). [SVN r72279] --- test/Jamfile.v2 | 1 + 1 file changed, 1 insertion(+) diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 06da581..8f18a9b 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -15,6 +15,7 @@ project : requirements all # set warnings as errors for those compilers we know we get warning free: gcc:-Wextra + gcc:-Wno-uninitialized gcc:on intel:on sun:on From 0bd2b25d5b1fd3bc4449a53ebccc628a690f2bd7 Mon Sep 17 00:00:00 2001 From: Bryce Adelstein-Lelbach Date: Mon, 30 May 2011 12:42:20 +0000 Subject: [PATCH 18/82] Clang 3.0+ supports gcc-style type trait intrinsics. [SVN r72280] --- include/boost/type_traits/intrinsics.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 6057249..0dc2502 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -124,7 +124,7 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif -#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) +#if (defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__)))) || (__clang_major__ >= 3) # include # include # include From 8ac524debed019916df745beb1ffbcc6e6851ea1 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 23 Jun 2011 19:07:45 +0000 Subject: [PATCH 19/82] Revert support for clang 3.0 intrinsics in type traits. As dicussed in: http://lists.boost.org/Archives/boost/2011/06/182844.php [SVN r72725] --- include/boost/type_traits/intrinsics.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 0dc2502..6057249 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -124,7 +124,7 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif -#if (defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__)))) || (__clang_major__ >= 3) +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) # include # include # include From ea26a60081ee494ca3056027b0e5fda8ff6ae57c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 8 Jul 2011 17:51:46 +0000 Subject: [PATCH 20/82] Update docs to use latest auto-index in Trunk. [SVN r72975] --- doc/Jamfile.v2 | 31 +- doc/html/boost_typetraits/background.html | 78 +- doc/html/boost_typetraits/category.html | 4 +- .../boost_typetraits/category/alignment.html | 4 +- .../boost_typetraits/category/function.html | 4 +- .../boost_typetraits/category/transform.html | 18 +- .../category/value_traits.html | 4 +- .../category/value_traits/primary.html | 4 +- .../category/value_traits/properties.html | 4 +- .../category/value_traits/relate.html | 4 +- doc/html/boost_typetraits/credits.html | 4 +- doc/html/boost_typetraits/examples.html | 4 +- doc/html/boost_typetraits/examples/copy.html | 28 +- .../boost_typetraits/examples/destruct.html | 20 +- doc/html/boost_typetraits/examples/fill.html | 24 +- .../examples/improved_min.html | 4 +- doc/html/boost_typetraits/examples/iter.html | 26 +- .../boost_typetraits/examples/to_double.html | 4 +- doc/html/boost_typetraits/history.html | 32 +- doc/html/boost_typetraits/intrinsics.html | 38 +- doc/html/boost_typetraits/intro.html | 4 +- doc/html/boost_typetraits/mpl.html | 4 +- doc/html/boost_typetraits/reference.html | 4 +- .../boost_typetraits/reference/add_const.html | 4 +- .../boost_typetraits/reference/add_cv.html | 4 +- .../reference/add_lvalue_reference.html | 4 +- .../reference/add_pointer.html | 4 +- .../reference/add_reference.html | 4 +- .../reference/add_rvalue_reference.html | 4 +- .../reference/add_volatile.html | 4 +- .../reference/aligned_storage.html | 4 +- .../reference/alignment_of.html | 4 +- .../reference/common_type.html | 28 +- .../reference/conditional.html | 4 +- .../boost_typetraits/reference/decay.html | 4 +- .../boost_typetraits/reference/extent.html | 4 +- .../reference/floating_point_promotion.html | 4 +- .../reference/function_traits.html | 10 +- .../reference/has_new_operator.html | 4 +- .../reference/has_no_throw_def_cons.html | 4 +- .../reference/has_nothrow_assign.html | 4 +- .../reference/has_nothrow_constructor.html | 4 +- .../reference/has_nothrow_copy.html | 4 +- .../reference/has_nothrow_cp_cons.html | 4 +- .../reference/has_trivial_assign.html | 4 +- .../reference/has_trivial_constructor.html | 4 +- .../reference/has_trivial_copy.html | 4 +- .../reference/has_trivial_cp_cons.html | 4 +- .../reference/has_trivial_def_cons.html | 4 +- .../reference/has_trivial_destructor.html | 4 +- .../reference/has_virtual_destructor.html | 4 +- .../reference/integral_constant.html | 4 +- .../reference/integral_promotion.html | 4 +- .../reference/is_abstract.html | 4 +- .../reference/is_arithmetic.html | 4 +- .../boost_typetraits/reference/is_array.html | 4 +- .../reference/is_base_of.html | 4 +- .../boost_typetraits/reference/is_class.html | 4 +- .../reference/is_complex.html | 4 +- .../reference/is_compound.html | 4 +- .../boost_typetraits/reference/is_const.html | 4 +- .../reference/is_convertible.html | 8 +- .../boost_typetraits/reference/is_empty.html | 10 +- .../boost_typetraits/reference/is_enum.html | 4 +- .../reference/is_floating_point.html | 4 +- .../reference/is_function.html | 12 +- .../reference/is_fundamental.html | 4 +- .../reference/is_integral.html | 4 +- .../reference/is_lvalue_reference.html | 4 +- .../reference/is_member_function_pointer.html | 4 +- .../reference/is_member_object_pointer.html | 4 +- .../reference/is_member_pointer.html | 4 +- .../boost_typetraits/reference/is_object.html | 4 +- .../boost_typetraits/reference/is_pod.html | 4 +- .../reference/is_pointer.html | 4 +- .../reference/is_polymorphic.html | 4 +- .../reference/is_reference.html | 4 +- .../reference/is_rvalue_reference.html | 4 +- .../boost_typetraits/reference/is_same.html | 4 +- .../boost_typetraits/reference/is_scalar.html | 4 +- .../boost_typetraits/reference/is_signed.html | 4 +- .../reference/is_stateless.html | 4 +- .../boost_typetraits/reference/is_union.html | 4 +- .../reference/is_unsigned.html | 4 +- .../reference/is_virtual_base_of.html | 4 +- .../boost_typetraits/reference/is_void.html | 4 +- .../reference/is_volatile.html | 4 +- .../reference/make_signed.html | 4 +- .../reference/make_unsigned.html | 4 +- .../boost_typetraits/reference/promote.html | 4 +- doc/html/boost_typetraits/reference/rank.html | 4 +- .../reference/remove_all_extents.html | 4 +- .../reference/remove_const.html | 4 +- .../boost_typetraits/reference/remove_cv.html | 4 +- .../reference/remove_extent.html | 4 +- .../reference/remove_pointer.html | 4 +- .../reference/remove_reference.html | 4 +- .../reference/remove_volatile.html | 4 +- .../reference/type_with_alignment.html | 4 +- doc/html/boost_typetraits/user_defined.html | 4 +- doc/html/index.html | 6 +- doc/html/index/s11.html | 375 ++++---- doc/html/index/s12.html | 38 +- doc/html/index/s13.html | 200 +++-- doc/html/index/s14.html | 825 +++++++++--------- doc/type_traits.qbk | 20 +- 106 files changed, 1090 insertions(+), 1081 deletions(-) diff --git a/doc/Jamfile.v2 b/doc/Jamfile.v2 index 096aaeb..67398ee 100644 --- a/doc/Jamfile.v2 +++ b/doc/Jamfile.v2 @@ -4,28 +4,11 @@ # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) import modules ; - -path-constant here : . ; - -if --enable-index in [ modules.peek : ARGV ] -{ - ECHO "Building the type_traits docs with automatic index generation enabled." ; - using auto-index ; - project : requirements - on pdf:off - html:on - $(here)/index.idx - $(here)/../../.. - enable_index ; -} -else -{ - ECHO "Building the type_traits docs with automatic index generation disabled. Try building with --enable-index." ; -} - using quickbook ; +using auto-index ; path-constant boost-images : ../../../doc/src/images ; +path-constant here : . ; xml type_traits : type_traits.qbk ; boostbook standalone @@ -76,14 +59,14 @@ boostbook standalone pdf:admon.graphics.extension=".svg" pdf:admon.graphics.path=$(boost-images)/ pdf:boost.url.prefix=http://www.boost.org/doc/libs/release/libs/type_traits/doc/html + pdf:off + html:on + $(here)/index.idx + $(here)/../../.. + on ; install pdf-install : standalone : PDF . type_traits.pdf ; - - - - - diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index 97ac3a8..460e86b 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -3,7 +3,7 @@ Background and Tutorial - + @@ -22,7 +22,7 @@
PrevUpHomeNext
-
+
@@ -56,7 +56,7 @@ method available to them.

- + Type Traits

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

- + Implementation

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

- + Optimized copy

@@ -193,16 +193,16 @@ copy in terms of memcpy all of the following conditions need to be met:

-
    -
  • +
      +
    • Both of the iterator types Iter1 and Iter2 must be pointers.
    • -
    • +
    • Both Iter1 and Iter2 must point to the same type - excluding const and volatile-qualifiers.
    • -
    • +
    • The type pointed to by Iter1 must have a trivial assignment operator.
    • @@ -210,14 +210,14 @@

      By trivial assignment operator we mean that the type is either a scalar type[3] or:

      -
        -
      • +
          +
        • The type has no user defined assignment operator.
        • -
        • +
        • The type does not have any data members that are references.
        • -
        • +
        • All base classes, and all data member objects must have trivial assignment operators.
        • @@ -238,16 +238,16 @@ examples. The code begins by defining a template function do_copy that performs a "slow but safe" copy. The last parameter passed to this function may be either a true_type or a false_type. - Following that there is an overload of docopy that - uses `memcpy`: this time the iterators are required to actually be pointers - to the same type, and the final parameter must be a `_true_type. Finally, the version - of copy calls - docopy`, passing `_has_trivial_assign<value_type>()` - as the final parameter: this will dispatch to the optimized version where appropriate, - otherwise it will call the "slow but safe version". + Following that there is an overload of do_copy that uses memcpy: + this time the iterators are required to actually be pointers to the same type, + and the final parameter must be a true_type. + Finally, the version of copy + calls do_copy, passing has_trivial_assign<value_type>() as the final parameter: this will dispatch + to the optimized version where appropriate, otherwise it will call the "slow + but safe version".

          - + Was it worth it?

          @@ -264,12 +264,12 @@ comparison between algorithms becomes difficult. However, perhaps we can add a couple of caveats to the premature optimization rule:

          -
            -
          • +
              +
            • If you use the right algorithm for the job in the first place then optimization will not be required; in some cases, memcpy is the right algorithm.
            • -
            • +
            • If a component is going to be reused in many places by many people then optimizations may well be worthwhile where they would not be so for a single case - in other words, the likelihood that the optimization will be absolutely @@ -379,7 +379,7 @@

          - + Pair of References

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

          - + Conclusion

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

          - + Acknowledgements

          The authors would like to thank Beman Dawes and Howard Hinnant for their helpful comments when preparing this article.

          -
          - - References +
          + + References
          -
            -
          1. +
              +
            1. Nathan C. Myers, C++ Report, June 1995.
            2. -
            3. +
            4. The type traits library is based upon contributions by Steve Cleary, Beman Dawes, Howard Hinnant and John Maddock: it can be found at www.boost.org.
            5. -
            6. +
            7. A scalar type is an arithmetic type (i.e. a built-in integer or floating point type), an enumeration type, a pointer, a pointer to member, or a const- or volatile-qualified version of one of these types.
            8. -
            9. +
            10. This quote is from Donald Knuth, ACM Computing Surveys, December 1974, pg 268.
            11. -
            12. +
            13. The test code is available as part of the boost utility library (see algo_opt_examples.cpp), the code was compiled with gcc 2.95 with all optimisations turned on, tests were conducted on a 400MHz Pentium II machine running Microsoft Windows 98.
            14. -
            15. +
            16. John Maddock and Howard Hinnant have submitted a "compressed_pair" library to Boost, which uses a technique similar to the one described here to hold references. Their pair also uses type traits to determine if any of the types are empty, and will derive instead of contain to conserve space -- hence the name "compressed".
            17. -
            18. +
            19. This is actually an issue with the C++ Core Language Working Group (issue #106), submitted by Bjarne Stroustrup. The tentative resolution is to allow a "reference to a reference to T" to mean the same thing as a "reference to T", but only in template instantiation, in a method similar to multiple cv-qualifiers.
            20. -
            21. +
            22. For those of you who are wondering why this shouldn't be const-qualified, remember that references are always implicitly constant (for example, you can't re-assign a reference). Remember also that "const T &" diff --git a/doc/html/boost_typetraits/category.html b/doc/html/boost_typetraits/category.html index 3809935..22fe979 100644 --- a/doc/html/boost_typetraits/category.html +++ b/doc/html/boost_typetraits/category.html @@ -3,7 +3,7 @@ Type Traits by Category - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +
              diff --git a/doc/html/boost_typetraits/category/alignment.html b/doc/html/boost_typetraits/category/alignment.html index 0a07d56..7dfafeb 100644 --- a/doc/html/boost_typetraits/category/alignment.html +++ b/doc/html/boost_typetraits/category/alignment.html @@ -3,7 +3,7 @@ Synthesizing Types with Specific Alignments - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +

              Synthesizing Types with Specific Alignments diff --git a/doc/html/boost_typetraits/category/function.html b/doc/html/boost_typetraits/category/function.html index 567e397..ba3e7db 100644 --- a/doc/html/boost_typetraits/category/function.html +++ b/doc/html/boost_typetraits/category/function.html @@ -3,7 +3,7 @@ Decomposing Function Types - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +

              Decomposing Function Types diff --git a/doc/html/boost_typetraits/category/transform.html b/doc/html/boost_typetraits/category/transform.html index b32c4fe..0d7fc17 100644 --- a/doc/html/boost_typetraits/category/transform.html +++ b/doc/html/boost_typetraits/category/transform.html @@ -3,7 +3,7 @@ Type Traits that Transform One Type to Another - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +

              Type Traits that Transform One Type to Another @@ -103,7 +103,7 @@ struct remove_volatile;

              - + Broken Compiler Workarounds:
              @@ -146,13 +146,13 @@
              namespace myspace{
                  struct MyClass {};
               }
              -// declare this at global scope:
              -BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(myspace::MyClass)
              -// transformations on myspace::MyClass now work:
              -BOOST_STATIC_ASSERT((is_same<myspace::MyClass, remove_reference<myspace::MyClass&>::type>::value));
              +// declare this at global scope:
              +BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(myspace::MyClass)
              +// transformations on myspace::MyClass now work:
              +BOOST_STATIC_ASSERT((is_same<myspace::MyClass, remove_reference<myspace::MyClass&>::type>::value));
               BOOST_STATIC_ASSERT((is_same<myspace::MyClass, remove_const<myspace::MyClass const>::type>::value));
              -// etc.
              -
              +// etc. +

              Note that the macro BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION evaluates to nothing on those compilers that do support diff --git a/doc/html/boost_typetraits/category/value_traits.html b/doc/html/boost_typetraits/category/value_traits.html index aacdfb6..a7bf570 100644 --- a/doc/html/boost_typetraits/category/value_traits.html +++ b/doc/html/boost_typetraits/category/value_traits.html @@ -3,7 +3,7 @@ Type Traits that Describe the Properties of a Type - + @@ -22,7 +22,7 @@

              PrevUpHomeNext
              -
              +

              Type Traits that Describe the Properties of a Type diff --git a/doc/html/boost_typetraits/category/value_traits/primary.html b/doc/html/boost_typetraits/category/value_traits/primary.html index 88c8481..786cc39 100644 --- a/doc/html/boost_typetraits/category/value_traits/primary.html +++ b/doc/html/boost_typetraits/category/value_traits/primary.html @@ -3,7 +3,7 @@ Categorizing a Type - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +

              Categorizing a Type diff --git a/doc/html/boost_typetraits/category/value_traits/properties.html b/doc/html/boost_typetraits/category/value_traits/properties.html index b212687..a8e10dd 100644 --- a/doc/html/boost_typetraits/category/value_traits/properties.html +++ b/doc/html/boost_typetraits/category/value_traits/properties.html @@ -3,7 +3,7 @@ General Type Properties - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +

              General Type Properties diff --git a/doc/html/boost_typetraits/category/value_traits/relate.html b/doc/html/boost_typetraits/category/value_traits/relate.html index 7aec8fc..aedef72 100644 --- a/doc/html/boost_typetraits/category/value_traits/relate.html +++ b/doc/html/boost_typetraits/category/value_traits/relate.html @@ -3,7 +3,7 @@ Relationships Between Two Types - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +

              Relationships Between Two Types diff --git a/doc/html/boost_typetraits/credits.html b/doc/html/boost_typetraits/credits.html index 8fa1efa..e407d59 100644 --- a/doc/html/boost_typetraits/credits.html +++ b/doc/html/boost_typetraits/credits.html @@ -3,7 +3,7 @@ Credits - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +
              diff --git a/doc/html/boost_typetraits/examples.html b/doc/html/boost_typetraits/examples.html index ff51628..a247a74 100644 --- a/doc/html/boost_typetraits/examples.html +++ b/doc/html/boost_typetraits/examples.html @@ -3,7 +3,7 @@ Examples - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +
              diff --git a/doc/html/boost_typetraits/examples/copy.html b/doc/html/boost_typetraits/examples/copy.html index bdce58c..739d825 100644 --- a/doc/html/boost_typetraits/examples/copy.html +++ b/doc/html/boost_typetraits/examples/copy.html @@ -3,7 +3,7 @@ An Optimized Version of std::copy - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +

              An Optimized Version of std::copy @@ -33,12 +33,12 @@ to determine whether to use memcpy to optimise the copy operation (see copy_example.cpp):

              -
              //
              -// opt::copy
              -// same semantics as std::copy
              -// calls memcpy where appropriate.
              -//
              -
              +
              //
              +// opt::copy
              +// same semantics as std::copy
              +// calls memcpy where appropriate.
              +//
              +
               namespace detail{
               
               template<typename I1, typename I2, bool b>
              @@ -66,12 +66,12 @@
               template<typename I1, typename I2>
               inline I2 copy(I1 first, I1 last, I2 out)
               {
              -   //
              -   // We can copy with memcpy if T has a trivial assignment operator,
              -   // and if the iterator arguments are actually pointers (this last
              -   // requirement we detect with overload resolution):
              -   //
              -   typedef typename std::iterator_traits<I1>::value_type value_type;
              +   //
              +   // We can copy with memcpy if T has a trivial assignment operator,
              +   // and if the iterator arguments are actually pointers (this last
              +   // requirement we detect with overload resolution):
              +   //
              +   typedef typename std::iterator_traits<I1>::value_type value_type;
                  return detail::copy_imp(first, last, out, boost::has_trivial_assign<value_type>());
               }
               
              diff --git a/doc/html/boost_typetraits/examples/destruct.html b/doc/html/boost_typetraits/examples/destruct.html index 2e7b8ea..1cb06d4 100644 --- a/doc/html/boost_typetraits/examples/destruct.html +++ b/doc/html/boost_typetraits/examples/destruct.html @@ -3,7 +3,7 @@ An Example that Omits Destructor Calls For Types with Trivial Destructors - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +

              An Example that Omits Destructor Calls For Types with Trivial Destructors @@ -31,12 +31,12 @@ Demonstrates a simple algorithm that uses __has_trivial_destruct to determine whether to destructors need to be called (see trivial_destructor_example.cpp):

              -
              //
              -// algorithm destroy_array:
              -// The reverse of std::unitialized_copy, takes a block of
              -// initialized memory and calls destructors on all objects therein.
              -//
              -
              +
              //
              +// algorithm destroy_array:
              +// The reverse of std::unitialized_copy, takes a block of
              +// initialized memory and calls destructors on all objects therein.
              +//
              +
               namespace detail{
               
               template <class T>
              @@ -54,8 +54,8 @@
               {
               }
               
              -} // namespace detail
              -
              +} // namespace detail
              +
               template <class T>
               inline void destroy_array(T* p1, T* p2)
               {
              diff --git a/doc/html/boost_typetraits/examples/fill.html b/doc/html/boost_typetraits/examples/fill.html
              index aab0cf1..2804a9d 100644
              --- a/doc/html/boost_typetraits/examples/fill.html
              +++ b/doc/html/boost_typetraits/examples/fill.html
              @@ -3,7 +3,7 @@
               
               An Optimised Version of std::fill
               
              -
              +
               
               
               
              @@ -22,7 +22,7 @@
               
              PrevUpHomeNext
              -
              +

              An Optimised Version of std::fill @@ -33,11 +33,11 @@ to determine whether to use memset to optimise the fill operation (see fill_example.cpp):

              -
              //
              -// fill
              -// same as std::fill, but uses memset where appropriate
              -//
              -namespace detail{
              +
              //
              +// fill
              +// same as std::fill, but uses memset where appropriate
              +//
              +namespace detail{
               
               template <typename I, typename T, bool b>
               void do_fill(I first, I last, const T& val, const boost::integral_constant<bool, b>&)
              @@ -60,11 +60,11 @@
               template <class I, class T>
               inline void fill(I first, I last, const T& val)
               {
              -   //
              -   // We can do an optimised fill if T has a trivial assignment 
              -   // operator and if it's size is one:
              -   //
              -   typedef boost::integral_constant<bool, 
              +   //
              +   // We can do an optimised fill if T has a trivial assignment 
              +   // operator and if it's size is one:
              +   //
              +   typedef boost::integral_constant<bool, 
                     ::boost::has_trivial_assign<T>::value && (sizeof(T) == 1)> truth_type;
                  detail::do_fill(first, last, val, truth_type());
               }
              diff --git a/doc/html/boost_typetraits/examples/improved_min.html b/doc/html/boost_typetraits/examples/improved_min.html
              index c062ea3..fc2db9b 100644
              --- a/doc/html/boost_typetraits/examples/improved_min.html
              +++ b/doc/html/boost_typetraits/examples/improved_min.html
              @@ -3,7 +3,7 @@
               
               Improving std::min with common_type
               
              -
              +
               
               
               
              @@ -22,7 +22,7 @@
               
              PrevUpHomeNext
              -
              +

              Improving std::min with common_type diff --git a/doc/html/boost_typetraits/examples/iter.html b/doc/html/boost_typetraits/examples/iter.html index 338d218..be917dd 100644 --- a/doc/html/boost_typetraits/examples/iter.html +++ b/doc/html/boost_typetraits/examples/iter.html @@ -3,7 +3,7 @@ An improved Version of std::iter_swap - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +

              An improved Version of std::iter_swap @@ -36,12 +36,12 @@ the swap to ensure that the algorithm works correctly for both proxying iterators, and even iterators of different types (see iter_swap_example.cpp):

              -
              //
              -// iter_swap:
              -// tests whether iterator is a proxying iterator or not, and
              -// uses optimal form accordingly:
              -//
              -namespace detail{
              +
              //
              +// iter_swap:
              +// tests whether iterator is a proxying iterator or not, and
              +// uses optimal form accordingly:
              +//
              +namespace detail{
               
               template <typename I>
               static void do_swap(I one, I two, const boost::false_type&)
              @@ -63,11 +63,11 @@
               template <typename I1, typename I2>
               inline void iter_swap(I1 one, I2 two)
               {
              -   //
              -   // See is both arguments are non-proxying iterators, 
              -   // and if both iterator the same type:
              -   //
              -   typedef typename std::iterator_traits<I1>::reference r1_t;
              +   //
              +   // See is both arguments are non-proxying iterators, 
              +   // and if both iterator the same type:
              +   //
              +   typedef typename std::iterator_traits<I1>::reference r1_t;
                  typedef typename std::iterator_traits<I2>::reference r2_t;
               
                  typedef boost::integral_constant<bool,
              diff --git a/doc/html/boost_typetraits/examples/to_double.html b/doc/html/boost_typetraits/examples/to_double.html
              index 829bd27..1facd9c 100644
              --- a/doc/html/boost_typetraits/examples/to_double.html
              +++ b/doc/html/boost_typetraits/examples/to_double.html
              @@ -3,7 +3,7 @@
               
               Convert Numeric Types and Enums to double
               
              -
              +
               
               
               
              @@ -22,7 +22,7 @@
               
              PrevUpHomeNext
              -
              +

              Convert Numeric Types and Enums to double diff --git a/doc/html/boost_typetraits/history.html b/doc/html/boost_typetraits/history.html index 0f4d1f7..28ab5a9 100644 --- a/doc/html/boost_typetraits/history.html +++ b/doc/html/boost_typetraits/history.html @@ -3,7 +3,7 @@ History - + @@ -22,61 +22,61 @@
              PrevUpHomeNext
              -
              +
              - + Boost 1.47.0
              -
                -
              • +
                - + Boost 1.45.0
                -
                  -
                • +
                  - + Boost 1.44.0
                  -
                    -
                  • +
                    - + Boost 1.42.0
                    -
                    diff --git a/doc/html/boost_typetraits/intrinsics.html b/doc/html/boost_typetraits/intrinsics.html index d616d58..ba5f31a 100644 --- a/doc/html/boost_typetraits/intrinsics.html +++ b/doc/html/boost_typetraits/intrinsics.html @@ -3,7 +3,7 @@ Support for Compiler Intrinsics - + @@ -22,7 +22,7 @@
                    PrevUpHomeNext
                    -
                    +
                    @@ -37,35 +37,35 @@ The Following traits classes always need compiler support to do the right thing for all types (but all have safe fallback positions if this support is unavailable):

                    -
                      -
                    • + @@ -74,22 +74,22 @@ although in practice, the implementations do in fact do the right thing on all the compilers we know about:

                      -
                        -
                      • +

                        The following traits classes are dependent on one or more of the above:

                        -
                          -
                        • + diff --git a/doc/html/boost_typetraits/intro.html b/doc/html/boost_typetraits/intro.html index c825318..298f2c0 100644 --- a/doc/html/boost_typetraits/intro.html +++ b/doc/html/boost_typetraits/intro.html @@ -3,7 +3,7 @@ Introduction - + @@ -22,7 +22,7 @@
                          PrevUpHomeNext
                          -
                          +
                          diff --git a/doc/html/boost_typetraits/mpl.html b/doc/html/boost_typetraits/mpl.html index 9ab019d..954a2a6 100644 --- a/doc/html/boost_typetraits/mpl.html +++ b/doc/html/boost_typetraits/mpl.html @@ -3,7 +3,7 @@ MPL Interoperability - + @@ -22,7 +22,7 @@
                          PrevUpHomeNext
                          -
                          +
                          diff --git a/doc/html/boost_typetraits/reference.html b/doc/html/boost_typetraits/reference.html index bad49b6..ed8e5d4 100644 --- a/doc/html/boost_typetraits/reference.html +++ b/doc/html/boost_typetraits/reference.html @@ -3,7 +3,7 @@ Alphabetical Reference - + @@ -22,7 +22,7 @@
                          PrevUpHomeNext
                          -
                          +
                          diff --git a/doc/html/boost_typetraits/reference/add_const.html b/doc/html/boost_typetraits/reference/add_const.html index 032e357..4544dc8 100644 --- a/doc/html/boost_typetraits/reference/add_const.html +++ b/doc/html/boost_typetraits/reference/add_const.html @@ -3,7 +3,7 @@ add_const - + @@ -22,7 +22,7 @@
                          PrevUpHomeNext
                          -
                          +
                          diff --git a/doc/html/boost_typetraits/reference/add_cv.html b/doc/html/boost_typetraits/reference/add_cv.html index 038f15b..eec0496 100644 --- a/doc/html/boost_typetraits/reference/add_cv.html +++ b/doc/html/boost_typetraits/reference/add_cv.html @@ -3,7 +3,7 @@ add_cv - + @@ -22,7 +22,7 @@
                          PrevUpHomeNext
                          -
                          +
                          diff --git a/doc/html/boost_typetraits/reference/add_lvalue_reference.html b/doc/html/boost_typetraits/reference/add_lvalue_reference.html index 80ef4f9..ccfeeae 100644 --- a/doc/html/boost_typetraits/reference/add_lvalue_reference.html +++ b/doc/html/boost_typetraits/reference/add_lvalue_reference.html @@ -3,7 +3,7 @@ add_lvalue_reference - + @@ -22,7 +22,7 @@
                          PrevUpHomeNext
                          -
                          +
                          diff --git a/doc/html/boost_typetraits/reference/add_pointer.html b/doc/html/boost_typetraits/reference/add_pointer.html index 0399722..7432c39 100644 --- a/doc/html/boost_typetraits/reference/add_pointer.html +++ b/doc/html/boost_typetraits/reference/add_pointer.html @@ -3,7 +3,7 @@ add_pointer - + @@ -22,7 +22,7 @@
                          PrevUpHomeNext
                          -
                          +
                          diff --git a/doc/html/boost_typetraits/reference/add_reference.html b/doc/html/boost_typetraits/reference/add_reference.html index d66c9a6..f38460c 100644 --- a/doc/html/boost_typetraits/reference/add_reference.html +++ b/doc/html/boost_typetraits/reference/add_reference.html @@ -3,7 +3,7 @@ add_reference - + @@ -22,7 +22,7 @@
                          PrevUpHomeNext
                          -
                          +
                          diff --git a/doc/html/boost_typetraits/reference/add_rvalue_reference.html b/doc/html/boost_typetraits/reference/add_rvalue_reference.html index 11b5a54..968ead4 100644 --- a/doc/html/boost_typetraits/reference/add_rvalue_reference.html +++ b/doc/html/boost_typetraits/reference/add_rvalue_reference.html @@ -3,7 +3,7 @@ add_rvalue_reference - + @@ -22,7 +22,7 @@
                          PrevUpHomeNext
                          -
                          +
                          diff --git a/doc/html/boost_typetraits/reference/add_volatile.html b/doc/html/boost_typetraits/reference/add_volatile.html index 0f4f782..856b862 100644 --- a/doc/html/boost_typetraits/reference/add_volatile.html +++ b/doc/html/boost_typetraits/reference/add_volatile.html @@ -3,7 +3,7 @@ add_volatile - + @@ -22,7 +22,7 @@
                          PrevUpHomeNext
                          -
                          +
                          diff --git a/doc/html/boost_typetraits/reference/aligned_storage.html b/doc/html/boost_typetraits/reference/aligned_storage.html index 4f63b65..03f7a26 100644 --- a/doc/html/boost_typetraits/reference/aligned_storage.html +++ b/doc/html/boost_typetraits/reference/aligned_storage.html @@ -3,7 +3,7 @@ aligned_storage - + @@ -22,7 +22,7 @@
                          PrevUpHomeNext
                          -
                          +
                          diff --git a/doc/html/boost_typetraits/reference/alignment_of.html b/doc/html/boost_typetraits/reference/alignment_of.html index 866a25e..4d22938 100644 --- a/doc/html/boost_typetraits/reference/alignment_of.html +++ b/doc/html/boost_typetraits/reference/alignment_of.html @@ -3,7 +3,7 @@ alignment_of - + @@ -22,7 +22,7 @@
                          PrevUpHomeNext
                          -
                          +
                          diff --git a/doc/html/boost_typetraits/reference/common_type.html b/doc/html/boost_typetraits/reference/common_type.html index a65cbd6..bcd9e2a 100644 --- a/doc/html/boost_typetraits/reference/common_type.html +++ b/doc/html/boost_typetraits/reference/common_type.html @@ -3,7 +3,7 @@ common_type - + @@ -22,7 +22,7 @@
                          PrevUpHomeNext
                          -
                          +
                          @@ -75,7 +75,7 @@ template arguments is 3.

                          - + Configuration macros
                          @@ -83,11 +83,11 @@ When the compiler does not support static assertions then the user can select the way static assertions are reported. Define

                          -
                            -
                          • +
                              +
                            • BOOST_COMMON_TYPE_USES_STATIC_ASSERT: define it if you want to use Boost.StaticAssert
                            • -
                            • +
                            • BOOST_COMMON_TYPE_USES_MPL_ASSERT: define it if you want to use Boost.MPL static asertions
                            • @@ -105,7 +105,7 @@ Otherwise when BOOST_COMMON_TYPE_DONT_USE_TYPEOF is not defined it uses Boost.TypeOf.

                              - + Tutorial

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

                              - + How to get the common type of types with explicit conversions?
                              @@ -162,7 +162,7 @@ };

              - + How important is the order of the common_type<> template arguments?
              @@ -189,8 +189,8 @@

              The following doesn't compile

              -
              typedef boost::common_type<A, B, C>::type ABC; // Does not compile
              -
              +
              typedef boost::common_type<A, B, C>::type ABC; // Does not compile
              +

              while

              @@ -242,7 +242,7 @@ A>.

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

              - + How common_type behaves with pointers?
              @@ -305,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 f04fdd7..3977fc6 100644 --- a/doc/html/boost_typetraits/reference/conditional.html +++ b/doc/html/boost_typetraits/reference/conditional.html @@ -3,7 +3,7 @@ conditional - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +
              diff --git a/doc/html/boost_typetraits/reference/decay.html b/doc/html/boost_typetraits/reference/decay.html index ec66715..fe2cd5d 100644 --- a/doc/html/boost_typetraits/reference/decay.html +++ b/doc/html/boost_typetraits/reference/decay.html @@ -3,7 +3,7 @@ decay - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +
              diff --git a/doc/html/boost_typetraits/reference/extent.html b/doc/html/boost_typetraits/reference/extent.html index c0bd830..465ce48 100644 --- a/doc/html/boost_typetraits/reference/extent.html +++ b/doc/html/boost_typetraits/reference/extent.html @@ -3,7 +3,7 @@ extent - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +
              diff --git a/doc/html/boost_typetraits/reference/floating_point_promotion.html b/doc/html/boost_typetraits/reference/floating_point_promotion.html index 747e10b..0307c9c 100644 --- a/doc/html/boost_typetraits/reference/floating_point_promotion.html +++ b/doc/html/boost_typetraits/reference/floating_point_promotion.html @@ -3,7 +3,7 @@ floating_point_promotion - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +
              diff --git a/doc/html/boost_typetraits/reference/function_traits.html b/doc/html/boost_typetraits/reference/function_traits.html index fbd138f..a049729 100644 --- a/doc/html/boost_typetraits/reference/function_traits.html +++ b/doc/html/boost_typetraits/reference/function_traits.html @@ -3,7 +3,7 @@ function_traits - + @@ -22,7 +22,7 @@
              PrevUpHomeNext
              -
              +
              @@ -37,11 +37,11 @@

              The class template function_traits will only compile if:

              -
                -
              • +
                  +
                • The compiler supports partial specialization of class templates.
                • -
                • +
                • The template argument F is a function type, note that this is not the same thing as a pointer to a function. diff --git a/doc/html/boost_typetraits/reference/has_new_operator.html b/doc/html/boost_typetraits/reference/has_new_operator.html index b8e1deb..479e4f8 100644 --- a/doc/html/boost_typetraits/reference/has_new_operator.html +++ b/doc/html/boost_typetraits/reference/has_new_operator.html @@ -3,7 +3,7 @@ has_new_operator - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  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 093e956..a2cc678 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 @@ -3,7 +3,7 @@ has_nothrow_default_constructor - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/has_nothrow_assign.html b/doc/html/boost_typetraits/reference/has_nothrow_assign.html index 0b37ded..d4457a4 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_assign.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_assign.html @@ -3,7 +3,7 @@ has_nothrow_assign - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html index 85f0b1c..21c4764 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_constructor.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_constructor.html @@ -3,7 +3,7 @@ has_nothrow_constructor - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/has_nothrow_copy.html b/doc/html/boost_typetraits/reference/has_nothrow_copy.html index 62b3606..a302ecc 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_copy.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_copy.html @@ -3,7 +3,7 @@ has_nothrow_copy - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  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 9f71baa..5efde70 100644 --- a/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_nothrow_cp_cons.html @@ -3,7 +3,7 @@ has_nothrow_copy_constructor - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/has_trivial_assign.html b/doc/html/boost_typetraits/reference/has_trivial_assign.html index 0094a69..6196936 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_assign.html +++ b/doc/html/boost_typetraits/reference/has_trivial_assign.html @@ -3,7 +3,7 @@ has_trivial_assign - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/has_trivial_constructor.html b/doc/html/boost_typetraits/reference/has_trivial_constructor.html index 8892c44..e2410bf 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_constructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_constructor.html @@ -3,7 +3,7 @@ has_trivial_constructor - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/has_trivial_copy.html b/doc/html/boost_typetraits/reference/has_trivial_copy.html index 4f37c23..f5d1f6d 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_copy.html +++ b/doc/html/boost_typetraits/reference/has_trivial_copy.html @@ -3,7 +3,7 @@ has_trivial_copy - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  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 820d3fd..ecd911e 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_cp_cons.html @@ -3,7 +3,7 @@ has_trivial_copy_constructor - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  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 64b603c..04dedaa 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_def_cons.html +++ b/doc/html/boost_typetraits/reference/has_trivial_def_cons.html @@ -3,7 +3,7 @@ has_trivial_default_constructor - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/has_trivial_destructor.html b/doc/html/boost_typetraits/reference/has_trivial_destructor.html index 1e92116..fc6dfae 100644 --- a/doc/html/boost_typetraits/reference/has_trivial_destructor.html +++ b/doc/html/boost_typetraits/reference/has_trivial_destructor.html @@ -3,7 +3,7 @@ has_trivial_destructor - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/has_virtual_destructor.html b/doc/html/boost_typetraits/reference/has_virtual_destructor.html index c93d4b0..c3c1c95 100644 --- a/doc/html/boost_typetraits/reference/has_virtual_destructor.html +++ b/doc/html/boost_typetraits/reference/has_virtual_destructor.html @@ -3,7 +3,7 @@ has_virtual_destructor - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/integral_constant.html b/doc/html/boost_typetraits/reference/integral_constant.html index d6c187f..8196c15 100644 --- a/doc/html/boost_typetraits/reference/integral_constant.html +++ b/doc/html/boost_typetraits/reference/integral_constant.html @@ -3,7 +3,7 @@ integral_constant - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/integral_promotion.html b/doc/html/boost_typetraits/reference/integral_promotion.html index f4394d4..6af6bf9 100644 --- a/doc/html/boost_typetraits/reference/integral_promotion.html +++ b/doc/html/boost_typetraits/reference/integral_promotion.html @@ -3,7 +3,7 @@ integral_promotion - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_abstract.html b/doc/html/boost_typetraits/reference/is_abstract.html index 2ef1fcb..9fede74 100644 --- a/doc/html/boost_typetraits/reference/is_abstract.html +++ b/doc/html/boost_typetraits/reference/is_abstract.html @@ -3,7 +3,7 @@ is_abstract - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_arithmetic.html b/doc/html/boost_typetraits/reference/is_arithmetic.html index bc4391d..1e860da 100644 --- a/doc/html/boost_typetraits/reference/is_arithmetic.html +++ b/doc/html/boost_typetraits/reference/is_arithmetic.html @@ -3,7 +3,7 @@ is_arithmetic - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_array.html b/doc/html/boost_typetraits/reference/is_array.html index 9e9ca8a..87278aa 100644 --- a/doc/html/boost_typetraits/reference/is_array.html +++ b/doc/html/boost_typetraits/reference/is_array.html @@ -3,7 +3,7 @@ is_array - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_base_of.html b/doc/html/boost_typetraits/reference/is_base_of.html index 018938f..ac8b034 100644 --- a/doc/html/boost_typetraits/reference/is_base_of.html +++ b/doc/html/boost_typetraits/reference/is_base_of.html @@ -3,7 +3,7 @@ is_base_of - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_class.html b/doc/html/boost_typetraits/reference/is_class.html index 25fdf92..e05c5bf 100644 --- a/doc/html/boost_typetraits/reference/is_class.html +++ b/doc/html/boost_typetraits/reference/is_class.html @@ -3,7 +3,7 @@ is_class - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_complex.html b/doc/html/boost_typetraits/reference/is_complex.html index 48f8f4e..d1f589b 100644 --- a/doc/html/boost_typetraits/reference/is_complex.html +++ b/doc/html/boost_typetraits/reference/is_complex.html @@ -3,7 +3,7 @@ is_complex - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_compound.html b/doc/html/boost_typetraits/reference/is_compound.html index 5a0713e..8ffea43 100644 --- a/doc/html/boost_typetraits/reference/is_compound.html +++ b/doc/html/boost_typetraits/reference/is_compound.html @@ -3,7 +3,7 @@ is_compound - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_const.html b/doc/html/boost_typetraits/reference/is_const.html index b2ba6a9..a4d2d60 100644 --- a/doc/html/boost_typetraits/reference/is_const.html +++ b/doc/html/boost_typetraits/reference/is_const.html @@ -3,7 +3,7 @@ is_const - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_convertible.html b/doc/html/boost_typetraits/reference/is_convertible.html index 10a7a60..48b7825 100644 --- a/doc/html/boost_typetraits/reference/is_convertible.html +++ b/doc/html/boost_typetraits/reference/is_convertible.html @@ -3,7 +3,7 @@ is_convertible - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  @@ -62,8 +62,8 @@ struct B : A {}; struct C : A {}; struct D : B, C {}; -// This produces a compiler error, the conversion is ambiguous: -bool const y = boost::is_convertible<D*,A*>::value; +// This produces a compiler error, the conversion is ambiguous: +bool const y = boost::is_convertible<D*,A*>::value;

              C++ Standard Reference: 4 and 8.5. diff --git a/doc/html/boost_typetraits/reference/is_empty.html b/doc/html/boost_typetraits/reference/is_empty.html index 1aefaff..84cae9a 100644 --- a/doc/html/boost_typetraits/reference/is_empty.html +++ b/doc/html/boost_typetraits/reference/is_empty.html @@ -3,7 +3,7 @@ is_empty - + @@ -22,7 +22,7 @@

              PrevUpHomeNext
              -
              +
              @@ -46,11 +46,11 @@ Compiler Compatibility: In order to correctly detect empty classes this trait relies on either:

              -
                -
              • +
                  +
                • the compiler implementing zero sized empty base classes, or
                • -
                • +
                • the compiler providing intrinsics 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 fad1ab1..19fc022 100644 --- a/doc/html/boost_typetraits/reference/is_enum.html +++ b/doc/html/boost_typetraits/reference/is_enum.html @@ -3,7 +3,7 @@ is_enum - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_floating_point.html b/doc/html/boost_typetraits/reference/is_floating_point.html index 208e979..57b8c50 100644 --- a/doc/html/boost_typetraits/reference/is_floating_point.html +++ b/doc/html/boost_typetraits/reference/is_floating_point.html @@ -3,7 +3,7 @@ is_floating_point - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_function.html b/doc/html/boost_typetraits/reference/is_function.html index 80259f1..9d4f1d3 100644 --- a/doc/html/boost_typetraits/reference/is_function.html +++ b/doc/html/boost_typetraits/reference/is_function.html @@ -3,7 +3,7 @@ is_function - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  @@ -36,10 +36,10 @@ Note that this template does not detect pointers to functions, or references to functions, these are detected by is_pointer and is_reference respectively:

                  -
                  typedef int f1();      // f1 is of function type.
                  -typedef int (f2*)();   // f2 is a pointer to a function.
                  -typedef int (f3&)();   // f3 is a reference to a function.
                  -
                  +
                  typedef int f1();      // f1 is of function type.
                  +typedef int (f2*)();   // f2 is a pointer to a function.
                  +typedef int (f3&)();   // f3 is a reference to a function.
                  +

                  C++ Standard Reference: 3.9.2p1 and 8.3.5.

                  diff --git a/doc/html/boost_typetraits/reference/is_fundamental.html b/doc/html/boost_typetraits/reference/is_fundamental.html index 5426d76..a5a30a9 100644 --- a/doc/html/boost_typetraits/reference/is_fundamental.html +++ b/doc/html/boost_typetraits/reference/is_fundamental.html @@ -3,7 +3,7 @@ is_fundamental - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_integral.html b/doc/html/boost_typetraits/reference/is_integral.html index 0bc3719..4a071c6 100644 --- a/doc/html/boost_typetraits/reference/is_integral.html +++ b/doc/html/boost_typetraits/reference/is_integral.html @@ -3,7 +3,7 @@ is_integral - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_lvalue_reference.html b/doc/html/boost_typetraits/reference/is_lvalue_reference.html index 3d1cf79..ca30f2c 100644 --- a/doc/html/boost_typetraits/reference/is_lvalue_reference.html +++ b/doc/html/boost_typetraits/reference/is_lvalue_reference.html @@ -3,7 +3,7 @@ is_lvalue_reference - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  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 83d649e..d3f2d34 100644 --- a/doc/html/boost_typetraits/reference/is_member_function_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_function_pointer.html @@ -3,7 +3,7 @@ is_member_function_pointer - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  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 0566d85..d436b13 100644 --- a/doc/html/boost_typetraits/reference/is_member_object_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_object_pointer.html @@ -3,7 +3,7 @@ is_member_object_pointer - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_member_pointer.html b/doc/html/boost_typetraits/reference/is_member_pointer.html index 09781dc..bd3b4f1 100644 --- a/doc/html/boost_typetraits/reference/is_member_pointer.html +++ b/doc/html/boost_typetraits/reference/is_member_pointer.html @@ -3,7 +3,7 @@ is_member_pointer - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_object.html b/doc/html/boost_typetraits/reference/is_object.html index d8b7069..ef9b2d0 100644 --- a/doc/html/boost_typetraits/reference/is_object.html +++ b/doc/html/boost_typetraits/reference/is_object.html @@ -3,7 +3,7 @@ is_object - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_pod.html b/doc/html/boost_typetraits/reference/is_pod.html index a7001b1..2ada201 100644 --- a/doc/html/boost_typetraits/reference/is_pod.html +++ b/doc/html/boost_typetraits/reference/is_pod.html @@ -3,7 +3,7 @@ is_pod - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_pointer.html b/doc/html/boost_typetraits/reference/is_pointer.html index b1c5fcc..0c5ddb7 100644 --- a/doc/html/boost_typetraits/reference/is_pointer.html +++ b/doc/html/boost_typetraits/reference/is_pointer.html @@ -3,7 +3,7 @@ is_pointer - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_polymorphic.html b/doc/html/boost_typetraits/reference/is_polymorphic.html index a0e9459..352e3d0 100644 --- a/doc/html/boost_typetraits/reference/is_polymorphic.html +++ b/doc/html/boost_typetraits/reference/is_polymorphic.html @@ -3,7 +3,7 @@ is_polymorphic - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_reference.html b/doc/html/boost_typetraits/reference/is_reference.html index 8ed01a8..33b9d92 100644 --- a/doc/html/boost_typetraits/reference/is_reference.html +++ b/doc/html/boost_typetraits/reference/is_reference.html @@ -3,7 +3,7 @@ is_reference - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_rvalue_reference.html b/doc/html/boost_typetraits/reference/is_rvalue_reference.html index 339a9ce..f4db752 100644 --- a/doc/html/boost_typetraits/reference/is_rvalue_reference.html +++ b/doc/html/boost_typetraits/reference/is_rvalue_reference.html @@ -3,7 +3,7 @@ is_rvalue_reference - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_same.html b/doc/html/boost_typetraits/reference/is_same.html index 5de12a9..0a58a0a 100644 --- a/doc/html/boost_typetraits/reference/is_same.html +++ b/doc/html/boost_typetraits/reference/is_same.html @@ -3,7 +3,7 @@ is_same - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_scalar.html b/doc/html/boost_typetraits/reference/is_scalar.html index 7d935c2..4e917b5 100644 --- a/doc/html/boost_typetraits/reference/is_scalar.html +++ b/doc/html/boost_typetraits/reference/is_scalar.html @@ -3,7 +3,7 @@ is_scalar - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_signed.html b/doc/html/boost_typetraits/reference/is_signed.html index 91dcb58..2d45fa1 100644 --- a/doc/html/boost_typetraits/reference/is_signed.html +++ b/doc/html/boost_typetraits/reference/is_signed.html @@ -3,7 +3,7 @@ is_signed - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_stateless.html b/doc/html/boost_typetraits/reference/is_stateless.html index ee0c425..5eb0ebb 100644 --- a/doc/html/boost_typetraits/reference/is_stateless.html +++ b/doc/html/boost_typetraits/reference/is_stateless.html @@ -3,7 +3,7 @@ is_stateless - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_union.html b/doc/html/boost_typetraits/reference/is_union.html index 37d2a8e..f255b36 100644 --- a/doc/html/boost_typetraits/reference/is_union.html +++ b/doc/html/boost_typetraits/reference/is_union.html @@ -3,7 +3,7 @@ is_union - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_unsigned.html b/doc/html/boost_typetraits/reference/is_unsigned.html index be5dbc8..9212d99 100644 --- a/doc/html/boost_typetraits/reference/is_unsigned.html +++ b/doc/html/boost_typetraits/reference/is_unsigned.html @@ -3,7 +3,7 @@ is_unsigned - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  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 a1beeaa..98f4d21 100644 --- a/doc/html/boost_typetraits/reference/is_virtual_base_of.html +++ b/doc/html/boost_typetraits/reference/is_virtual_base_of.html @@ -3,7 +3,7 @@ is_virtual_base_of - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_void.html b/doc/html/boost_typetraits/reference/is_void.html index defa838..b2541c4 100644 --- a/doc/html/boost_typetraits/reference/is_void.html +++ b/doc/html/boost_typetraits/reference/is_void.html @@ -3,7 +3,7 @@ is_void - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/is_volatile.html b/doc/html/boost_typetraits/reference/is_volatile.html index 4556531..2a86555 100644 --- a/doc/html/boost_typetraits/reference/is_volatile.html +++ b/doc/html/boost_typetraits/reference/is_volatile.html @@ -3,7 +3,7 @@ is_volatile - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/make_signed.html b/doc/html/boost_typetraits/reference/make_signed.html index 08fd753..88f1a66 100644 --- a/doc/html/boost_typetraits/reference/make_signed.html +++ b/doc/html/boost_typetraits/reference/make_signed.html @@ -3,7 +3,7 @@ make_signed - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/make_unsigned.html b/doc/html/boost_typetraits/reference/make_unsigned.html index 4df01aa..6cad000 100644 --- a/doc/html/boost_typetraits/reference/make_unsigned.html +++ b/doc/html/boost_typetraits/reference/make_unsigned.html @@ -3,7 +3,7 @@ make_unsigned - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/promote.html b/doc/html/boost_typetraits/reference/promote.html index ad566af..89398f0 100644 --- a/doc/html/boost_typetraits/reference/promote.html +++ b/doc/html/boost_typetraits/reference/promote.html @@ -3,7 +3,7 @@ promote - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/rank.html b/doc/html/boost_typetraits/reference/rank.html index 4ea0d33..4e27e5a 100644 --- a/doc/html/boost_typetraits/reference/rank.html +++ b/doc/html/boost_typetraits/reference/rank.html @@ -3,7 +3,7 @@ rank - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/remove_all_extents.html b/doc/html/boost_typetraits/reference/remove_all_extents.html index 533b83b..2cea360 100644 --- a/doc/html/boost_typetraits/reference/remove_all_extents.html +++ b/doc/html/boost_typetraits/reference/remove_all_extents.html @@ -3,7 +3,7 @@ remove_all_extents - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/remove_const.html b/doc/html/boost_typetraits/reference/remove_const.html index ce2fa9d..dd87666 100644 --- a/doc/html/boost_typetraits/reference/remove_const.html +++ b/doc/html/boost_typetraits/reference/remove_const.html @@ -3,7 +3,7 @@ remove_const - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/remove_cv.html b/doc/html/boost_typetraits/reference/remove_cv.html index 607529b..11a016f 100644 --- a/doc/html/boost_typetraits/reference/remove_cv.html +++ b/doc/html/boost_typetraits/reference/remove_cv.html @@ -3,7 +3,7 @@ remove_cv - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/remove_extent.html b/doc/html/boost_typetraits/reference/remove_extent.html index cc5d193..34106ff 100644 --- a/doc/html/boost_typetraits/reference/remove_extent.html +++ b/doc/html/boost_typetraits/reference/remove_extent.html @@ -3,7 +3,7 @@ remove_extent - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/remove_pointer.html b/doc/html/boost_typetraits/reference/remove_pointer.html index 1569795..d27fb28 100644 --- a/doc/html/boost_typetraits/reference/remove_pointer.html +++ b/doc/html/boost_typetraits/reference/remove_pointer.html @@ -3,7 +3,7 @@ remove_pointer - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/remove_reference.html b/doc/html/boost_typetraits/reference/remove_reference.html index 16dbcc3..1929aee 100644 --- a/doc/html/boost_typetraits/reference/remove_reference.html +++ b/doc/html/boost_typetraits/reference/remove_reference.html @@ -3,7 +3,7 @@ remove_reference - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/remove_volatile.html b/doc/html/boost_typetraits/reference/remove_volatile.html index 0954c14..543a4bd 100644 --- a/doc/html/boost_typetraits/reference/remove_volatile.html +++ b/doc/html/boost_typetraits/reference/remove_volatile.html @@ -3,7 +3,7 @@ remove_volatile - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/reference/type_with_alignment.html b/doc/html/boost_typetraits/reference/type_with_alignment.html index a9e7401..a090aec 100644 --- a/doc/html/boost_typetraits/reference/type_with_alignment.html +++ b/doc/html/boost_typetraits/reference/type_with_alignment.html @@ -3,7 +3,7 @@ type_with_alignment - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/boost_typetraits/user_defined.html b/doc/html/boost_typetraits/user_defined.html index 521f7ac..9edcfb1 100644 --- a/doc/html/boost_typetraits/user_defined.html +++ b/doc/html/boost_typetraits/user_defined.html @@ -3,7 +3,7 @@ User Defined Specializations - + @@ -22,7 +22,7 @@
                  PrevUpHomeNext
                  -
                  +
                  diff --git a/doc/html/index.html b/doc/html/index.html index 19d4190..5ddbcdf 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -3,7 +3,7 @@ Chapter 1. Boost.TypeTraits - + @@ -18,7 +18,7 @@
                  Next
                  -
                  +

                  Chapter 1. Boost.TypeTraits

                  @@ -30,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 2e8efe8..6d6dc57 100644 --- a/doc/html/index/s11.html +++ b/doc/html/index/s11.html @@ -3,7 +3,7 @@ Class Index - + @@ -22,242 +22,193 @@
                  PrevUpHomeNext
                  -
                  +

                  -Class Index

                  -

                  A C D E F H I M P R T

                  +Class Index

              +

              A C D E F H I M P R T

              A
              -
              -
              add_const
              -

              add_const

              -
              add_cv
              -

              add_cv

              -
              add_lvalue_reference
              -

              add_lvalue_reference

              -
              add_pointer
              -

              add_pointer

              -
              add_reference
              -

              add_reference

              -
              add_rvalue_reference
              -

              add_rvalue_reference

              -
              add_volatile
              -

              add_volatile

              -
              aligned_storage
              -

              aligned_storage

              -
              alignment_of
              -

              alignment_of

              -
              +
              -C +C
              -
              +
              -D +D
              -
              -
              decay
              -

              decay

              -
              +
              -E +E
              -
              -
              extent
              -

              extent

              -
              +
              -F +F
              -
              -
              floating_point_promotion
              -

              floating_point_promotion

              -
              function_traits
              -

              function_traits

              -
              +
              -H +H
              -
              -
              has_new_operator
              -

              has_new_operator

              -
              has_nothrow_assign
              -

              has_nothrow_assign

              -
              has_nothrow_constructor
              -

              has_nothrow_constructor

              -
              has_nothrow_copy
              -

              has_nothrow_copy

              -
              has_nothrow_copy_constructor
              -

              has_nothrow_copy

              -
              has_nothrow_default_constructor
              -

              has_nothrow_constructor

              -
              has_trivial_assign
              -

              has_trivial_assign

              -
              has_trivial_constructor
              -

              has_trivial_constructor

              -
              has_trivial_copy
              -

              has_trivial_copy

              -
              has_trivial_copy_constructor
              -

              has_trivial_copy

              -
              has_trivial_default_constructor
              -

              has_trivial_constructor

              -
              has_trivial_destructor
              -

              has_trivial_destructor

              -
              has_virtual_destructor
              -

              has_virtual_destructor

              -
              +
              -I +I
              -
              -
              integral_constant
              -
              - - - - -

              alignment_of

              extent

              integral_constant

              rank

              -
              integral_promotion
              -

              integral_promotion

              -
              is_abstract
              -

              is_abstract

              -
              is_arithmetic
              -

              is_arithmetic

              -
              is_array
              -

              is_array

              -
              is_base_of
              -

              is_base_of

              -
              is_class
              -
              - - -

              is_class

              User Defined Specializations

              -
              is_complex
              -

              is_complex

              -
              is_compound
              -

              is_compound

              -
              is_const
              -

              is_const

              -
              is_convertible
              -

              is_convertible

              -
              is_empty
              -

              is_empty

              -
              is_enum
              -

              is_enum

              -
              is_floating_point
              -

              is_floating_point

              -
              is_function
              -

              is_function

              -
              is_fundamental
              -

              is_fundamental

              -
              is_integral
              -

              is_integral

              -
              is_lvalue_reference
              -

              is_lvalue_reference

              -
              is_member_function_pointer
              -

              is_member_function_pointer

              -
              is_member_object_pointer
              -

              is_member_object_pointer

              -
              is_member_pointer
              -

              is_member_pointer

              -
              is_object
              -

              is_object

              -
              is_pod
              -
              - - -

              is_pod

              User Defined Specializations

              -
              is_pointer
              -
              - - -

              Background and Tutorial

              is_pointer

              -
              is_polymorphic
              -

              is_polymorphic

              -
              is_reference
              -

              is_reference

              -
              is_rvalue_reference
              -

              is_rvalue_reference

              -
              is_same
              -

              is_same

              -
              is_scalar
              -

              is_scalar

              -
              is_signed
              -

              is_signed

              -
              is_stateless
              -

              is_stateless

              -
              is_union
              -
              - - -

              is_union

              User Defined Specializations

              -
              is_unsigned
              -

              is_unsigned

              -
              is_virtual_base_of
              -

              is_virtual_base_of

              -
              is_void
              -
              - - -

              Background and Tutorial

              is_void

              -
              is_volatile
              -

              is_volatile

              -
              +
              -M +M
              -
              -
              make_signed
              -

              make_signed

              -
              make_unsigned
              -

              make_unsigned

              -
              +
              -P +P
              -
              -
              promote
              -

              promote

              -
              +
              -R +R
              -
              -
              rank
              -

              rank

              -
              remove_all_extents
              -

              remove_all_extents

              -
              remove_const
              -

              remove_const

              -
              remove_cv
              -

              remove_cv

              -
              remove_extent
              -
              - - -

              Background and Tutorial

              remove_extent

              -
              remove_pointer
              -

              remove_pointer

              -
              remove_reference
              -

              remove_reference

              -
              remove_volatile
              -

              remove_volatile

              -
              +
              -T +T
              -
              -
              type_with_alignment
              -

              type_with_alignment

              -
              +
              diff --git a/doc/html/index/s12.html b/doc/html/index/s12.html index fcac226..86acd48 100644 --- a/doc/html/index/s12.html +++ b/doc/html/index/s12.html @@ -3,7 +3,7 @@ Typedef Index - + @@ -22,32 +22,32 @@
              PrevUpHomeNext
              -
              +

              -Typedef Index

              -

              F R T

              +Typedef Index
              +

              F R T

              -F +F
              -
              -
              false_type
              -

              integral_constant

              -

+
-R +R
-
-
result_type
-

function_traits

-
+
-T +T
-
-
true_type
-

integral_constant

-
+
diff --git a/doc/html/index/s13.html b/doc/html/index/s13.html index 9562420..be1a954 100644 --- a/doc/html/index/s13.html +++ b/doc/html/index/s13.html @@ -3,7 +3,7 @@ Macro Index - + @@ -22,89 +22,129 @@
PrevUpHomeNext
-
+

-Macro Index

-

B

+Macro Index
+

B

-B +B
-
-
BOOST_ALIGNMENT_OF
-

Support for Compiler Intrinsics

-
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION
-

Type Traits that Transform One Type to Another

-
BOOST_COMMON_TYPE_DONT_USE_TYPEOF
-

common_type

-
BOOST_HAS_NOTHROW_ASSIGN
-

Support for Compiler Intrinsics

-
BOOST_HAS_NOTHROW_CONSTRUCTOR
-
- - -

has_nothrow_constructor

Support for Compiler Intrinsics

-
BOOST_HAS_NOTHROW_COPY
-
- - -

has_nothrow_copy

Support for Compiler Intrinsics

-
BOOST_HAS_TRIVIAL_ASSIGN
-
- - -

has_trivial_assign

Support for Compiler Intrinsics

-
BOOST_HAS_TRIVIAL_CONSTRUCTOR
-
- - -

has_trivial_constructor

Support for Compiler Intrinsics

-
BOOST_HAS_TRIVIAL_COPY
-
- - -

has_trivial_copy

Support for Compiler Intrinsics

-
BOOST_HAS_TRIVIAL_DESTRUCTOR
-
- - -

has_trivial_destructor

Support for Compiler Intrinsics

-
BOOST_HAS_VIRTUAL_DESTRUCTOR
-
- - -

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
-
- - -

is_class

Support for Compiler Intrinsics

-
BOOST_IS_CONVERTIBLE
-

Support for Compiler Intrinsics

-
BOOST_IS_EMPTY
-
- - -

is_empty

Support for Compiler Intrinsics

-
BOOST_IS_ENUM
-

Support for Compiler Intrinsics

-
BOOST_IS_POD
-
- - -

is_pod

Support for Compiler Intrinsics

-
BOOST_IS_POLYMORPHIC
-

Support for Compiler Intrinsics

-
BOOST_IS_UNION
-
- - -

is_union

Support for Compiler Intrinsics

- +
diff --git a/doc/html/index/s14.html b/doc/html/index/s14.html index b93cab0..98ece5f 100644 --- a/doc/html/index/s14.html +++ b/doc/html/index/s14.html @@ -3,7 +3,7 @@ Index - + @@ -21,424 +21,467 @@
PrevUpHome
-
+

-Index

-

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

+Index
+

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

-A +A
-
-
add_const
-

add_const

-
add_cv
-

add_cv

-
add_lvalue_reference
-

add_lvalue_reference

-
add_pointer
-

add_pointer

-
add_reference
-

add_reference

-
add_rvalue_reference
-

add_rvalue_reference

-
add_volatile
-

add_volatile

-
aligned_storage
-

aligned_storage

-
alignment_of
-
- - -

alignment_of

integral_constant

- +
-B +B
-
-
Background and Tutorial
-
- - - -

is_pointer

is_void

remove_extent

-
BOOST_ALIGNMENT_OF
-

Support for Compiler Intrinsics

-
BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION
-

Type Traits that Transform One Type to Another

-
BOOST_COMMON_TYPE_DONT_USE_TYPEOF
-

common_type

-
BOOST_HAS_NOTHROW_ASSIGN
-

Support for Compiler Intrinsics

-
BOOST_HAS_NOTHROW_CONSTRUCTOR
-
- - -

has_nothrow_constructor

Support for Compiler Intrinsics

-
BOOST_HAS_NOTHROW_COPY
-
- - -

has_nothrow_copy

Support for Compiler Intrinsics

-
BOOST_HAS_TRIVIAL_ASSIGN
-
- - -

has_trivial_assign

Support for Compiler Intrinsics

-
BOOST_HAS_TRIVIAL_CONSTRUCTOR
-
- - -

has_trivial_constructor

Support for Compiler Intrinsics

-
BOOST_HAS_TRIVIAL_COPY
-
- - -

has_trivial_copy

Support for Compiler Intrinsics

-
BOOST_HAS_TRIVIAL_DESTRUCTOR
-
- - -

has_trivial_destructor

Support for Compiler Intrinsics

-
BOOST_HAS_VIRTUAL_DESTRUCTOR
-
- - -

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
-
- - -

is_class

Support for Compiler Intrinsics

-
BOOST_IS_CONVERTIBLE
-

Support for Compiler Intrinsics

-
BOOST_IS_EMPTY
-
- - -

is_empty

Support for Compiler Intrinsics

-
BOOST_IS_ENUM
-

Support for Compiler Intrinsics

-
BOOST_IS_POD
-
- - -

is_pod

Support for Compiler Intrinsics

-
BOOST_IS_POLYMORPHIC
-

Support for Compiler Intrinsics

-
BOOST_IS_UNION
-
- - -

is_union

Support for Compiler Intrinsics

-
+
-C +C
-
+
-D +D
-
-
decay
-

decay

-
+
-E +E
-
-
extent
-
- - -

extent

integral_constant

-
+
-F +F
-
-
false_type
-

integral_constant

-
floating_point_promotion
-

floating_point_promotion

-
function_traits
-
- - -

function_traits

result_type

-
+
-H +H
-
-
has_new_operator
-

has_new_operator

-
has_nothrow_assign
-

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

-
has_nothrow_copy_constructor
-

has_nothrow_copy

-
has_nothrow_default_constructor
-

has_nothrow_constructor

-
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

-
has_trivial_copy_constructor
-

has_trivial_copy

-
has_trivial_default_constructor
-

has_trivial_constructor

-
has_trivial_destructor
-
- - -

BOOST_HAS_TRIVIAL_DESTRUCTOR

has_trivial_destructor

-
has_virtual_destructor
-
- - -

BOOST_HAS_VIRTUAL_DESTRUCTOR

has_virtual_destructor

-
+
-I +I
-
-
Improving std::min with common_type
-

common_type

-
int
-

is_function

-
integral_constant
-
- - - - - - -

alignment_of

extent

false_type

integral_constant

rank

true_type

-
integral_promotion
-

integral_promotion

-
is_abstract
-

is_abstract

-
is_arithmetic
-

is_arithmetic

-
is_array
-

is_array

-
is_base_of
-

is_base_of

-
is_class
-
- - - -

BOOST_IS_CLASS

is_class

User Defined Specializations

-
is_complex
-

is_complex

-
is_compound
-

is_compound

-
is_const
-

is_const

-
is_convertible
-

is_convertible

-
is_empty
-
- - -

BOOST_IS_EMPTY

is_empty

-
is_enum
-

is_enum

-
is_floating_point
-

is_floating_point

-
is_function
-
- - -

int

is_function

-
is_fundamental
-

is_fundamental

-
is_integral
-

is_integral

-
is_lvalue_reference
-

is_lvalue_reference

-
is_member_function_pointer
-

is_member_function_pointer

-
is_member_object_pointer
-

is_member_object_pointer

-
is_member_pointer
-

is_member_pointer

-
is_object
-

is_object

-
is_pod
-
- - - -

BOOST_IS_POD

is_pod

User Defined Specializations

-
is_pointer
-
- - -

Background and Tutorial

is_pointer

-
is_polymorphic
-

is_polymorphic

-
is_reference
-

is_reference

-
is_rvalue_reference
-

is_rvalue_reference

-
is_same
-

is_same

-
is_scalar
-

is_scalar

-
is_signed
-

is_signed

-
is_stateless
-

is_stateless

-
is_union
-
- - - -

BOOST_IS_UNION

is_union

User Defined Specializations

-
is_unsigned
-

is_unsigned

-
is_virtual_base_of
-

is_virtual_base_of

-
is_void
-
- - -

Background and Tutorial

is_void

-
is_volatile
-

is_volatile

-
+
-M +M
-
-
make_signed
-

make_signed

-
make_unsigned
-

make_unsigned

-
+
-P +P
-
-
promote
-

promote

-
+
-R +R
-
-
rank
-
- - -

integral_constant

rank

-
remove_all_extents
-

remove_all_extents

-
remove_const
-

remove_const

-
remove_cv
-

remove_cv

-
remove_extent
-
- - -

Background and Tutorial

remove_extent

-
remove_pointer
-

remove_pointer

-
remove_reference
-

remove_reference

-
remove_volatile
-

remove_volatile

-
result_type
-

function_traits

-
+
-S +T
-
+
-T +U
-
-
true_type
-

integral_constant

-
Type Traits that Transform One Type to Another
-

BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION

-
type_with_alignment
-

type_with_alignment

-
-
-U -
-
-
User Defined Specializations
-
- - - -

is_class

is_pod

is_union

-
+
diff --git a/doc/type_traits.qbk b/doc/type_traits.qbk index ebac4f0..6df213d 100644 --- a/doc/type_traits.qbk +++ b/doc/type_traits.qbk @@ -23,6 +23,7 @@ [last-revision $Date$] ] +[include ../../../tools/auto_index/include/auto_index_helpers.qbk] [def __boost_root ../../../../] [def __tof '''true_type-or-false_type'''] @@ -260,19 +261,10 @@ See __has_trivial_constructor. [include history.qbk] [include credits.qbk] -[? enable_index -''' - - Class Index - - - Typedef Index - - - Macro Index - - -''' -] +[named_index class_name Class Index] +[named_index typedef_name Typedef Index] +[named_index macro_name Macro Index] +[index] + From 437c57d614f37d602bf5f0abe5de4958245b924d Mon Sep 17 00:00:00 2001 From: Antony Polukhin Date: Sun, 17 Jul 2011 19:36:06 +0000 Subject: [PATCH 21/82] Fixes #5707. Fixes some trivial bugs for VC++6 [SVN r73201] --- include/boost/type_traits/add_rvalue_reference.hpp | 6 ++---- include/boost/type_traits/is_unsigned.hpp | 2 +- include/boost/type_traits/remove_cv.hpp | 3 ++- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/boost/type_traits/add_rvalue_reference.hpp b/include/boost/type_traits/add_rvalue_reference.hpp index 2be58f6..f0e9925 100644 --- a/include/boost/type_traits/add_rvalue_reference.hpp +++ b/include/boost/type_traits/add_rvalue_reference.hpp @@ -39,15 +39,13 @@ namespace type_traits_detail { struct add_rvalue_reference_helper { typedef T type; }; +#if !defined(BOOST_NO_RVALUE_REFERENCES) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template struct add_rvalue_reference_helper { -#if !defined(BOOST_NO_RVALUE_REFERENCES) typedef T&& type; -#else - typedef T type; -#endif }; +#endif template struct add_rvalue_reference_imp diff --git a/include/boost/type_traits/is_unsigned.hpp b/include/boost/type_traits/is_unsigned.hpp index d8e5a89..0602838 100644 --- a/include/boost/type_traits/is_unsigned.hpp +++ b/include/boost/type_traits/is_unsigned.hpp @@ -109,7 +109,7 @@ template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; #endif -#if defined(WCHAR_MIN) && (WCHAR_MIN == 0) +#if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T) template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; template <> struct is_unsigned_imp : public true_type{}; diff --git a/include/boost/type_traits/remove_cv.hpp b/include/boost/type_traits/remove_cv.hpp index 4061fd2..ee6d8f9 100644 --- a/include/boost/type_traits/remove_cv.hpp +++ b/include/boost/type_traits/remove_cv.hpp @@ -27,6 +27,8 @@ namespace boost { +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + namespace detail{ template @@ -49,7 +51,6 @@ struct rvalue_ref_filter_rem_cv } -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION // convert a type T to a non-cv-qualified type - remove_cv BOOST_TT_AUX_TYPE_TRAIT_DEF1(remove_cv,T,typename boost::detail::rvalue_ref_filter_rem_cv::type) From 6842d7346bd9efa6a10beecd12fba62d2b9bb0ca Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 20 Aug 2011 09:02:55 +0000 Subject: [PATCH 22/82] Documentation tweaks. Fixes #5666. [SVN r73942] --- .../boost_typetraits/reference/is_class.html | 2 +- .../boost_typetraits/reference/is_empty.html | 4 +- doc/html/index.html | 4 +- doc/html/index/s11.html | 18 ++++---- doc/html/index/s12.html | 2 +- doc/html/index/s13.html | 2 +- doc/html/index/s14.html | 44 +++++++++---------- doc/is_class.qbk | 2 +- doc/is_empty.qbk | 2 +- include/boost/type_traits/intrinsics.hpp | 4 +- 10 files changed, 42 insertions(+), 42 deletions(-) diff --git a/doc/html/boost_typetraits/reference/is_class.html b/doc/html/boost_typetraits/reference/is_class.html index e05c5bf..2c3d3d4 100644 --- a/doc/html/boost_typetraits/reference/is_class.html +++ b/doc/html/boost_typetraits/reference/is_class.html @@ -31,7 +31,7 @@

Inherits: If T is a (possibly cv-qualified) - class type then inherits from true_type, + class type (and not a union type) then inherits from true_type, otherwise inherits from false_type.

diff --git a/doc/html/boost_typetraits/reference/is_empty.html b/doc/html/boost_typetraits/reference/is_empty.html index 84cae9a..ff528a9 100644 --- a/doc/html/boost_typetraits/reference/is_empty.html +++ b/doc/html/boost_typetraits/reference/is_empty.html @@ -30,8 +30,8 @@ struct is_empty : public true_type-or-false_type {};

- Inherits: If T is an empty class type then - inherits from true_type, + Inherits: If T is an empty class type (and + not a union type) then inherits from true_type, otherwise inherits from false_type.

diff --git a/doc/html/index.html b/doc/html/index.html index 5ddbcdf..4668253 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -30,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)

@@ -171,7 +171,7 @@

- +

Last revised: January 01, 2011 at 17:01:48 +0000

Last revised: July 08, 2011 at 18:51:46 +0100


diff --git a/doc/html/index/s11.html b/doc/html/index/s11.html index 6d6dc57..e8737a2 100644 --- a/doc/html/index/s11.html +++ b/doc/html/index/s11.html @@ -24,7 +24,7 @@

-Class Index

+Class Index

A C D E F H I M P R T

@@ -47,7 +47,7 @@
@@ -105,7 +105,7 @@ @@ -117,7 +117,7 @@
  • is_class

  • @@ -139,7 +139,7 @@
  • is_pod

  • @@ -147,7 +147,7 @@

    is_pointer

  • is_polymorphic

  • @@ -160,7 +160,7 @@
  • is_union

  • @@ -170,7 +170,7 @@

    is_void

  • is_volatile

  • @@ -198,7 +198,7 @@

    remove_extent

  • remove_pointer

  • diff --git a/doc/html/index/s12.html b/doc/html/index/s12.html index 86acd48..72b079c 100644 --- a/doc/html/index/s12.html +++ b/doc/html/index/s12.html @@ -24,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 be1a954..15de3c1 100644 --- a/doc/html/index/s13.html +++ b/doc/html/index/s13.html @@ -24,7 +24,7 @@

    -Macro Index

    +Macro Index

    B

    diff --git a/doc/html/index/s14.html b/doc/html/index/s14.html index 98ece5f..22200c3 100644 --- a/doc/html/index/s14.html +++ b/doc/html/index/s14.html @@ -23,7 +23,7 @@

    -Index

    +Index

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

    @@ -193,7 +193,7 @@
    @@ -209,7 +209,7 @@
  • function_traits

  • @@ -224,7 +224,7 @@

    has_nothrow_constructor

    @@ -232,7 +232,7 @@

    has_nothrow_copy

    @@ -248,14 +248,14 @@

    has_trivial_assign

  • has_trivial_constructor

  • @@ -263,7 +263,7 @@

    has_trivial_copy

    @@ -279,14 +279,14 @@

    has_trivial_destructor

  • has_virtual_destructor

  • @@ -308,7 +308,7 @@
  • alignment_of

  • extent

  • false_type

  • -
  • integral_constant

  • +
  • integral_constant

  • rank

  • true_type

  • @@ -322,7 +322,7 @@

    is_class

    @@ -334,7 +334,7 @@

    is_empty

  • is_enum

  • @@ -343,7 +343,7 @@

    is_function

  • is_fundamental

  • @@ -357,7 +357,7 @@

    is_pod

    @@ -365,7 +365,7 @@

    is_pointer

  • is_polymorphic

  • @@ -379,7 +379,7 @@

    is_union

    @@ -389,7 +389,7 @@

    is_void

  • is_volatile

  • @@ -436,7 +436,7 @@

    rank

  • remove_all_extents

  • @@ -446,7 +446,7 @@

    remove_extent

  • remove_pointer

  • diff --git a/doc/is_class.qbk b/doc/is_class.qbk index a1fa984..1e7879e 100644 --- a/doc/is_class.qbk +++ b/doc/is_class.qbk @@ -9,7 +9,7 @@ template struct is_class : public __tof {}; -__inherit If T is a (possibly cv-qualified) class type then inherits from __true_type, +__inherit If T is a (possibly cv-qualified) class type (and not a union type) then inherits from __true_type, otherwise inherits from __false_type. __std_ref 3.9.2 and 9.2. diff --git a/doc/is_empty.qbk b/doc/is_empty.qbk index ec19563..e89e9a4 100644 --- a/doc/is_empty.qbk +++ b/doc/is_empty.qbk @@ -9,7 +9,7 @@ template struct is_empty : public __tof {}; -__inherit If T is an empty class type then inherits from __true_type, +__inherit If T is an empty class type (and not a union type) then inherits from __true_type, otherwise inherits from __false_type. __std_ref 10p5. diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 6057249..92af393 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -22,7 +22,7 @@ // (these should largely ignore cv-qualifiers) // BOOST_IS_UNION(T) should evaluate to true if T is a union type // BOOST_IS_POD(T) should evaluate to true if T is a POD type -// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty struct or union +// BOOST_IS_EMPTY(T) should evaluate to true if T is an empty class type (and not a union) // BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect // BOOST_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy // BOOST_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy @@ -36,7 +36,7 @@ // // 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 -// BOOST_IS_CLASS(T) true if T is a class type +// BOOST_IS_CLASS(T) true if T is a class type (and not a union) // BOOST_IS_CONVERTIBLE(T,U) true if T is convertible to U // BOOST_IS_ENUM(T) true is T is an enum // BOOST_IS_POLYMORPHIC(T) true if T is a polymorphic type From 5cc1ceccd16ba4a6ae50b606c9394c64f576929c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 20 Aug 2011 16:05:02 +0000 Subject: [PATCH 23/82] Fix typo in code. Fixes #5777. [SVN r73954] --- include/boost/type_traits/intrinsics.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 92af393..796317d 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -171,7 +171,7 @@ # 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 && && !is_volatile::value) +# 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) From 39cf0ec12915168e21dfb42a41d555b394ea45eb Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 31 Aug 2011 17:10:35 +0000 Subject: [PATCH 24/82] Apply Michel Morin's Clang patch. [SVN r74178] --- include/boost/type_traits/intrinsics.hpp | 64 +++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 796317d..0b25030 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -1,4 +1,3 @@ - // (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at @@ -124,6 +123,68 @@ # define BOOST_HAS_TYPE_TRAITS_INTRINSICS #endif +#if defined(BOOST_CLANG) && defined(__has_feature) +# include +# include +# include + +# if __has_feature(is_union) +# define BOOST_IS_UNION(T) __is_union(T) +# endif +// # if __has_feature(is_pod) +// # define BOOST_IS_POD(T) __is_pod(T) +// # endif +// # if __has_feature(is_empty) +// # define BOOST_IS_EMPTY(T) __is_empty(T) +// # endif +# if __has_feature(has_trivial_constructor) +# define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) +# endif +# if __has_feature(has_trivial_copy) +# define BOOST_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && !is_reference::value && !is_volatile::value) +# endif +# if __has_feature(has_trivial_assign) +# define BOOST_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) && !is_volatile::value) +# endif +# if __has_feature(has_trivial_destructor) +# define BOOST_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T) +# endif +# if __has_feature(has_nothrow_constructor) +# define BOOST_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T) +# endif +# if __has_feature(has_nothrow_copy) +# define BOOST_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) && !is_volatile::value && !is_reference::value) +# endif +# if __has_feature(has_nothrow_assign) +# define BOOST_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) && !is_volatile::value) +# endif +# if __has_feature(has_virtual_destructor) +# define BOOST_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T) +# endif +# if __has_feature(is_abstract) +# define BOOST_IS_ABSTRACT(T) __is_abstract(T) +# endif +# if __has_feature(is_base_of) +# define BOOST_IS_BASE_OF(T,U) (__is_base_of(T,U) && !is_same::value) +# endif +# if __has_feature(is_class) +# define BOOST_IS_CLASS(T) __is_class(T) +# endif +# if __has_feature(is_convertible_to) +# include +# define BOOST_IS_CONVERTIBLE(T,U) (__is_convertible_to(T,U) && !::boost::is_abstract::value) +# endif +# if __has_feature(is_enum) +# define BOOST_IS_ENUM(T) __is_enum(T) +# endif +# if __has_feature(is_polymorphic) +# define BOOST_IS_POLYMORPHIC(T) __is_polymorphic(T) +# endif +# define BOOST_ALIGNMENT_OF(T) __alignof(T) + +# define BOOST_HAS_TYPE_TRAITS_INTRINSICS +#endif + #if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) # include # include @@ -224,3 +285,4 @@ + From aabbd5c3c88a144bfc8408d4f3e5d65cafc4a897 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Thu, 1 Sep 2011 17:43:32 +0000 Subject: [PATCH 25/82] Apply final part of Michel Morin's Clang patch. [SVN r74183] --- include/boost/type_traits/intrinsics.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/boost/type_traits/intrinsics.hpp b/include/boost/type_traits/intrinsics.hpp index 0b25030..d47b33e 100644 --- a/include/boost/type_traits/intrinsics.hpp +++ b/include/boost/type_traits/intrinsics.hpp @@ -131,12 +131,12 @@ # if __has_feature(is_union) # define BOOST_IS_UNION(T) __is_union(T) # endif -// # if __has_feature(is_pod) -// # define BOOST_IS_POD(T) __is_pod(T) -// # endif -// # if __has_feature(is_empty) -// # define BOOST_IS_EMPTY(T) __is_empty(T) -// # endif +# if __has_feature(is_pod) && defined(_LIBCPP_VERSION) +# define BOOST_IS_POD(T) __is_pod(T) +# endif +# if __has_feature(is_empty) && defined(_LIBCPP_VERSION) +# define BOOST_IS_EMPTY(T) __is_empty(T) +# endif # if __has_feature(has_trivial_constructor) # define BOOST_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T) # endif From 969238f5f66f402384c68cc8096c95a74d13d689 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 10 Sep 2011 16:58:00 +0000 Subject: [PATCH 26/82] Fix errors in is_union examples. Fixes #5885. [SVN r74336] --- doc/html/boost_typetraits/reference/is_union.html | 12 ++++++++---- doc/html/index.html | 2 +- doc/html/index/s11.html | 2 +- doc/html/index/s12.html | 2 +- doc/html/index/s13.html | 2 +- doc/html/index/s14.html | 2 +- doc/is_union.qbk | 10 ++++++---- 7 files changed, 19 insertions(+), 13 deletions(-) diff --git a/doc/html/boost_typetraits/reference/is_union.html b/doc/html/boost_typetraits/reference/is_union.html index f255b36..f8b2d8e 100644 --- a/doc/html/boost_typetraits/reference/is_union.html +++ b/doc/html/boost_typetraits/reference/is_union.html @@ -62,20 +62,24 @@

    Examples:

    +

    + Given union my_union + {}; then: +

    - is_union<void> + is_union<my_union> inherits from true_type.

    - is_union<const void>::type + is_union<const my_union>::type is the type true_type.

    - is_union<void>::value is an integral constant expression + is_union<my_union>::value is an integral constant expression that evaluates to true.

    - is_union<void*>::value is an integral constant expression + is_union<my_union*>::value is an integral constant expression that evaluates to false.

    diff --git a/doc/html/index.html b/doc/html/index.html index 4668253..b66fff8 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -30,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 e8737a2..ecde8ba 100644 --- a/doc/html/index/s11.html +++ b/doc/html/index/s11.html @@ -24,7 +24,7 @@

    -Class Index

    +Class Index

    A C D E F H I M P R T

    diff --git a/doc/html/index/s12.html b/doc/html/index/s12.html index 72b079c..70a434f 100644 --- a/doc/html/index/s12.html +++ b/doc/html/index/s12.html @@ -24,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 15de3c1..8b867cd 100644 --- a/doc/html/index/s13.html +++ b/doc/html/index/s13.html @@ -24,7 +24,7 @@

    -Macro Index

    +Macro Index

    B

    diff --git a/doc/html/index/s14.html b/doc/html/index/s14.html index 22200c3..ac4bd3b 100644 --- a/doc/html/index/s14.html +++ b/doc/html/index/s14.html @@ -23,7 +23,7 @@

    -Index

    +Index

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

    diff --git a/doc/is_union.qbk b/doc/is_union.qbk index 9d8cd8f..e8203b7 100644 --- a/doc/is_union.qbk +++ b/doc/is_union.qbk @@ -30,14 +30,16 @@ __header ` #include ` or ` #include ` inherits from `__true_type`.] +Given `union my_union {};` then: -[:`is_union::type` is the type `__true_type`.] +[:`is_union` inherits from `__true_type`.] -[:`is_union::value` is an integral constant +[:`is_union::type` is the type `__true_type`.] + +[:`is_union::value` is an integral constant expression that evaluates to /true/.] -[:`is_union::value` is an integral constant +[:`is_union::value` is an integral constant expression that evaluates to /false/.] [:`is_union::value_type` is the type `bool`.] From 204f156c3b5b60bc746c5bbc59de28f18fb48578 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Mon, 26 Sep 2011 10:59:26 +0000 Subject: [PATCH 27/82] Fix doc typo. Fixes #5942. [SVN r74571] --- doc/conditional.qbk | 2 +- doc/html/boost_typetraits/reference/conditional.html | 2 +- doc/html/index.html | 2 +- doc/html/index/s11.html | 2 +- doc/html/index/s12.html | 2 +- doc/html/index/s13.html | 2 +- doc/html/index/s14.html | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/conditional.qbk b/doc/conditional.qbk index a4b867e..edb7645 100644 --- a/doc/conditional.qbk +++ b/doc/conditional.qbk @@ -16,7 +16,7 @@ __header ` #include ` or ` #include struct __conditional; } -If B is true, the member typedef type shall equal T. If B is false, the member typedef type shall equal F. +If B is true, the member typedef type shall equal T. If B is false, the member typedef type shall equal U. This trait is really just an alias for `boost::mpl::if_c`. diff --git a/doc/html/boost_typetraits/reference/conditional.html b/doc/html/boost_typetraits/reference/conditional.html index 3977fc6..9780917 100644 --- a/doc/html/boost_typetraits/reference/conditional.html +++ b/doc/html/boost_typetraits/reference/conditional.html @@ -37,7 +37,7 @@

    If B is true, the member typedef type shall equal T. If B is false, the member - typedef type shall equal F. + typedef type shall equal U.

    This trait is really just an alias for boost::mpl::if_c. diff --git a/doc/html/index.html b/doc/html/index.html index b66fff8..54193c1 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -30,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 ecde8ba..75d22d0 100644 --- a/doc/html/index/s11.html +++ b/doc/html/index/s11.html @@ -24,7 +24,7 @@

    -Class Index

    +Class Index

    A C D E F H I M P R T

    diff --git a/doc/html/index/s12.html b/doc/html/index/s12.html index 70a434f..c097111 100644 --- a/doc/html/index/s12.html +++ b/doc/html/index/s12.html @@ -24,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 8b867cd..57efc89 100644 --- a/doc/html/index/s13.html +++ b/doc/html/index/s13.html @@ -24,7 +24,7 @@

    -Macro Index

    +Macro Index

    B

    diff --git a/doc/html/index/s14.html b/doc/html/index/s14.html index ac4bd3b..22a6d6e 100644 --- a/doc/html/index/s14.html +++ b/doc/html/index/s14.html @@ -23,7 +23,7 @@

    -Index

    +Index

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

    From 360373e3ee461649421610de0d5a5f0231de4819 Mon Sep 17 00:00:00 2001 From: Gennadiy Rozental Date: Wed, 5 Oct 2011 10:05:30 +0000 Subject: [PATCH 28/82] eliminated unit_test_framework and BOOST_MESSAGE [SVN r74734] --- test/aligned_storage_test.cpp | 6 +++--- test/aligned_storage_test_a2.cpp | 6 +++--- test/init.cpp | 6 +++--- test/test.hpp | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/test/aligned_storage_test.cpp b/test/aligned_storage_test.cpp index f4b1abb..496ae2c 100644 --- a/test/aligned_storage_test.cpp +++ b/test/aligned_storage_test.cpp @@ -39,7 +39,7 @@ void do_check(const T&) must_be_pod pod1; no_unused_warning(as1); no_unused_warning(pod1); - BOOST_MESSAGE(typeid(t1).name()); + BOOST_TEST_MESSAGE(typeid(t1).name()); BOOST_CHECK(::tt::alignment_of::value == T::value); BOOST_CHECK(sizeof(t1) == T::value); #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION @@ -50,7 +50,7 @@ void do_check(const T&) must_be_pod pod2; no_unused_warning(as2); no_unused_warning(pod2); - BOOST_MESSAGE(typeid(t2).name()); + BOOST_TEST_MESSAGE(typeid(t2).name()); BOOST_CHECK(::tt::alignment_of::value == T::value); BOOST_CHECK(sizeof(t2) == T::value*2); #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION @@ -64,7 +64,7 @@ void do_check(const T&) must_be_pod pod3; no_unused_warning(as3); no_unused_warning(pod3); - BOOST_MESSAGE(typeid(t3).name()); + BOOST_TEST_MESSAGE(typeid(t3).name()); BOOST_CHECK(::tt::alignment_of::value == ::tt::alignment_of< ::boost::detail::max_align>::value); BOOST_CHECK((sizeof(t3) % T::value) == 0); #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION diff --git a/test/aligned_storage_test_a2.cpp b/test/aligned_storage_test_a2.cpp index 73a9e4c..fa7360d 100644 --- a/test/aligned_storage_test_a2.cpp +++ b/test/aligned_storage_test_a2.cpp @@ -39,7 +39,7 @@ void do_check(const T&) must_be_pod pod1; no_unused_warning(as1); no_unused_warning(pod1); - BOOST_MESSAGE(typeid(t1).name()); + BOOST_TEST_MESSAGE(typeid(t1).name()); BOOST_CHECK(::tt::alignment_of::value == T::value); BOOST_CHECK(sizeof(t1) == T::value); #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION @@ -50,7 +50,7 @@ void do_check(const T&) must_be_pod pod2; no_unused_warning(as2); no_unused_warning(pod2); - BOOST_MESSAGE(typeid(t2).name()); + BOOST_TEST_MESSAGE(typeid(t2).name()); BOOST_CHECK(::tt::alignment_of::value == T::value); BOOST_CHECK(sizeof(t2) == T::value*2); #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION @@ -64,7 +64,7 @@ void do_check(const T&) must_be_pod pod3; no_unused_warning(as3); no_unused_warning(pod3); - BOOST_MESSAGE(typeid(t3).name()); + BOOST_TEST_MESSAGE(typeid(t3).name()); BOOST_CHECK(::tt::alignment_of::value == ::tt::alignment_of< ::boost::detail::max_align>::value); BOOST_CHECK((sizeof(t3) % T::value) == 0); #ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION diff --git a/test/init.cpp b/test/init.cpp index 113ab0c..95a5a9f 100644 --- a/test/init.cpp +++ b/test/init.cpp @@ -6,15 +6,15 @@ #include "test.hpp" -boost::unit_test_framework::test_suite* get_master_unit(const char* name) +boost::unit_test::test_suite* get_master_unit(const char* name) { - static boost::unit_test_framework::test_suite* ptest_suite = 0; + static boost::unit_test::test_suite* ptest_suite = 0; if(0 == ptest_suite) ptest_suite = BOOST_TEST_SUITE( name ? name : "" ); return ptest_suite; } -boost::unit_test_framework::test_suite* init_unit_test_suite ( int , char* [] ) +boost::unit_test::test_suite* init_unit_test_suite ( int , char* [] ) { return get_master_unit(); } diff --git a/test/test.hpp b/test/test.hpp index 8bd6b90..00a1e60 100644 --- a/test/test.hpp +++ b/test/test.hpp @@ -67,7 +67,7 @@ // global unit, this is not safe, but until the unit test framework uses // shared_ptr throughout this is about as good as it gets :-( // -boost::unit_test_framework::test_suite* get_master_unit(const char* name = 0); +boost::unit_test::test_suite* get_master_unit(const char* name = 0); // // initialisation class: @@ -113,7 +113,7 @@ int error_count = 0; }\ }while(0) -#define BOOST_MESSAGE(message)\ +#define BOOST_TEST_MESSAGE(message)\ do{ std::cout << __FILE__ << ":" << __LINE__ << ": " << message << std::endl; }while(0) #define BOOST_CHECK(pred)\ From 6e2fae44d47a34236d98fa950ad9dfc9e9301bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bron?= Date: Fri, 7 Oct 2011 21:05:54 +0000 Subject: [PATCH 29/82] added type trait extension to operator detection [SVN r74782] --- doc/has_bit_and.qbk | 71 + doc/has_bit_and_assign.qbk | 71 + doc/has_bit_or.qbk | 71 + doc/has_bit_or_assign.qbk | 71 + doc/has_bit_xor.qbk | 71 + doc/has_bit_xor_assign.qbk | 71 + doc/has_complement.qbk | 73 + doc/has_dereference.qbk | 76 + doc/has_divides.qbk | 73 + doc/has_divides_assign.qbk | 73 + doc/has_equal_to.qbk | 73 + doc/has_greater.qbk | 73 + doc/has_greater_equal.qbk | 73 + doc/has_left_shift.qbk | 74 + doc/has_left_shift_assign.qbk | 71 + doc/has_less.qbk | 73 + doc/has_less_equal.qbk | 73 + doc/has_logical_and.qbk | 72 + doc/has_logical_not.qbk | 72 + doc/has_logical_or.qbk | 72 + doc/has_minus.qbk | 73 + doc/has_minus_assign.qbk | 73 + doc/has_modulus.qbk | 71 + doc/has_modulus_assign.qbk | 71 + doc/has_multiplies.qbk | 73 + doc/has_multiplies_assign.qbk | 73 + doc/has_negate.qbk | 72 + doc/has_not_equal_to.qbk | 73 + doc/has_plus.qbk | 73 + doc/has_plus_assign.qbk | 73 + doc/has_post_decrement.qbk | 74 + doc/has_post_increment.qbk | 74 + doc/has_pre_decrement.qbk | 74 + doc/has_pre_increment.qbk | 74 + doc/has_right_shift.qbk | 74 + doc/has_right_shift_assign.qbk | 71 + doc/has_unary_minus.qbk | 72 + doc/has_unary_plus.qbk | 72 + doc/html/boost_typetraits/background.html | 11 +- doc/html/boost_typetraits/category.html | 13 +- .../boost_typetraits/category/alignment.html | 11 +- .../boost_typetraits/category/function.html | 11 +- .../boost_typetraits/category/transform.html | 17 +- .../category/value_traits.html | 13 +- .../category/value_traits/operators.html | 1411 +++++++++++++++++ .../category/value_traits/primary.html | 11 +- .../category/value_traits/properties.html | 11 +- .../category/value_traits/relate.html | 17 +- doc/html/boost_typetraits/credits.html | 11 +- doc/html/boost_typetraits/examples.html | 11 +- doc/html/boost_typetraits/examples/copy.html | 11 +- .../boost_typetraits/examples/destruct.html | 11 +- doc/html/boost_typetraits/examples/fill.html | 11 +- .../examples/improved_min.html | 11 +- doc/html/boost_typetraits/examples/iter.html | 11 +- .../boost_typetraits/examples/to_double.html | 11 +- doc/html/boost_typetraits/history.html | 11 +- doc/html/boost_typetraits/intrinsics.html | 13 +- doc/html/boost_typetraits/intro.html | 11 +- doc/html/boost_typetraits/mpl.html | 11 +- doc/html/boost_typetraits/reference.html | 49 +- .../boost_typetraits/reference/add_const.html | 13 +- .../boost_typetraits/reference/add_cv.html | 13 +- .../reference/add_lvalue_reference.html | 13 +- .../reference/add_pointer.html | 13 +- .../reference/add_reference.html | 13 +- .../reference/add_rvalue_reference.html | 13 +- .../reference/add_volatile.html | 13 +- .../reference/aligned_storage.html | 11 +- .../reference/alignment_of.html | 11 +- .../reference/common_type.html | 11 +- .../reference/conditional.html | 11 +- .../boost_typetraits/reference/decay.html | 13 +- .../boost_typetraits/reference/extent.html | 11 +- .../reference/floating_point_promotion.html | 13 +- .../reference/function_traits.html | 21 +- .../reference/has_bit_and.html | 150 ++ .../reference/has_bit_and_assign.html | 150 ++ .../reference/has_bit_or.html | 148 ++ .../reference/has_bit_or_assign.html | 150 ++ .../reference/has_bit_xor.html | 148 ++ .../reference/has_bit_xor_assign.html | 150 ++ .../reference/has_complement.html | 157 ++ .../reference/has_dereference.html | 166 ++ .../reference/has_divides.html | 154 ++ .../reference/has_divides_assign.html | 156 ++ .../reference/has_equal_to.html | 155 ++ .../reference/has_greater.html | 155 ++ .../reference/has_greater_equal.html | 155 ++ .../reference/has_left_shift.html | 162 ++ .../reference/has_left_shift_assign.html | 150 ++ .../boost_typetraits/reference/has_less.html | 155 ++ .../reference/has_less_equal.html | 155 ++ .../reference/has_logical_and.html | 153 ++ .../reference/has_logical_not.html | 153 ++ .../reference/has_logical_or.html | 153 ++ .../boost_typetraits/reference/has_minus.html | 154 ++ .../reference/has_minus_assign.html | 156 ++ .../reference/has_modulus.html | 147 ++ .../reference/has_modulus_assign.html | 149 ++ .../reference/has_multiplies.html | 154 ++ .../reference/has_multiplies_assign.html | 156 ++ .../reference/has_negate.html | 153 ++ .../reference/has_new_operator.html | 19 +- .../reference/has_no_throw_def_cons.html | 17 +- .../reference/has_not_equal_to.html | 155 ++ .../reference/has_nothrow_assign.html | 17 +- .../reference/has_nothrow_constructor.html | 11 +- .../reference/has_nothrow_copy.html | 11 +- .../reference/has_nothrow_cp_cons.html | 11 +- .../boost_typetraits/reference/has_plus.html | 154 ++ .../reference/has_plus_assign.html | 156 ++ .../reference/has_post_decrement.html | 163 ++ .../reference/has_post_increment.html | 163 ++ .../reference/has_pre_decrement.html | 163 ++ .../reference/has_pre_increment.html | 163 ++ .../reference/has_right_shift.html | 162 ++ .../reference/has_right_shift_assign.html | 154 ++ .../reference/has_trivial_assign.html | 17 +- .../reference/has_trivial_constructor.html | 11 +- .../reference/has_trivial_copy.html | 11 +- .../reference/has_trivial_cp_cons.html | 11 +- .../reference/has_trivial_def_cons.html | 11 +- .../reference/has_trivial_destructor.html | 17 +- .../reference/has_unary_minus.html | 153 ++ .../reference/has_unary_plus.html | 153 ++ .../reference/has_virtual_destructor.html | 17 +- .../reference/integral_constant.html | 11 +- .../reference/integral_promotion.html | 13 +- .../reference/is_abstract.html | 11 +- .../reference/is_arithmetic.html | 11 +- .../boost_typetraits/reference/is_array.html | 11 +- .../reference/is_base_of.html | 11 +- .../boost_typetraits/reference/is_class.html | 11 +- .../reference/is_complex.html | 11 +- .../reference/is_compound.html | 11 +- .../boost_typetraits/reference/is_const.html | 11 +- .../reference/is_convertible.html | 11 +- .../boost_typetraits/reference/is_empty.html | 11 +- .../boost_typetraits/reference/is_enum.html | 11 +- .../reference/is_floating_point.html | 11 +- .../reference/is_function.html | 11 +- .../reference/is_fundamental.html | 11 +- .../reference/is_integral.html | 11 +- .../reference/is_lvalue_reference.html | 11 +- .../reference/is_member_function_pointer.html | 11 +- .../reference/is_member_object_pointer.html | 11 +- .../reference/is_member_pointer.html | 11 +- .../boost_typetraits/reference/is_object.html | 11 +- .../boost_typetraits/reference/is_pod.html | 11 +- .../reference/is_pointer.html | 11 +- .../reference/is_polymorphic.html | 11 +- .../reference/is_reference.html | 11 +- .../reference/is_rvalue_reference.html | 11 +- .../boost_typetraits/reference/is_same.html | 11 +- .../boost_typetraits/reference/is_scalar.html | 11 +- .../boost_typetraits/reference/is_signed.html | 11 +- .../reference/is_stateless.html | 11 +- .../boost_typetraits/reference/is_union.html | 11 +- .../reference/is_unsigned.html | 11 +- .../reference/is_virtual_base_of.html | 11 +- .../boost_typetraits/reference/is_void.html | 11 +- .../reference/is_volatile.html | 11 +- .../reference/make_signed.html | 13 +- .../reference/make_unsigned.html | 13 +- .../boost_typetraits/reference/promote.html | 13 +- doc/html/boost_typetraits/reference/rank.html | 11 +- .../reference/remove_all_extents.html | 13 +- .../reference/remove_const.html | 13 +- .../boost_typetraits/reference/remove_cv.html | 13 +- .../reference/remove_extent.html | 13 +- .../reference/remove_pointer.html | 13 +- .../reference/remove_reference.html | 13 +- .../reference/remove_volatile.html | 13 +- .../reference/type_with_alignment.html | 11 +- doc/html/boost_typetraits/user_defined.html | 11 +- doc/html/index.html | 55 +- doc/html/index/s11.html | 118 +- doc/html/index/s12.html | 39 +- doc/html/index/s13.html | 53 +- doc/html/index/s14.html | 410 ++++- doc/operators.qbk | 464 ++++++ doc/type_traits.qbk | 46 +- doc/value_traits.qbk | 2 + .../type_traits/detail/bool_trait_def.hpp | 12 + .../type_traits/detail/bool_trait_undef.hpp | 1 + .../detail/has_binary_operator.hpp | 229 +++ .../detail/has_postfix_operator.hpp | 191 +++ .../detail/has_prefix_operator.hpp | 210 +++ include/boost/type_traits/has_bit_and.hpp | 49 + .../boost/type_traits/has_bit_and_assign.hpp | 55 + include/boost/type_traits/has_bit_or.hpp | 49 + .../boost/type_traits/has_bit_or_assign.hpp | 55 + include/boost/type_traits/has_bit_xor.hpp | 49 + .../boost/type_traits/has_bit_xor_assign.hpp | 55 + include/boost/type_traits/has_complement.hpp | 32 + include/boost/type_traits/has_dereference.hpp | 31 + include/boost/type_traits/has_divides.hpp | 40 + .../boost/type_traits/has_divides_assign.hpp | 47 + include/boost/type_traits/has_equal_to.hpp | 49 + include/boost/type_traits/has_greater.hpp | 49 + .../boost/type_traits/has_greater_equal.hpp | 49 + include/boost/type_traits/has_left_shift.hpp | 49 + .../type_traits/has_left_shift_assign.hpp | 55 + include/boost/type_traits/has_less.hpp | 49 + include/boost/type_traits/has_less_equal.hpp | 49 + include/boost/type_traits/has_logical_and.hpp | 40 + include/boost/type_traits/has_logical_not.hpp | 23 + include/boost/type_traits/has_logical_or.hpp | 40 + include/boost/type_traits/has_minus.hpp | 60 + .../boost/type_traits/has_minus_assign.hpp | 65 + include/boost/type_traits/has_modulus.hpp | 49 + .../boost/type_traits/has_modulus_assign.hpp | 55 + include/boost/type_traits/has_multiplies.hpp | 40 + .../type_traits/has_multiplies_assign.hpp | 47 + include/boost/type_traits/has_negate.hpp | 25 + .../boost/type_traits/has_not_equal_to.hpp | 49 + include/boost/type_traits/has_operator.hpp | 51 + include/boost/type_traits/has_plus.hpp | 54 + include/boost/type_traits/has_plus_assign.hpp | 66 + .../boost/type_traits/has_post_decrement.hpp | 40 + .../boost/type_traits/has_post_increment.hpp | 38 + .../boost/type_traits/has_pre_decrement.hpp | 40 + .../boost/type_traits/has_pre_increment.hpp | 38 + include/boost/type_traits/has_right_shift.hpp | 49 + .../type_traits/has_right_shift_assign.hpp | 55 + include/boost/type_traits/has_unary_minus.hpp | 25 + include/boost/type_traits/has_unary_plus.hpp | 23 + test/has_binary_classes.hpp | 252 +++ test/has_binary_classes0_test.cpp | 263 +++ test/has_binary_classes1_test.cpp | 263 +++ test/has_binary_classes2_test.cpp | 263 +++ test/has_binary_classes3_test.cpp | 263 +++ test/has_binary_classes4_test.cpp | 263 +++ test/has_binary_classes5_test.cpp | 263 +++ test/has_binary_classes6_test.cpp | 263 +++ test/has_binary_classes7_test.cpp | 263 +++ test/has_binary_classes8_test.cpp | 263 +++ test/has_binary_classes9_test.cpp | 263 +++ test/has_binary_operators.hpp | 145 ++ test/has_bit_and_assign_test.cpp | 228 +++ test/has_bit_and_test.cpp | 228 +++ test/has_bit_or_assign_test.cpp | 228 +++ test/has_bit_or_test.cpp | 228 +++ test/has_bit_xor_assign_test.cpp | 228 +++ test/has_bit_xor_test.cpp | 228 +++ test/has_complement_test.cpp | 228 +++ test/has_dereference_test.cpp | 228 +++ test/has_divides_assign_test.cpp | 228 +++ test/has_divides_test.cpp | 228 +++ test/has_equal_to_test.cpp | 228 +++ test/has_greater_equal_test.cpp | 228 +++ test/has_greater_test.cpp | 228 +++ test/has_left_shift_assign_test.cpp | 228 +++ test/has_left_shift_test.cpp | 250 +++ test/has_less_equal_test.cpp | 228 +++ test/has_less_test.cpp | 228 +++ test/has_logical_and_test.cpp | 228 +++ test/has_logical_not_test.cpp | 231 +++ test/has_logical_or_test.cpp | 228 +++ test/has_minus_assign_test.cpp | 228 +++ test/has_minus_test.cpp | 228 +++ test/has_modulus_assign_test.cpp | 228 +++ test/has_modulus_test.cpp | 228 +++ test/has_multiplies_assign_test.cpp | 228 +++ test/has_multiplies_test.cpp | 228 +++ test/has_negate_test.cpp | 228 +++ test/has_not_equal_to_test.cpp | 228 +++ test/has_plus_assign_test.cpp | 228 +++ test/has_plus_test.cpp | 228 +++ test/has_post_decrement_test.cpp | 228 +++ test/has_post_increment_test.cpp | 228 +++ test/has_postfix_classes.hpp | 72 + test/has_postfix_classes0_test.cpp | 113 ++ test/has_postfix_classes1_test.cpp | 113 ++ test/has_postfix_classes2_test.cpp | 113 ++ test/has_postfix_classes3_test.cpp | 113 ++ test/has_postfix_operators.hpp | 131 ++ test/has_pre_decrement_test.cpp | 228 +++ test/has_pre_increment_test.cpp | 228 +++ test/has_prefix_classes.hpp | 72 + test/has_prefix_classes0_test.cpp | 113 ++ test/has_prefix_classes1_test.cpp | 113 ++ test/has_prefix_classes2_test.cpp | 113 ++ test/has_prefix_classes3_test.cpp | 113 ++ test/has_prefix_operators.hpp | 128 ++ test/has_right_shift_assign_test.cpp | 228 +++ test/has_right_shift_test.cpp | 247 +++ test/has_unary_minus_test.cpp | 228 +++ test/has_unary_plus_test.cpp | 228 +++ 290 files changed, 27273 insertions(+), 666 deletions(-) create mode 100644 doc/has_bit_and.qbk create mode 100644 doc/has_bit_and_assign.qbk create mode 100644 doc/has_bit_or.qbk create mode 100644 doc/has_bit_or_assign.qbk create mode 100644 doc/has_bit_xor.qbk create mode 100644 doc/has_bit_xor_assign.qbk create mode 100644 doc/has_complement.qbk create mode 100644 doc/has_dereference.qbk create mode 100644 doc/has_divides.qbk create mode 100644 doc/has_divides_assign.qbk create mode 100644 doc/has_equal_to.qbk create mode 100644 doc/has_greater.qbk create mode 100644 doc/has_greater_equal.qbk create mode 100644 doc/has_left_shift.qbk create mode 100644 doc/has_left_shift_assign.qbk create mode 100644 doc/has_less.qbk create mode 100644 doc/has_less_equal.qbk create mode 100644 doc/has_logical_and.qbk create mode 100644 doc/has_logical_not.qbk create mode 100644 doc/has_logical_or.qbk create mode 100644 doc/has_minus.qbk create mode 100644 doc/has_minus_assign.qbk create mode 100644 doc/has_modulus.qbk create mode 100644 doc/has_modulus_assign.qbk create mode 100644 doc/has_multiplies.qbk create mode 100644 doc/has_multiplies_assign.qbk create mode 100644 doc/has_negate.qbk create mode 100644 doc/has_not_equal_to.qbk create mode 100644 doc/has_plus.qbk create mode 100644 doc/has_plus_assign.qbk create mode 100644 doc/has_post_decrement.qbk create mode 100644 doc/has_post_increment.qbk create mode 100644 doc/has_pre_decrement.qbk create mode 100644 doc/has_pre_increment.qbk create mode 100644 doc/has_right_shift.qbk create mode 100644 doc/has_right_shift_assign.qbk create mode 100644 doc/has_unary_minus.qbk create mode 100644 doc/has_unary_plus.qbk create mode 100644 doc/html/boost_typetraits/category/value_traits/operators.html create mode 100644 doc/html/boost_typetraits/reference/has_bit_and.html create mode 100644 doc/html/boost_typetraits/reference/has_bit_and_assign.html create mode 100644 doc/html/boost_typetraits/reference/has_bit_or.html create mode 100644 doc/html/boost_typetraits/reference/has_bit_or_assign.html create mode 100644 doc/html/boost_typetraits/reference/has_bit_xor.html create mode 100644 doc/html/boost_typetraits/reference/has_bit_xor_assign.html create mode 100644 doc/html/boost_typetraits/reference/has_complement.html create mode 100644 doc/html/boost_typetraits/reference/has_dereference.html create mode 100644 doc/html/boost_typetraits/reference/has_divides.html create mode 100644 doc/html/boost_typetraits/reference/has_divides_assign.html create mode 100644 doc/html/boost_typetraits/reference/has_equal_to.html create mode 100644 doc/html/boost_typetraits/reference/has_greater.html create mode 100644 doc/html/boost_typetraits/reference/has_greater_equal.html create mode 100644 doc/html/boost_typetraits/reference/has_left_shift.html create mode 100644 doc/html/boost_typetraits/reference/has_left_shift_assign.html create mode 100644 doc/html/boost_typetraits/reference/has_less.html create mode 100644 doc/html/boost_typetraits/reference/has_less_equal.html create mode 100644 doc/html/boost_typetraits/reference/has_logical_and.html create mode 100644 doc/html/boost_typetraits/reference/has_logical_not.html create mode 100644 doc/html/boost_typetraits/reference/has_logical_or.html create mode 100644 doc/html/boost_typetraits/reference/has_minus.html create mode 100644 doc/html/boost_typetraits/reference/has_minus_assign.html create mode 100644 doc/html/boost_typetraits/reference/has_modulus.html create mode 100644 doc/html/boost_typetraits/reference/has_modulus_assign.html create mode 100644 doc/html/boost_typetraits/reference/has_multiplies.html create mode 100644 doc/html/boost_typetraits/reference/has_multiplies_assign.html create mode 100644 doc/html/boost_typetraits/reference/has_negate.html create mode 100644 doc/html/boost_typetraits/reference/has_not_equal_to.html create mode 100644 doc/html/boost_typetraits/reference/has_plus.html create mode 100644 doc/html/boost_typetraits/reference/has_plus_assign.html create mode 100644 doc/html/boost_typetraits/reference/has_post_decrement.html create mode 100644 doc/html/boost_typetraits/reference/has_post_increment.html create mode 100644 doc/html/boost_typetraits/reference/has_pre_decrement.html create mode 100644 doc/html/boost_typetraits/reference/has_pre_increment.html create mode 100644 doc/html/boost_typetraits/reference/has_right_shift.html create mode 100644 doc/html/boost_typetraits/reference/has_right_shift_assign.html create mode 100644 doc/html/boost_typetraits/reference/has_unary_minus.html create mode 100644 doc/html/boost_typetraits/reference/has_unary_plus.html create mode 100644 doc/operators.qbk create mode 100644 include/boost/type_traits/detail/has_binary_operator.hpp create mode 100644 include/boost/type_traits/detail/has_postfix_operator.hpp create mode 100644 include/boost/type_traits/detail/has_prefix_operator.hpp create mode 100644 include/boost/type_traits/has_bit_and.hpp create mode 100644 include/boost/type_traits/has_bit_and_assign.hpp create mode 100644 include/boost/type_traits/has_bit_or.hpp create mode 100644 include/boost/type_traits/has_bit_or_assign.hpp create mode 100644 include/boost/type_traits/has_bit_xor.hpp create mode 100644 include/boost/type_traits/has_bit_xor_assign.hpp create mode 100644 include/boost/type_traits/has_complement.hpp create mode 100644 include/boost/type_traits/has_dereference.hpp create mode 100644 include/boost/type_traits/has_divides.hpp create mode 100644 include/boost/type_traits/has_divides_assign.hpp create mode 100644 include/boost/type_traits/has_equal_to.hpp create mode 100644 include/boost/type_traits/has_greater.hpp create mode 100644 include/boost/type_traits/has_greater_equal.hpp create mode 100644 include/boost/type_traits/has_left_shift.hpp create mode 100644 include/boost/type_traits/has_left_shift_assign.hpp create mode 100644 include/boost/type_traits/has_less.hpp create mode 100644 include/boost/type_traits/has_less_equal.hpp create mode 100644 include/boost/type_traits/has_logical_and.hpp create mode 100644 include/boost/type_traits/has_logical_not.hpp create mode 100644 include/boost/type_traits/has_logical_or.hpp create mode 100644 include/boost/type_traits/has_minus.hpp create mode 100644 include/boost/type_traits/has_minus_assign.hpp create mode 100644 include/boost/type_traits/has_modulus.hpp create mode 100644 include/boost/type_traits/has_modulus_assign.hpp create mode 100644 include/boost/type_traits/has_multiplies.hpp create mode 100644 include/boost/type_traits/has_multiplies_assign.hpp create mode 100644 include/boost/type_traits/has_negate.hpp create mode 100644 include/boost/type_traits/has_not_equal_to.hpp create mode 100644 include/boost/type_traits/has_operator.hpp create mode 100644 include/boost/type_traits/has_plus.hpp create mode 100644 include/boost/type_traits/has_plus_assign.hpp create mode 100644 include/boost/type_traits/has_post_decrement.hpp create mode 100644 include/boost/type_traits/has_post_increment.hpp create mode 100644 include/boost/type_traits/has_pre_decrement.hpp create mode 100644 include/boost/type_traits/has_pre_increment.hpp create mode 100644 include/boost/type_traits/has_right_shift.hpp create mode 100644 include/boost/type_traits/has_right_shift_assign.hpp create mode 100644 include/boost/type_traits/has_unary_minus.hpp create mode 100644 include/boost/type_traits/has_unary_plus.hpp create mode 100644 test/has_binary_classes.hpp create mode 100644 test/has_binary_classes0_test.cpp create mode 100644 test/has_binary_classes1_test.cpp create mode 100644 test/has_binary_classes2_test.cpp create mode 100644 test/has_binary_classes3_test.cpp create mode 100644 test/has_binary_classes4_test.cpp create mode 100644 test/has_binary_classes5_test.cpp create mode 100644 test/has_binary_classes6_test.cpp create mode 100644 test/has_binary_classes7_test.cpp create mode 100644 test/has_binary_classes8_test.cpp create mode 100644 test/has_binary_classes9_test.cpp create mode 100644 test/has_binary_operators.hpp create mode 100644 test/has_bit_and_assign_test.cpp create mode 100644 test/has_bit_and_test.cpp create mode 100644 test/has_bit_or_assign_test.cpp create mode 100644 test/has_bit_or_test.cpp create mode 100644 test/has_bit_xor_assign_test.cpp create mode 100644 test/has_bit_xor_test.cpp create mode 100644 test/has_complement_test.cpp create mode 100644 test/has_dereference_test.cpp create mode 100644 test/has_divides_assign_test.cpp create mode 100644 test/has_divides_test.cpp create mode 100644 test/has_equal_to_test.cpp create mode 100644 test/has_greater_equal_test.cpp create mode 100644 test/has_greater_test.cpp create mode 100644 test/has_left_shift_assign_test.cpp create mode 100644 test/has_left_shift_test.cpp create mode 100644 test/has_less_equal_test.cpp create mode 100644 test/has_less_test.cpp create mode 100644 test/has_logical_and_test.cpp create mode 100644 test/has_logical_not_test.cpp create mode 100644 test/has_logical_or_test.cpp create mode 100644 test/has_minus_assign_test.cpp create mode 100644 test/has_minus_test.cpp create mode 100644 test/has_modulus_assign_test.cpp create mode 100644 test/has_modulus_test.cpp create mode 100644 test/has_multiplies_assign_test.cpp create mode 100644 test/has_multiplies_test.cpp create mode 100644 test/has_negate_test.cpp create mode 100644 test/has_not_equal_to_test.cpp create mode 100644 test/has_plus_assign_test.cpp create mode 100644 test/has_plus_test.cpp create mode 100644 test/has_post_decrement_test.cpp create mode 100644 test/has_post_increment_test.cpp create mode 100644 test/has_postfix_classes.hpp create mode 100644 test/has_postfix_classes0_test.cpp create mode 100644 test/has_postfix_classes1_test.cpp create mode 100644 test/has_postfix_classes2_test.cpp create mode 100644 test/has_postfix_classes3_test.cpp create mode 100644 test/has_postfix_operators.hpp create mode 100644 test/has_pre_decrement_test.cpp create mode 100644 test/has_pre_increment_test.cpp create mode 100644 test/has_prefix_classes.hpp create mode 100644 test/has_prefix_classes0_test.cpp create mode 100644 test/has_prefix_classes1_test.cpp create mode 100644 test/has_prefix_classes2_test.cpp create mode 100644 test/has_prefix_classes3_test.cpp create mode 100644 test/has_prefix_operators.hpp create mode 100644 test/has_right_shift_assign_test.cpp create mode 100644 test/has_right_shift_test.cpp create mode 100644 test/has_unary_minus_test.cpp create mode 100644 test/has_unary_plus_test.cpp diff --git a/doc/has_bit_and.qbk b/doc/has_bit_and.qbk new file mode 100644 index 0000000..8aa5782 --- /dev/null +++ b/doc/has_bit_and.qbk @@ -0,0 +1,71 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_bit_and has_bit_and] + template + struct has_bit_and : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs&rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs&rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator&`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs&rhs); // is valid if has_bit_and::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_bit_and::value_type` is the type `bool`.] +[:`has_bit_and::value` is a `bool` integral constant expression.] +[:`has_bit_and::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_bit_and` inherits from `__true_type`.] + +[:`has_bit_and` inherits from `__true_type`.] +[:`has_bit_and` inherits from `__true_type`.] + +[:`has_bit_and` inherits from `__false_type`.] +[:`has_bit_and` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator&` is public or not: +if `operator&` is defined as a private member of `Lhs` then +instantiating `has_bit_and` will produce a compiler error. +For this reason `has_bit_and` cannot be used to determine whether a type has a public `operator&` or not. +`` +struct A { private: void operator&(const A&); }; +boost::has_bit_and::value; // error: A::operator&(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator&(const A&, const A&); +struct B { operator A(); }; +boost::has_bit_and::value; // this is fine +boost::has_bit_and::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_bit_and_assign.qbk b/doc/has_bit_and_assign.qbk new file mode 100644 index 0000000..59ff1e9 --- /dev/null +++ b/doc/has_bit_and_assign.qbk @@ -0,0 +1,71 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_bit_and_assign has_bit_and_assign] + template + struct has_bit_and_assign : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs&=rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs&=rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator&=`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs&=rhs); // is valid if has_bit_and_assign::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_bit_and_assign::value_type` is the type `bool`.] +[:`has_bit_and_assign::value` is a `bool` integral constant expression.] +[:`has_bit_and_assign::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_bit_and_assign` inherits from `__true_type`.] + +[:`has_bit_and_assign` inherits from `__true_type`.] + +[:`has_bit_and_assign` inherits from `__false_type`.] +[:`has_bit_and_assign` inherits from `__false_type`.] +[:`has_bit_and_assign` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator&=` is public or not: +if `operator&=` is defined as a private member of `Lhs` then +instantiating `has_bit_and_assign` will produce a compiler error. +For this reason `has_bit_and_assign` cannot be used to determine whether a type has a public `operator&=` or not. +`` +struct A { private: void operator&=(const A&); }; +boost::has_bit_and_assign::value; // error: A::operator&=(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator&=(const A&, const A&); +struct B { operator A(); }; +boost::has_bit_and_assign::value; // this is fine +boost::has_bit_and_assign::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_bit_or.qbk b/doc/has_bit_or.qbk new file mode 100644 index 0000000..d701cca --- /dev/null +++ b/doc/has_bit_or.qbk @@ -0,0 +1,71 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_bit_or has_bit_or] + template + struct has_bit_or : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs|rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs|rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator|`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs|rhs); // is valid if has_bit_or::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_bit_or::value_type` is the type `bool`.] +[:`has_bit_or::value` is a `bool` integral constant expression.] +[:`has_bit_or::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_bit_or` inherits from `__true_type`.] + +[:`has_bit_or` inherits from `__true_type`.] +[:`has_bit_or` inherits from `__true_type`.] + +[:`has_bit_or` inherits from `__false_type`.] +[:`has_bit_or` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator|` is public or not: +if `operator|` is defined as a private member of `Lhs` then +instantiating `has_bit_or` will produce a compiler error. +For this reason `has_bit_or` cannot be used to determine whether a type has a public `operator|` or not. +`` +struct A { private: void operator|(const A&); }; +boost::has_bit_or::value; // error: A::operator|(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator|(const A&, const A&); +struct B { operator A(); }; +boost::has_bit_or::value; // this is fine +boost::has_bit_or::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_bit_or_assign.qbk b/doc/has_bit_or_assign.qbk new file mode 100644 index 0000000..bde98da --- /dev/null +++ b/doc/has_bit_or_assign.qbk @@ -0,0 +1,71 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_bit_or_assign has_bit_or_assign] + template + struct has_bit_or_assign : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs|=rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs|=rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator|=`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs|=rhs); // is valid if has_bit_or_assign::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_bit_or_assign::value_type` is the type `bool`.] +[:`has_bit_or_assign::value` is a `bool` integral constant expression.] +[:`has_bit_or_assign::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_bit_or_assign` inherits from `__true_type`.] + +[:`has_bit_or_assign` inherits from `__true_type`.] + +[:`has_bit_or_assign` inherits from `__false_type`.] +[:`has_bit_or_assign` inherits from `__false_type`.] +[:`has_bit_or_assign` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator|=` is public or not: +if `operator|=` is defined as a private member of `Lhs` then +instantiating `has_bit_or_assign` will produce a compiler error. +For this reason `has_bit_or_assign` cannot be used to determine whether a type has a public `operator|=` or not. +`` +struct A { private: void operator|=(const A&); }; +boost::has_bit_or_assign::value; // error: A::operator|=(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator|=(const A&, const A&); +struct B { operator A(); }; +boost::has_bit_or_assign::value; // this is fine +boost::has_bit_or_assign::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_bit_xor.qbk b/doc/has_bit_xor.qbk new file mode 100644 index 0000000..e47af4c --- /dev/null +++ b/doc/has_bit_xor.qbk @@ -0,0 +1,71 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_bit_xor has_bit_xor] + template + struct has_bit_xor : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs^rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs^rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator^`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs^rhs); // is valid if has_bit_xor::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_bit_xor::value_type` is the type `bool`.] +[:`has_bit_xor::value` is a `bool` integral constant expression.] +[:`has_bit_xor::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_bit_xor` inherits from `__true_type`.] + +[:`has_bit_xor` inherits from `__true_type`.] +[:`has_bit_xor` inherits from `__true_type`.] + +[:`has_bit_xor` inherits from `__false_type`.] +[:`has_bit_xor` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator^` is public or not: +if `operator^` is defined as a private member of `Lhs` then +instantiating `has_bit_xor` will produce a compiler error. +For this reason `has_bit_xor` cannot be used to determine whether a type has a public `operator^` or not. +`` +struct A { private: void operator^(const A&); }; +boost::has_bit_xor::value; // error: A::operator^(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator^(const A&, const A&); +struct B { operator A(); }; +boost::has_bit_xor::value; // this is fine +boost::has_bit_xor::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_bit_xor_assign.qbk b/doc/has_bit_xor_assign.qbk new file mode 100644 index 0000000..ea4f0c9 --- /dev/null +++ b/doc/has_bit_xor_assign.qbk @@ -0,0 +1,71 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_bit_xor_assign has_bit_xor_assign] + template + struct has_bit_xor_assign : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs^=rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs^=rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator^=`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs^=rhs); // is valid if has_bit_xor_assign::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_bit_xor_assign::value_type` is the type `bool`.] +[:`has_bit_xor_assign::value` is a `bool` integral constant expression.] +[:`has_bit_xor_assign::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_bit_xor_assign` inherits from `__true_type`.] + +[:`has_bit_xor_assign` inherits from `__true_type`.] + +[:`has_bit_xor_assign` inherits from `__false_type`.] +[:`has_bit_xor_assign` inherits from `__false_type`.] +[:`has_bit_xor_assign` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator^=` is public or not: +if `operator^=` is defined as a private member of `Lhs` then +instantiating `has_bit_xor_assign` will produce a compiler error. +For this reason `has_bit_xor_assign` cannot be used to determine whether a type has a public `operator^=` or not. +`` +struct A { private: void operator^=(const A&); }; +boost::has_bit_xor_assign::value; // error: A::operator^=(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator^=(const A&, const A&); +struct B { operator A(); }; +boost::has_bit_xor_assign::value; // this is fine +boost::has_bit_xor_assign::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_complement.qbk b/doc/has_complement.qbk new file mode 100644 index 0000000..e43aec6 --- /dev/null +++ b/doc/has_complement.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_complement has_complement] + template + struct has_complement : public __tof {}; + +__inherit +If (i) `rhs` of type `Rhs` can be used in expression `~rhs`, +and (ii) `Ret=dont_care` or the result of expression `~rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of prefix `operator~`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Rhs rhs; +f(~rhs); // is valid if has_complement::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_complement::value_type` is the type `bool`.] +[:`has_complement::value` is a `bool` integral constant expression.] +[:`has_complement::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_complement` inherits from `__true_type`.] + +[:`has_complement` inherits from `__true_type`.] +[:`has_complement` inherits from `__true_type`.] +[:`has_complement` inherits from `__true_type`.] + +[:`has_complement` inherits from `__false_type`.] +[:`has_complement` inherits from `__false_type`.] +[:`has_complement` inherits from `__false_type`.] +[:`has_complement` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether prefix `operator~` is public or not: +if `operator~` is defined as a private member of `Rhs` then +instantiating `has_complement` will produce a compiler error. +For this reason `has_complement` cannot be used to determine whether a type has a public `operator~` or not. +`` +struct A { private: void operator~(); }; +boost::has_complement::value; // error: A::operator~() is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator~(const A&); +struct B { operator A(); }; +boost::has_complement::value; // this is fine +boost::has_complement::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_dereference.qbk b/doc/has_dereference.qbk new file mode 100644 index 0000000..30b20ac --- /dev/null +++ b/doc/has_dereference.qbk @@ -0,0 +1,76 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_dereference has_dereference] + template + struct has_dereference : public __tof {}; + +__inherit +If (i) `rhs` of type `Rhs` can be used in expression `*rhs`, +and (ii) `Ret=dont_care` or the result of expression `*rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of prefix `operator*`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Rhs rhs; +f(*rhs); // is valid if has_dereference::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_dereference::value_type` is the type `bool`.] +[:`has_dereference::value` is a `bool` integral constant expression.] +[:`has_dereference::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_dereference` inherits from `__true_type`.] + + +[:`has_dereference` inherits from `__true_type`.] +[:`has_dereference` inherits from `__true_type`.] +[:`has_dereference` inherits from `__true_type`.] +[:`has_dereference` inherits from `__true_type`.] +[:`has_dereference` inherits from `__true_type`.] + +[:`has_dereference` inherits from `__false_type`.] +[:`has_dereference` inherits from `__false_type`.] +[:`has_dereference` inherits from `__false_type`.] +[:`has_dereference` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether prefix `operator*` is public or not: +if `operator*` is defined as a private member of `Rhs` then +instantiating `has_dereference` will produce a compiler error. +For this reason `has_dereference` cannot be used to determine whether a type has a public `operator*` or not. +`` +struct A { private: void operator*(); }; +boost::has_dereference::value; // error: A::operator*() is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator*(const A&); +struct B { operator A(); }; +boost::has_dereference::value; // this is fine +boost::has_dereference::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_divides.qbk b/doc/has_divides.qbk new file mode 100644 index 0000000..0d723d6 --- /dev/null +++ b/doc/has_divides.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_divides has_divides] + template + struct has_divides : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs/rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs/rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator/`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs/rhs); // is valid if has_divides::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_divides::value_type` is the type `bool`.] +[:`has_divides::value` is a `bool` integral constant expression.] +[:`has_divides::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_divides` inherits from `__true_type`.] + +[:`has_divides` inherits from `__true_type`.] +[:`has_divides` inherits from `__true_type`.] +[:`has_divides` inherits from `__true_type`.] +[:`has_divides` inherits from `__true_type`.] +[:`has_divides::value` inherits from `__true_type`.] + +[:`has_divides` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator/` is public or not: +if `operator/` is defined as a private member of `Lhs` then +instantiating `has_divides` will produce a compiler error. +For this reason `has_divides` cannot be used to determine whether a type has a public `operator/` or not. +`` +struct A { private: void operator/(const A&); }; +boost::has_divides::value; // error: A::operator/(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator/(const A&, const A&); +struct B { operator A(); }; +boost::has_divides::value; // this is fine +boost::has_divides::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_divides_assign.qbk b/doc/has_divides_assign.qbk new file mode 100644 index 0000000..62ad479 --- /dev/null +++ b/doc/has_divides_assign.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_divides_assign has_divides_assign] + template + struct has_divides_assign : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs/=rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs/=rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator/=`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs/=rhs); // is valid if has_divides_assign::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_divides_assign::value_type` is the type `bool`.] +[:`has_divides_assign::value` is a `bool` integral constant expression.] +[:`has_divides_assign::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_divides_assign` inherits from `__true_type`.] + +[:`has_divides_assign` inherits from `__true_type`.] +[:`has_divides_assign` inherits from `__true_type`.] +[:`has_divides_assign` inherits from `__true_type`.] +[:`has_divides_assign` inherits from `__true_type`.] + +[:`has_divides_assign::value` inherits from `__false_type`.] +[:`has_divides_assign` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator/=` is public or not: +if `operator/=` is defined as a private member of `Lhs` then +instantiating `has_divides_assign` will produce a compiler error. +For this reason `has_divides_assign` cannot be used to determine whether a type has a public `operator/=` or not. +`` +struct A { private: void operator/=(const A&); }; +boost::has_divides_assign::value; // error: A::operator/=(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator/=(const A&, const A&); +struct B { operator A(); }; +boost::has_divides_assign::value; // this is fine +boost::has_divides_assign::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_equal_to.qbk b/doc/has_equal_to.qbk new file mode 100644 index 0000000..4b4d73e --- /dev/null +++ b/doc/has_equal_to.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_equal_to has_equal_to] + template + struct has_equal_to : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs==rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs==rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator==`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs==rhs); // is valid if has_equal_to::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_equal_to::value_type` is the type `bool`.] +[:`has_equal_to::value` is a `bool` integral constant expression.] +[:`has_equal_to::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_equal_to` inherits from `__true_type`.] + +[:`has_equal_to` inherits from `__true_type`.] +[:`has_equal_to` inherits from `__true_type`.] +[:`has_equal_to` inherits from `__true_type`.] + +[:`has_equal_to` inherits from `__false_type`.] +[:`has_equal_to` inherits from `__false_type`.] +[:`has_equal_to` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator==` is public or not: +if `operator==` is defined as a private member of `Lhs` then +instantiating `has_equal_to` will produce a compiler error. +For this reason `has_equal_to` cannot be used to determine whether a type has a public `operator==` or not. +`` +struct A { private: void operator==(const A&); }; +boost::has_equal_to::value; // error: A::operator==(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator==(const A&, const A&); +struct B { operator A(); }; +boost::has_equal_to::value; // this is fine +boost::has_equal_to::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_greater.qbk b/doc/has_greater.qbk new file mode 100644 index 0000000..d0cd93e --- /dev/null +++ b/doc/has_greater.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_greater has_greater] + template + struct has_greater : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs>rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs>rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator>`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs>rhs); // is valid if has_greater::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_greater::value_type` is the type `bool`.] +[:`has_greater::value` is a `bool` integral constant expression.] +[:`has_greater::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_greater` inherits from `__true_type`.] + +[:`has_greater` inherits from `__true_type`.] +[:`has_greater` inherits from `__true_type`.] +[:`has_greater` inherits from `__true_type`.] + +[:`has_greater` inherits from `__false_type`.] +[:`has_greater` inherits from `__false_type`.] +[:`has_greater` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator>` is public or not: +if `operator>` is defined as a private member of `Lhs` then +instantiating `has_greater` will produce a compiler error. +For this reason `has_greater` cannot be used to determine whether a type has a public `operator>` or not. +`` +struct A { private: void operator>(const A&); }; +boost::has_greater::value; // error: A::operator>(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator>(const A&, const A&); +struct B { operator A(); }; +boost::has_greater::value; // this is fine +boost::has_greater::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_greater_equal.qbk b/doc/has_greater_equal.qbk new file mode 100644 index 0000000..14c5a2a --- /dev/null +++ b/doc/has_greater_equal.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_greater_equal has_greater_equal] + template + struct has_greater_equal : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs>=rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs>=rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator>=`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs>=rhs); // is valid if has_greater_equal::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_greater_equal::value_type` is the type `bool`.] +[:`has_greater_equal::value` is a `bool` integral constant expression.] +[:`has_greater_equal::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_greater_equal` inherits from `__true_type`.] + +[:`has_greater_equal` inherits from `__true_type`.] +[:`has_greater_equal` inherits from `__true_type`.] +[:`has_greater_equal` inherits from `__true_type`.] + +[:`has_greater_equal` inherits from `__false_type`.] +[:`has_greater_equal` inherits from `__false_type`.] +[:`has_greater_equal` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator>=` is public or not: +if `operator>=` is defined as a private member of `Lhs` then +instantiating `has_greater_equal` will produce a compiler error. +For this reason `has_greater_equal` cannot be used to determine whether a type has a public `operator>=` or not. +`` +struct A { private: void operator>=(const A&); }; +boost::has_greater_equal::value; // error: A::operator>=(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator>=(const A&, const A&); +struct B { operator A(); }; +boost::has_greater_equal::value; // this is fine +boost::has_greater_equal::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_left_shift.qbk b/doc/has_left_shift.qbk new file mode 100644 index 0000000..c1af904 --- /dev/null +++ b/doc/has_left_shift.qbk @@ -0,0 +1,74 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_left_shift has_left_shift] + template + struct has_left_shift : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs<::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_left_shift::value_type` is the type `bool`.] +[:`has_left_shift::value` is a `bool` integral constant expression.] +[:`has_left_shift::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_left_shift` inherits from `__true_type`.] + +[:`has_left_shift` inherits from `__true_type`.] +[:`has_left_shift` inherits from `__true_type`.] +[:`has_left_shift` inherits from `__true_type`.] +[:`has_left_shift` inherits from `__true_type`.] +[:`has_left_shift` inherits from `__true_type`.] + +[:`has_left_shift` inherits from `__false_type`.] +[:`has_left_shift` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator<<` is public or not: +if `operator<<` is defined as a private member of `Lhs` then +instantiating `has_left_shift` will produce a compiler error. +For this reason `has_left_shift` cannot be used to determine whether a type has a public `operator<<` or not. +`` +struct A { private: void operator<<(const A&); }; +boost::has_left_shift::value; // error: A::operator<<(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator<<(const A&, const A&); +struct B { operator A(); }; +boost::has_left_shift::value; // this is fine +boost::has_left_shift::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_left_shift_assign.qbk b/doc/has_left_shift_assign.qbk new file mode 100644 index 0000000..63d0e5b --- /dev/null +++ b/doc/has_left_shift_assign.qbk @@ -0,0 +1,71 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_left_shift_assign has_left_shift_assign] + template + struct has_left_shift_assign : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs<<=rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs<<=rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator<<=`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs<<=rhs); // is valid if has_left_shift_assign::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_left_shift_assign::value_type` is the type `bool`.] +[:`has_left_shift_assign::value` is a `bool` integral constant expression.] +[:`has_left_shift_assign::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_left_shift_assign` inherits from `__true_type`.] + +[:`has_left_shift_assign` inherits from `__true_type`.] + +[:`has_left_shift_assign` inherits from `__false_type`.] +[:`has_left_shift_assign` inherits from `__false_type`.] +[:`has_left_shift_assign` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator<<=` is public or not: +if `operator<<=` is defined as a private member of `Lhs` then +instantiating `has_left_shift_assign` will produce a compiler error. +For this reason `has_left_shift_assign` cannot be used to determine whether a type has a public `operator<<=` or not. +`` +struct A { private: void operator<<=(const A&); }; +boost::has_left_shift_assign::value; // error: A::operator<<=(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator<<=(const A&, const A&); +struct B { operator A(); }; +boost::has_left_shift_assign::value; // this is fine +boost::has_left_shift_assign::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_less.qbk b/doc/has_less.qbk new file mode 100644 index 0000000..1956238 --- /dev/null +++ b/doc/has_less.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_less has_less] + template + struct has_less : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_less::value_type` is the type `bool`.] +[:`has_less::value` is a `bool` integral constant expression.] +[:`has_less::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_less` inherits from `__true_type`.] + +[:`has_less` inherits from `__true_type`.] +[:`has_less` inherits from `__true_type`.] +[:`has_less` inherits from `__true_type`.] + +[:`has_less` inherits from `__false_type`.] +[:`has_less` inherits from `__false_type`.] +[:`has_less` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator<` is public or not: +if `operator<` is defined as a private member of `Lhs` then +instantiating `has_less` will produce a compiler error. +For this reason `has_less` cannot be used to determine whether a type has a public `operator<` or not. +`` +struct A { private: void operator<(const A&); }; +boost::has_less::value; // error: A::operator<(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator<(const A&, const A&); +struct B { operator A(); }; +boost::has_less::value; // this is fine +boost::has_less::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_less_equal.qbk b/doc/has_less_equal.qbk new file mode 100644 index 0000000..dc3fd49 --- /dev/null +++ b/doc/has_less_equal.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_less_equal has_less_equal] + template + struct has_less_equal : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs<=rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs<=rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator<=`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs<=rhs); // is valid if has_less_equal::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_less_equal::value_type` is the type `bool`.] +[:`has_less_equal::value` is a `bool` integral constant expression.] +[:`has_less_equal::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_less_equal` inherits from `__true_type`.] + +[:`has_less_equal` inherits from `__true_type`.] +[:`has_less_equal` inherits from `__true_type`.] +[:`has_less_equal` inherits from `__true_type`.] + +[:`has_less_equal` inherits from `__false_type`.] +[:`has_less_equal` inherits from `__false_type`.] +[:`has_less_equal` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator<=` is public or not: +if `operator<=` is defined as a private member of `Lhs` then +instantiating `has_less_equal` will produce a compiler error. +For this reason `has_less_equal` cannot be used to determine whether a type has a public `operator<=` or not. +`` +struct A { private: void operator<=(const A&); }; +boost::has_less_equal::value; // error: A::operator<=(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator<=(const A&, const A&); +struct B { operator A(); }; +boost::has_less_equal::value; // this is fine +boost::has_less_equal::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_logical_and.qbk b/doc/has_logical_and.qbk new file mode 100644 index 0000000..c3d22ff --- /dev/null +++ b/doc/has_logical_and.qbk @@ -0,0 +1,72 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_logical_and has_logical_and] + template + struct has_logical_and : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs&&rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs&&rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator&&`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs&&rhs); // is valid if has_logical_and::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_logical_and::value_type` is the type `bool`.] +[:`has_logical_and::value` is a `bool` integral constant expression.] +[:`has_logical_and::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_logical_and` inherits from `__true_type`.] + +[:`has_logical_and` inherits from `__true_type`.] +[:`has_logical_and` inherits from `__true_type`.] +[:`has_logical_and` inherits from `__true_type`.] +[:`has_logical_and::value` inherits from `__true_type`.] + +[:`has_logical_and` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator&&` is public or not: +if `operator&&` is defined as a private member of `Lhs` then +instantiating `has_logical_and` will produce a compiler error. +For this reason `has_logical_and` cannot be used to determine whether a type has a public `operator&&` or not. +`` +struct A { private: void operator&&(const A&); }; +boost::has_logical_and::value; // error: A::operator&&(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator&&(const A&, const A&); +struct B { operator A(); }; +boost::has_logical_and::value; // this is fine +boost::has_logical_and::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_logical_not.qbk b/doc/has_logical_not.qbk new file mode 100644 index 0000000..30c41ff --- /dev/null +++ b/doc/has_logical_not.qbk @@ -0,0 +1,72 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_logical_not has_logical_not] + template + struct has_logical_not : public __tof {}; + +__inherit +If (i) `rhs` of type `Rhs` can be used in expression `!rhs`, +and (ii) `Ret=dont_care` or the result of expression `!rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of prefix `operator!`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Rhs rhs; +f(!rhs); // is valid if has_logical_not::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_logical_not::value_type` is the type `bool`.] +[:`has_logical_not::value` is a `bool` integral constant expression.] +[:`has_logical_not::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_logical_not` inherits from `__true_type`.] + +[:`has_logical_not` inherits from `__true_type`.] +[:`has_logical_not` inherits from `__true_type`.] +[:`has_logical_not` inherits from `__true_type`.] +[:`has_logical_not` inherits from `__true_type`.] +[:`has_logical_not` inherits from `__true_type`.] + +[:`has_logical_not` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether prefix `operator!` is public or not: +if `operator!` is defined as a private member of `Rhs` then +instantiating `has_logical_not` will produce a compiler error. +For this reason `has_logical_not` cannot be used to determine whether a type has a public `operator!` or not. +`` +struct A { private: void operator!(); }; +boost::has_logical_not::value; // error: A::operator!() is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator!(const A&); +struct B { operator A(); }; +boost::has_logical_not::value; // this is fine +boost::has_logical_not::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_logical_or.qbk b/doc/has_logical_or.qbk new file mode 100644 index 0000000..943dfa5 --- /dev/null +++ b/doc/has_logical_or.qbk @@ -0,0 +1,72 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_logical_or has_logical_or] + template + struct has_logical_or : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs||rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs||rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator||`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs||rhs); // is valid if has_logical_or::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_logical_or::value_type` is the type `bool`.] +[:`has_logical_or::value` is a `bool` integral constant expression.] +[:`has_logical_or::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_logical_or` inherits from `__true_type`.] + +[:`has_logical_or` inherits from `__true_type`.] +[:`has_logical_or` inherits from `__true_type`.] +[:`has_logical_or` inherits from `__true_type`.] +[:`has_logical_or::value` inherits from `__true_type`.] + +[:`has_logical_or` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator||` is public or not: +if `operator||` is defined as a private member of `Lhs` then +instantiating `has_logical_or` will produce a compiler error. +For this reason `has_logical_or` cannot be used to determine whether a type has a public `operator||` or not. +`` +struct A { private: void operator||(const A&); }; +boost::has_logical_or::value; // error: A::operator||(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator||(const A&, const A&); +struct B { operator A(); }; +boost::has_logical_or::value; // this is fine +boost::has_logical_or::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_minus.qbk b/doc/has_minus.qbk new file mode 100644 index 0000000..b97cd32 --- /dev/null +++ b/doc/has_minus.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_minus has_minus] + template + struct has_minus : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs-rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs-rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator-`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs-rhs); // is valid if has_minus::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_minus::value_type` is the type `bool`.] +[:`has_minus::value` is a `bool` integral constant expression.] +[:`has_minus::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_minus` inherits from `__true_type`.] + +[:`has_minus` inherits from `__true_type`.] +[:`has_minus` inherits from `__true_type`.] +[:`has_minus` inherits from `__true_type`.] +[:`has_minus` inherits from `__true_type`.] +[:`has_minus::value` inherits from `__true_type`.] + +[:`has_minus` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator-` is public or not: +if `operator-` is defined as a private member of `Lhs` then +instantiating `has_minus` will produce a compiler error. +For this reason `has_minus` cannot be used to determine whether a type has a public `operator-` or not. +`` +struct A { private: void operator-(const A&); }; +boost::has_minus::value; // error: A::operator-(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator-(const A&, const A&); +struct B { operator A(); }; +boost::has_minus::value; // this is fine +boost::has_minus::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_minus_assign.qbk b/doc/has_minus_assign.qbk new file mode 100644 index 0000000..90f0190 --- /dev/null +++ b/doc/has_minus_assign.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_minus_assign has_minus_assign] + template + struct has_minus_assign : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs-=rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs-=rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator-=`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs-=rhs); // is valid if has_minus_assign::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_minus_assign::value_type` is the type `bool`.] +[:`has_minus_assign::value` is a `bool` integral constant expression.] +[:`has_minus_assign::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_minus_assign` inherits from `__true_type`.] + +[:`has_minus_assign` inherits from `__true_type`.] +[:`has_minus_assign` inherits from `__true_type`.] +[:`has_minus_assign` inherits from `__true_type`.] +[:`has_minus_assign` inherits from `__true_type`.] + +[:`has_minus_assign::value` inherits from `__false_type`.] +[:`has_minus_assign` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator-=` is public or not: +if `operator-=` is defined as a private member of `Lhs` then +instantiating `has_minus_assign` will produce a compiler error. +For this reason `has_minus_assign` cannot be used to determine whether a type has a public `operator-=` or not. +`` +struct A { private: void operator-=(const A&); }; +boost::has_minus_assign::value; // error: A::operator-=(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator-=(const A&, const A&); +struct B { operator A(); }; +boost::has_minus_assign::value; // this is fine +boost::has_minus_assign::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_modulus.qbk b/doc/has_modulus.qbk new file mode 100644 index 0000000..339be1a --- /dev/null +++ b/doc/has_modulus.qbk @@ -0,0 +1,71 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_modulus has_modulus] + template + struct has_modulus : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs%rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs%rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator%`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs%rhs); // is valid if has_modulus::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_modulus::value_type` is the type `bool`.] +[:`has_modulus::value` is a `bool` integral constant expression.] +[:`has_modulus::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_modulus` inherits from `__true_type`.] + +[:`has_modulus` inherits from `__true_type`.] +[:`has_modulus` inherits from `__true_type`.] +[:`has_modulus::value` inherits from `__true_type`.] + +[:`has_modulus` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator%` is public or not: +if `operator%` is defined as a private member of `Lhs` then +instantiating `has_modulus` will produce a compiler error. +For this reason `has_modulus` cannot be used to determine whether a type has a public `operator%` or not. +`` +struct A { private: void operator%(const A&); }; +boost::has_modulus::value; // error: A::operator%(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator%(const A&, const A&); +struct B { operator A(); }; +boost::has_modulus::value; // this is fine +boost::has_modulus::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_modulus_assign.qbk b/doc/has_modulus_assign.qbk new file mode 100644 index 0000000..c0a5a29 --- /dev/null +++ b/doc/has_modulus_assign.qbk @@ -0,0 +1,71 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_modulus_assign has_modulus_assign] + template + struct has_modulus_assign : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs%=rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs%=rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator%=`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs%=rhs); // is valid if has_modulus_assign::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_modulus_assign::value_type` is the type `bool`.] +[:`has_modulus_assign::value` is a `bool` integral constant expression.] +[:`has_modulus_assign::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_modulus_assign` inherits from `__true_type`.] + +[:`has_modulus_assign` inherits from `__true_type`.] +[:`has_modulus_assign` inherits from `__true_type`.] + +[:`has_modulus_assign::value` inherits from `__false_type`.] +[:`has_modulus_assign` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator%=` is public or not: +if `operator%=` is defined as a private member of `Lhs` then +instantiating `has_modulus_assign` will produce a compiler error. +For this reason `has_modulus_assign` cannot be used to determine whether a type has a public `operator%=` or not. +`` +struct A { private: void operator%=(const A&); }; +boost::has_modulus_assign::value; // error: A::operator%=(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator%=(const A&, const A&); +struct B { operator A(); }; +boost::has_modulus_assign::value; // this is fine +boost::has_modulus_assign::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_multiplies.qbk b/doc/has_multiplies.qbk new file mode 100644 index 0000000..5f0599a --- /dev/null +++ b/doc/has_multiplies.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_multiplies has_multiplies] + template + struct has_multiplies : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs*rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs*rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator*`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs*rhs); // is valid if has_multiplies::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_multiplies::value_type` is the type `bool`.] +[:`has_multiplies::value` is a `bool` integral constant expression.] +[:`has_multiplies::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_multiplies` inherits from `__true_type`.] + +[:`has_multiplies` inherits from `__true_type`.] +[:`has_multiplies` inherits from `__true_type`.] +[:`has_multiplies` inherits from `__true_type`.] +[:`has_multiplies` inherits from `__true_type`.] +[:`has_multiplies::value` inherits from `__true_type`.] + +[:`has_multiplies` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator*` is public or not: +if `operator*` is defined as a private member of `Lhs` then +instantiating `has_multiplies` will produce a compiler error. +For this reason `has_multiplies` cannot be used to determine whether a type has a public `operator*` or not. +`` +struct A { private: void operator*(const A&); }; +boost::has_multiplies::value; // error: A::operator*(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator*(const A&, const A&); +struct B { operator A(); }; +boost::has_multiplies::value; // this is fine +boost::has_multiplies::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_multiplies_assign.qbk b/doc/has_multiplies_assign.qbk new file mode 100644 index 0000000..f64fb1e --- /dev/null +++ b/doc/has_multiplies_assign.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_multiplies_assign has_multiplies_assign] + template + struct has_multiplies_assign : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs*=rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs*=rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator*=`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs*=rhs); // is valid if has_multiplies_assign::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_multiplies_assign::value_type` is the type `bool`.] +[:`has_multiplies_assign::value` is a `bool` integral constant expression.] +[:`has_multiplies_assign::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_multiplies_assign` inherits from `__true_type`.] + +[:`has_multiplies_assign` inherits from `__true_type`.] +[:`has_multiplies_assign` inherits from `__true_type`.] +[:`has_multiplies_assign` inherits from `__true_type`.] +[:`has_multiplies_assign` inherits from `__true_type`.] + +[:`has_multiplies_assign::value` inherits from `__false_type`.] +[:`has_multiplies_assign` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator*=` is public or not: +if `operator*=` is defined as a private member of `Lhs` then +instantiating `has_multiplies_assign` will produce a compiler error. +For this reason `has_multiplies_assign` cannot be used to determine whether a type has a public `operator*=` or not. +`` +struct A { private: void operator*=(const A&); }; +boost::has_multiplies_assign::value; // error: A::operator*=(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator*=(const A&, const A&); +struct B { operator A(); }; +boost::has_multiplies_assign::value; // this is fine +boost::has_multiplies_assign::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_negate.qbk b/doc/has_negate.qbk new file mode 100644 index 0000000..9d1dc94 --- /dev/null +++ b/doc/has_negate.qbk @@ -0,0 +1,72 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_negate has_negate] + template + struct has_negate : public __tof {}; + +__inherit +If (i) `rhs` of type `Rhs` can be used in expression `-rhs`, +and (ii) `Ret=dont_care` or the result of expression `-rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of prefix `operator-`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Rhs rhs; +f(-rhs); // is valid if has_negate::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_negate::value_type` is the type `bool`.] +[:`has_negate::value` is a `bool` integral constant expression.] +[:`has_negate::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_negate` inherits from `__true_type`.] + +[:`has_negate` inherits from `__true_type`.] +[:`has_negate` inherits from `__true_type`.] +[:`has_negate` inherits from `__true_type`.] +[:`has_negate` inherits from `__true_type`.] +[:`has_negate` inherits from `__true_type`.] + +[:`has_negate` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether prefix `operator-` is public or not: +if `operator-` is defined as a private member of `Rhs` then +instantiating `has_negate` will produce a compiler error. +For this reason `has_negate` cannot be used to determine whether a type has a public `operator-` or not. +`` +struct A { private: void operator-(); }; +boost::has_negate::value; // error: A::operator-() is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator-(const A&); +struct B { operator A(); }; +boost::has_negate::value; // this is fine +boost::has_negate::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_not_equal_to.qbk b/doc/has_not_equal_to.qbk new file mode 100644 index 0000000..bdcdcea --- /dev/null +++ b/doc/has_not_equal_to.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_not_equal_to has_not_equal_to] + template + struct has_not_equal_to : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs!=rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs!=rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator!=`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs!=rhs); // is valid if has_not_equal_to::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_not_equal_to::value_type` is the type `bool`.] +[:`has_not_equal_to::value` is a `bool` integral constant expression.] +[:`has_not_equal_to::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_not_equal_to` inherits from `__true_type`.] + +[:`has_not_equal_to` inherits from `__true_type`.] +[:`has_not_equal_to` inherits from `__true_type`.] +[:`has_not_equal_to` inherits from `__true_type`.] + +[:`has_not_equal_to` inherits from `__false_type`.] +[:`has_not_equal_to` inherits from `__false_type`.] +[:`has_not_equal_to` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator!=` is public or not: +if `operator!=` is defined as a private member of `Lhs` then +instantiating `has_not_equal_to` will produce a compiler error. +For this reason `has_not_equal_to` cannot be used to determine whether a type has a public `operator!=` or not. +`` +struct A { private: void operator!=(const A&); }; +boost::has_not_equal_to::value; // error: A::operator!=(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator!=(const A&, const A&); +struct B { operator A(); }; +boost::has_not_equal_to::value; // this is fine +boost::has_not_equal_to::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_plus.qbk b/doc/has_plus.qbk new file mode 100644 index 0000000..4a48be4 --- /dev/null +++ b/doc/has_plus.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_plus has_plus] + template + struct has_plus : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs+rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs+rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator+`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs+rhs); // is valid if has_plus::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_plus::value_type` is the type `bool`.] +[:`has_plus::value` is a `bool` integral constant expression.] +[:`has_plus::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_plus` inherits from `__true_type`.] + +[:`has_plus` inherits from `__true_type`.] +[:`has_plus` inherits from `__true_type`.] +[:`has_plus` inherits from `__true_type`.] +[:`has_plus` inherits from `__true_type`.] +[:`has_plus::value` inherits from `__true_type`.] + +[:`has_plus` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator+` is public or not: +if `operator+` is defined as a private member of `Lhs` then +instantiating `has_plus` will produce a compiler error. +For this reason `has_plus` cannot be used to determine whether a type has a public `operator+` or not. +`` +struct A { private: void operator+(const A&); }; +boost::has_plus::value; // error: A::operator+(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator+(const A&, const A&); +struct B { operator A(); }; +boost::has_plus::value; // this is fine +boost::has_plus::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_plus_assign.qbk b/doc/has_plus_assign.qbk new file mode 100644 index 0000000..2e4091e --- /dev/null +++ b/doc/has_plus_assign.qbk @@ -0,0 +1,73 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_plus_assign has_plus_assign] + template + struct has_plus_assign : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs+=rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs+=rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator+=`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs+=rhs); // is valid if has_plus_assign::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_plus_assign::value_type` is the type `bool`.] +[:`has_plus_assign::value` is a `bool` integral constant expression.] +[:`has_plus_assign::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_plus_assign` inherits from `__true_type`.] + +[:`has_plus_assign` inherits from `__true_type`.] +[:`has_plus_assign` inherits from `__true_type`.] +[:`has_plus_assign` inherits from `__true_type`.] +[:`has_plus_assign` inherits from `__true_type`.] + +[:`has_plus_assign::value` inherits from `__false_type`.] +[:`has_plus_assign` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator+=` is public or not: +if `operator+=` is defined as a private member of `Lhs` then +instantiating `has_plus_assign` will produce a compiler error. +For this reason `has_plus_assign` cannot be used to determine whether a type has a public `operator+=` or not. +`` +struct A { private: void operator+=(const A&); }; +boost::has_plus_assign::value; // error: A::operator+=(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator+=(const A&, const A&); +struct B { operator A(); }; +boost::has_plus_assign::value; // this is fine +boost::has_plus_assign::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_post_decrement.qbk b/doc/has_post_decrement.qbk new file mode 100644 index 0000000..22c785e --- /dev/null +++ b/doc/has_post_decrement.qbk @@ -0,0 +1,74 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_post_decrement has_post_decrement] + template + struct has_post_decrement : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` can be used in expression `lhs--`, +and (ii) `Ret=dont_care` or the result of expression `lhs--` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of postfix `operator--`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +f(lhs--); // is valid if has_post_decrement::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_post_decrement::value_type` is the type `bool`.] +[:`has_post_decrement::value` is a `bool` integral constant expression.] +[:`has_post_decrement::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_post_decrement` inherits from `__true_type`.] + +[:`has_post_decrement` inherits from `__true_type`.] +[:`has_post_decrement` inherits from `__true_type`.] +[:`has_post_decrement` inherits from `__true_type`.] +[:`has_post_decrement` inherits from `__true_type`.] + +[:`has_post_decrement` inherits from `__false_type`.] +[:`has_post_decrement` inherits from `__false_type`.] +[:`has_post_decrement` inherits from `__false_type`.] +[:`has_post_decrement` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether postfix `operator--` is public or not: +if `operator--` is defined as a private member of `Lhs` then +instantiating `has_post_decrement` will produce a compiler error. +For this reason `has_post_decrement` cannot be used to determine whether a type has a public `operator--` or not. +`` +struct A { private: void operator--(int); }; +boost::has_post_decrement::value; // error: A::operator--(int) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator--(const A&, int); +struct B { operator A(); }; +boost::has_post_decrement::value; // this is fine +boost::has_post_decrement::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_post_increment.qbk b/doc/has_post_increment.qbk new file mode 100644 index 0000000..0d17aec --- /dev/null +++ b/doc/has_post_increment.qbk @@ -0,0 +1,74 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_post_increment has_post_increment] + template + struct has_post_increment : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` can be used in expression `lhs++`, +and (ii) `Ret=dont_care` or the result of expression `lhs++` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of postfix `operator++`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +f(lhs++); // is valid if has_post_increment::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_post_increment::value_type` is the type `bool`.] +[:`has_post_increment::value` is a `bool` integral constant expression.] +[:`has_post_increment::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_post_increment` inherits from `__true_type`.] + +[:`has_post_increment` inherits from `__true_type`.] +[:`has_post_increment` inherits from `__true_type`.] +[:`has_post_increment` inherits from `__true_type`.] +[:`has_post_increment` inherits from `__true_type`.] +[:`has_post_increment` inherits from `__true_type`.] + +[:`has_post_increment` inherits from `__false_type`.] +[:`has_post_increment` inherits from `__false_type`.] +[:`has_post_increment` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether postfix `operator++` is public or not: +if `operator++` is defined as a private member of `Lhs` then +instantiating `has_post_increment` will produce a compiler error. +For this reason `has_post_increment` cannot be used to determine whether a type has a public `operator++` or not. +`` +struct A { private: void operator++(int); }; +boost::has_post_increment::value; // error: A::operator++(int) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator++(const A&, int); +struct B { operator A(); }; +boost::has_post_increment::value; // this is fine +boost::has_post_increment::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_pre_decrement.qbk b/doc/has_pre_decrement.qbk new file mode 100644 index 0000000..8e7c4cd --- /dev/null +++ b/doc/has_pre_decrement.qbk @@ -0,0 +1,74 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_pre_decrement has_pre_decrement] + template + struct has_pre_decrement : public __tof {}; + +__inherit +If (i) `rhs` of type `Rhs` can be used in expression `--rhs`, +and (ii) `Ret=dont_care` or the result of expression `--rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of prefix `operator--`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Rhs rhs; +f(--rhs); // is valid if has_pre_decrement::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_pre_decrement::value_type` is the type `bool`.] +[:`has_pre_decrement::value` is a `bool` integral constant expression.] +[:`has_pre_decrement::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_pre_decrement` inherits from `__true_type`.] + +[:`has_pre_decrement` inherits from `__true_type`.] +[:`has_pre_decrement` inherits from `__true_type`.] +[:`has_pre_decrement` inherits from `__true_type`.] +[:`has_pre_decrement` inherits from `__true_type`.] + +[:`has_pre_decrement` inherits from `__false_type`.] +[:`has_pre_decrement` inherits from `__false_type`.] +[:`has_pre_decrement` inherits from `__false_type`.] +[:`has_pre_decrement` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether prefix `operator--` is public or not: +if `operator--` is defined as a private member of `Rhs` then +instantiating `has_pre_decrement` will produce a compiler error. +For this reason `has_pre_decrement` cannot be used to determine whether a type has a public `operator--` or not. +`` +struct A { private: void operator--(); }; +boost::has_pre_decrement::value; // error: A::operator--() is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator--(const A&); +struct B { operator A(); }; +boost::has_pre_decrement::value; // this is fine +boost::has_pre_decrement::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_pre_increment.qbk b/doc/has_pre_increment.qbk new file mode 100644 index 0000000..e3cb616 --- /dev/null +++ b/doc/has_pre_increment.qbk @@ -0,0 +1,74 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_pre_increment has_pre_increment] + template + struct has_pre_increment : public __tof {}; + +__inherit +If (i) `rhs` of type `Rhs` can be used in expression `++rhs`, +and (ii) `Ret=dont_care` or the result of expression `++rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of prefix `operator++`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Rhs rhs; +f(++rhs); // is valid if has_pre_increment::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_pre_increment::value_type` is the type `bool`.] +[:`has_pre_increment::value` is a `bool` integral constant expression.] +[:`has_pre_increment::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_pre_increment` inherits from `__true_type`.] + +[:`has_pre_increment` inherits from `__true_type`.] +[:`has_pre_increment` inherits from `__true_type`.] +[:`has_pre_increment` inherits from `__true_type`.] +[:`has_pre_increment` inherits from `__true_type`.] +[:`has_pre_increment` inherits from `__true_type`.] + +[:`has_pre_increment` inherits from `__false_type`.] +[:`has_pre_increment` inherits from `__false_type`.] +[:`has_pre_increment` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether prefix `operator++` is public or not: +if `operator++` is defined as a private member of `Rhs` then +instantiating `has_pre_increment` will produce a compiler error. +For this reason `has_pre_increment` cannot be used to determine whether a type has a public `operator++` or not. +`` +struct A { private: void operator++(); }; +boost::has_pre_increment::value; // error: A::operator++() is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator++(const A&); +struct B { operator A(); }; +boost::has_pre_increment::value; // this is fine +boost::has_pre_increment::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_right_shift.qbk b/doc/has_right_shift.qbk new file mode 100644 index 0000000..5dfa90b --- /dev/null +++ b/doc/has_right_shift.qbk @@ -0,0 +1,74 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_right_shift has_right_shift] + template + struct has_right_shift : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs>>rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs>>rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator>>`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs>>rhs); // is valid if has_right_shift::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_right_shift::value_type` is the type `bool`.] +[:`has_right_shift::value` is a `bool` integral constant expression.] +[:`has_right_shift::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_right_shift` inherits from `__true_type`.] + +[:`has_right_shift` inherits from `__true_type`.] +[:`has_right_shift` inherits from `__true_type`.] +[:`has_right_shift` inherits from `__true_type`.] +[:`has_right_shift` inherits from `__true_type`.] +[:`has_right_shift` inherits from `__true_type`.] + +[:`has_right_shift` inherits from `__false_type`.] +[:`has_right_shift` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator>>` is public or not: +if `operator>>` is defined as a private member of `Lhs` then +instantiating `has_right_shift` will produce a compiler error. +For this reason `has_right_shift` cannot be used to determine whether a type has a public `operator>>` or not. +`` +struct A { private: void operator>>(const A&); }; +boost::has_right_shift::value; // error: A::operator>>(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator>>(const A&, const A&); +struct B { operator A(); }; +boost::has_right_shift::value; // this is fine +boost::has_right_shift::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_right_shift_assign.qbk b/doc/has_right_shift_assign.qbk new file mode 100644 index 0000000..5cfeb09 --- /dev/null +++ b/doc/has_right_shift_assign.qbk @@ -0,0 +1,71 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_right_shift_assign has_right_shift_assign] + template + struct has_right_shift_assign : public __tof {}; + +__inherit +If (i) `lhs` of type `Lhs` and `rhs` of type `Rhs` can be used in expression `lhs>>=rhs`, +and (ii) `Ret=dont_care` or the result of expression `lhs>>=rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of binary `operator>>=`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Lhs lhs; +Rhs rhs; +f(lhs>>=rhs); // is valid if has_right_shift_assign::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_right_shift_assign::value_type` is the type `bool`.] +[:`has_right_shift_assign::value` is a `bool` integral constant expression.] +[:`has_right_shift_assign::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_right_shift_assign` inherits from `__true_type`.] + +[:`has_right_shift_assign` inherits from `__true_type`.] + +[:`has_right_shift_assign` inherits from `__false_type`.] +[:`has_right_shift_assign` inherits from `__false_type`.] +[:`has_right_shift_assign` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether binary `operator>>=` is public or not: +if `operator>>=` is defined as a private member of `Lhs` then +instantiating `has_right_shift_assign` will produce a compiler error. +For this reason `has_right_shift_assign` cannot be used to determine whether a type has a public `operator>>=` or not. +`` +struct A { private: void operator>>=(const A&); }; +boost::has_right_shift_assign::value; // error: A::operator>>=(const A&) is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator>>=(const A&, const A&); +struct B { operator A(); }; +boost::has_right_shift_assign::value; // this is fine +boost::has_right_shift_assign::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_unary_minus.qbk b/doc/has_unary_minus.qbk new file mode 100644 index 0000000..0e6112a --- /dev/null +++ b/doc/has_unary_minus.qbk @@ -0,0 +1,72 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_unary_minus has_unary_minus] + template + struct has_unary_minus : public __tof {}; + +__inherit +If (i) `rhs` of type `Rhs` can be used in expression `-rhs`, +and (ii) `Ret=dont_care` or the result of expression `-rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of prefix `operator-`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Rhs rhs; +f(-rhs); // is valid if has_unary_minus::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_unary_minus::value_type` is the type `bool`.] +[:`has_unary_minus::value` is a `bool` integral constant expression.] +[:`has_unary_minus::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_unary_minus` inherits from `__true_type`.] + +[:`has_unary_minus` inherits from `__true_type`.] +[:`has_unary_minus` inherits from `__true_type`.] +[:`has_unary_minus` inherits from `__true_type`.] +[:`has_unary_minus` inherits from `__true_type`.] +[:`has_unary_minus` inherits from `__true_type`.] + +[:`has_unary_minus` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether prefix `operator-` is public or not: +if `operator-` is defined as a private member of `Rhs` then +instantiating `has_unary_minus` will produce a compiler error. +For this reason `has_unary_minus` cannot be used to determine whether a type has a public `operator-` or not. +`` +struct A { private: void operator-(); }; +boost::has_unary_minus::value; // error: A::operator-() is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator-(const A&); +struct B { operator A(); }; +boost::has_unary_minus::value; // this is fine +boost::has_unary_minus::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/has_unary_plus.qbk b/doc/has_unary_plus.qbk new file mode 100644 index 0000000..1f542c9 --- /dev/null +++ b/doc/has_unary_plus.qbk @@ -0,0 +1,72 @@ +[/ + (C) Copyright 2009-2011 Frederic Bron. + 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). +] + +[section:has_unary_plus has_unary_plus] + template + struct has_unary_plus : public __tof {}; + +__inherit +If (i) `rhs` of type `Rhs` can be used in expression `+rhs`, +and (ii) `Ret=dont_care` or the result of expression `+rhs` is convertible to `Ret` +then inherits from __true_type, +otherwise inherits from __false_type. + +The default behaviour (`Ret=dont_care`) is to not check for the return value of prefix `operator+`. +If `Ret` is different from the default `dont_care` type, the return value is checked to be convertible to `Ret`. +Convertible to `Ret` means that the return value of the operator can be used as argument to a function expecting `Ret`: +`` +void f(Ret); +Rhs rhs; +f(+rhs); // is valid if has_unary_plus::value==true +`` +If `Ret=void`, the return type is checked to be exactly `void`. + +__header `#include ` or `#include ` + +__examples + +[:`has_unary_plus::value_type` is the type `bool`.] +[:`has_unary_plus::value` is a `bool` integral constant expression.] +[:`has_unary_plus::value` is a `bool` integral constant expression that evaluates to `true`.] +[:`has_unary_plus` inherits from `__true_type`.] + +[:`has_unary_plus` inherits from `__true_type`.] +[:`has_unary_plus` inherits from `__true_type`.] +[:`has_unary_plus` inherits from `__true_type`.] +[:`has_unary_plus` inherits from `__true_type`.] +[:`has_unary_plus` inherits from `__true_type`.] + +[:`has_unary_plus` inherits from `__false_type`.] + + +[*See also:] [link boost_typetraits.category.value_traits.operators Operator Type Traits] + +[*Known issues:] + +* This trait cannot detect whether prefix `operator+` is public or not: +if `operator+` is defined as a private member of `Rhs` then +instantiating `has_unary_plus` will produce a compiler error. +For this reason `has_unary_plus` cannot be used to determine whether a type has a public `operator+` or not. +`` +struct A { private: void operator+(); }; +boost::has_unary_plus::value; // error: A::operator+() is private +`` + +* There is an issue if the operator exists only for type `A` and `B` is +convertible to `A`. In this case, the compiler will report an ambiguous overload. +`` +struct A { }; +void operator+(const A&); +struct B { operator A(); }; +boost::has_unary_plus::value; // this is fine +boost::has_unary_plus::value; // error: ambiguous overload +`` + +* `volatile` qualifier is not properly handled and would lead to undefined behavior + +[endsect] + diff --git a/doc/html/boost_typetraits/background.html b/doc/html/boost_typetraits/background.html index 460e86b..2be4fa6 100644 --- a/doc/html/boost_typetraits/background.html +++ b/doc/html/boost_typetraits/background.html @@ -3,7 +3,7 @@ Background and Tutorial - + @@ -669,10 +669,11 @@
    -
    -
    -
    -

    -PrevUpHomeNext +PrevUpHomeNext

    @@ -161,10 +161,11 @@

    -

    -PrevUpHomeNext +PrevUpHomeNext
    diff --git a/doc/html/boost_typetraits/category/value_traits.html b/doc/html/boost_typetraits/category/value_traits.html index a7bf570..f4567c4 100644 --- a/doc/html/boost_typetraits/category/value_traits.html +++ b/doc/html/boost_typetraits/category/value_traits.html @@ -3,7 +3,7 @@ Type Traits that Describe the Properties of a Type - + @@ -34,6 +34,8 @@ Type Properties
    Relationships Between Two Types
    +
    Operator + Type Traits

    These traits are all value traits, which is to say the @@ -48,10 +50,11 @@

    -
    -
    -