From 5ab8957b152f7fcd3ebdcdc1327bc1c4a5ff1786 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Mon, 30 Mar 2015 01:58:47 -0400 Subject: [PATCH 01/13] Added Boost function pull request --- changes pending.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changes pending.txt b/changes pending.txt index aa50613..7cb07fd 100644 --- a/changes pending.txt +++ b/changes pending.txt @@ -37,6 +37,10 @@ RANDOM Missing #includes: https://github.com/boostorg/random/pull/13 +FUNCTION +-------- + +Removed dependencies on ice_xxx.hpp headers: https://github.com/boostorg/function/pull/5 Unexplained new failures From 17885c80f18f3194d42fa1d779b45dbccc61c303 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Mon, 30 Mar 2015 02:32:21 -0400 Subject: [PATCH 02/13] Added pull request for boost detail --- changes pending.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/changes pending.txt b/changes pending.txt index 7cb07fd..e8cc016 100644 --- a/changes pending.txt +++ b/changes pending.txt @@ -42,6 +42,11 @@ FUNCTION Removed dependencies on ice_xxx.hpp headers: https://github.com/boostorg/function/pull/5 +DETAIL +------ + +Remove unnecessary include for deprecated ice)xxx.hpp header: https://github.com/boostorg/detail/pull/6 + Unexplained new failures ~~~~~~~~~~~~~~~~~~~~~~~~ From 65ac4ddc5ac51751b95671665e5aeb91bb3ca7e4 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Tue, 31 Mar 2015 00:35:50 -0400 Subject: [PATCH 03/13] Put out correct deprecated message. --- include/boost/type_traits/detail/bool_trait_def.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/detail/bool_trait_def.hpp b/include/boost/type_traits/detail/bool_trait_def.hpp index a64cb69..b6b0677 100644 --- a/include/boost/type_traits/detail/bool_trait_def.hpp +++ b/include/boost/type_traits/detail/bool_trait_def.hpp @@ -15,7 +15,7 @@ // This header is deprecated and no longer used by type_traits: // #if defined(__GNUC__) || defined(_MSC_VER) -# pragma message("NOTE: Use of this header (ice_and.hpp) is deprecated") +# pragma message("NOTE: Use of this header (bool_trait_def.hpp) is deprecated") #endif #include From eff5109f0c1f1636314942bcd8899177fdb93d63 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Tue, 31 Mar 2015 00:39:14 -0400 Subject: [PATCH 04/13] Put out correct deprecated message. --- include/boost/type_traits/detail/template_arity_spec.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/type_traits/detail/template_arity_spec.hpp b/include/boost/type_traits/detail/template_arity_spec.hpp index 9a728a3..36ea96d 100644 --- a/include/boost/type_traits/detail/template_arity_spec.hpp +++ b/include/boost/type_traits/detail/template_arity_spec.hpp @@ -10,7 +10,7 @@ // This header is deprecated and no longer used by type_traits: // #if defined(__GNUC__) || defined(_MSC_VER) -# pragma message("NOTE: Use of this header (ice_and.hpp) is deprecated") +# pragma message("NOTE: Use of this header (template_arity_spec.hpp) is deprecated") #endif # define BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(i, name) /**/ From 2b84e5f1253e0e8a4b4860aba84484d24a83853d Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Tue, 31 Mar 2015 03:41:01 -0400 Subject: [PATCH 05/13] Changed to lexical_cast and lambda --- changes pending.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changes pending.txt b/changes pending.txt index e8cc016..c34a8bc 100644 --- a/changes pending.txt +++ b/changes pending.txt @@ -11,10 +11,12 @@ LAMBDA Missing includes: ice.hpp see https://github.com/boostorg/lambda/pull/3 Lots of headers: https://github.com/boostorg/lambda/pull/4 +Use mpl instead of ice_ functionality: https://github.com/boostorg/lambda/pull/8 LEXICAL_CAST ~~~~~~~~~~~ missing is_float.hpp in converter_numeric.hpp https://github.com/boostorg/lexical_cast/pull/8 +Use mpl instead of ice_ functionality: https://github.com/boostorg/lexical_cast/pull/11 ANY ~~~ From 7af948ad267637df7989e850681b5f52241836ff Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 1 Apr 2015 17:57:51 -0400 Subject: [PATCH 06/13] Chanbed name of detail is_signed implementation to avoid conflicts with numeric_traits detail is_signed implementation. --- include/boost/type_traits/is_signed.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/type_traits/is_signed.hpp b/include/boost/type_traits/is_signed.hpp index 2d0afac..48facd3 100644 --- a/include/boost/type_traits/is_signed.hpp +++ b/include/boost/type_traits/is_signed.hpp @@ -64,7 +64,7 @@ struct is_signed_select_helper }; template -struct is_signed +struct is_signed_impl { typedef ::boost::detail::is_signed_select_helper< ::boost::is_integral::value || ::boost::is_enum::value> selector; typedef typename selector::template rebind binder; @@ -74,7 +74,7 @@ struct is_signed } -template struct is_signed : public integral_constant::value> {}; +template struct is_signed : public integral_constant::value> {}; #else From 587401cc05e3113617304fcf832dd6f3b54c1b73 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Wed, 1 Apr 2015 22:16:52 -0400 Subject: [PATCH 07/13] More changes noted, in iterator and function_types --- changes pending.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/changes pending.txt b/changes pending.txt index c34a8bc..882d2b9 100644 --- a/changes pending.txt +++ b/changes pending.txt @@ -4,6 +4,7 @@ ITERATOR is_lvalue_iterator.hpp needs to include mpl/bool.hpp https://github.com/boostorg/iterator/pull/11 +Removed reliance on deprecated type traits headers: https://github.com/boostorg/iterator/pull/13 LAMBDA ~~~~~~ @@ -47,7 +48,11 @@ Removed dependencies on ice_xxx.hpp headers: https://github.com/boostorg/functio DETAIL ------ -Remove unnecessary include for deprecated ice)xxx.hpp header: https://github.com/boostorg/detail/pull/6 +Remove unnecessary include for deprecated ice_xxx.hpp header: https://github.com/boostorg/detail/pull/6 + +FUNTION_TYPES + +Removed dependency on deprecated template_arity_spec.hpp: https://github.com/boostorg/function_types/pull/2 Unexplained new failures From 2fcd884d9cf956273fec8a8791b69cfcbb173579 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Thu, 2 Apr 2015 12:43:26 -0400 Subject: [PATCH 08/13] Updates for detail and variant --- changes pending.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/changes pending.txt b/changes pending.txt index 882d2b9..5284f43 100644 --- a/changes pending.txt +++ b/changes pending.txt @@ -50,10 +50,27 @@ DETAIL Remove unnecessary include for deprecated ice_xxx.hpp header: https://github.com/boostorg/detail/pull/6 -FUNTION_TYPES +FUNCTION_TYPES +-------------- Removed dependency on deprecated template_arity_spec.hpp: https://github.com/boostorg/function_types/pull/2 +RANGE +----- + +Remove dependency on type traits ice_xxx.hpp headers, which are deprecated: +https://github.com/boostorg/range/pull/27 + +DETAIL +------ + +Remove dependency on deprecated type_trait headers: https://github.com/boostorg/detail/pull/8 + +VARIANT +------- + +Removed reliance on deprecated type_traits header: https://github.com/boostorg/variant/pull/12 + Unexplained new failures ~~~~~~~~~~~~~~~~~~~~~~~~ From d6683b9759f7a62fcdb89a1d28b29568ad25ad2e Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Mon, 27 Apr 2015 03:41:29 -0400 Subject: [PATCH 09/13] Combine and put changes in alphabetical library order. --- changes pending.txt | 68 +++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 37 deletions(-) diff --git a/changes pending.txt b/changes pending.txt index 5284f43..6a6b2ec 100644 --- a/changes pending.txt +++ b/changes pending.txt @@ -1,3 +1,34 @@ +ANY +~~~ + +Missing mpl/if.hpp https://github.com/boostorg/any/pull/4 + +DETAIL +------ + +Remove unnecessary include for deprecated ice_xxx.hpp header: https://github.com/boostorg/detail/pull/6 +Remove dependency on deprecated type_trait headers: https://github.com/boostorg/detail/pull/8 + +FOREACH +~~~~~~~ + +Relies on conversion from integral_constant* to mpl::bool_* +https://github.com/boostorg/foreach/pull/3 + +FUNCTION +-------- + +Removed dependencies on ice_xxx.hpp headers: https://github.com/boostorg/function/pull/5 + +FUNCTION_TYPES +-------------- + +Removed dependency on deprecated template_arity_spec.hpp: https://github.com/boostorg/function_types/pull/2 + +GRAPH +~~~~~ + +Needs to remove ice_or usage: https://github.com/boostorg/graph/pull/30 ITERATOR ~~~~~~~~ @@ -19,58 +50,21 @@ LEXICAL_CAST missing is_float.hpp in converter_numeric.hpp https://github.com/boostorg/lexical_cast/pull/8 Use mpl instead of ice_ functionality: https://github.com/boostorg/lexical_cast/pull/11 -ANY -~~~ - -Missing mpl/if.hpp https://github.com/boostorg/any/pull/4 - -FOREACH -~~~~~~~ - -Relies on conversion from integral_constant* to mpl::bool_* -https://github.com/boostorg/foreach/pull/3 - -GRAPH -~~~~~ - -Needs to remove ice_or usage: https://github.com/boostorg/graph/pull/30 - RANDOM ~~~~~~ Missing #includes: https://github.com/boostorg/random/pull/13 -FUNCTION --------- - -Removed dependencies on ice_xxx.hpp headers: https://github.com/boostorg/function/pull/5 - -DETAIL ------- - -Remove unnecessary include for deprecated ice_xxx.hpp header: https://github.com/boostorg/detail/pull/6 - -FUNCTION_TYPES --------------- - -Removed dependency on deprecated template_arity_spec.hpp: https://github.com/boostorg/function_types/pull/2 - RANGE ----- Remove dependency on type traits ice_xxx.hpp headers, which are deprecated: https://github.com/boostorg/range/pull/27 -DETAIL ------- - -Remove dependency on deprecated type_trait headers: https://github.com/boostorg/detail/pull/8 - VARIANT ------- Removed reliance on deprecated type_traits header: https://github.com/boostorg/variant/pull/12 - Unexplained new failures ~~~~~~~~~~~~~~~~~~~~~~~~ From ba1588ebc11d28e2c08e9e269dccc67d3cd18ef1 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Mon, 27 Apr 2015 19:34:19 -0400 Subject: [PATCH 10/13] Updated pull requests for Version2 --- changes pending.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/changes pending.txt b/changes pending.txt index 6a6b2ec..9c9d4c9 100644 --- a/changes pending.txt +++ b/changes pending.txt @@ -19,6 +19,8 @@ FUNCTION -------- Removed dependencies on ice_xxx.hpp headers: https://github.com/boostorg/function/pull/5 +Use ! operator directly rather than boost::mpl::not with Boost supported compilers: +https://github.com/boostorg/function/pull/8 FUNCTION_TYPES -------------- @@ -44,11 +46,16 @@ Missing includes: ice.hpp see https://github.com/boostorg/lambda/pull/3 Lots of headers: https://github.com/boostorg/lambda/pull/4 Use mpl instead of ice_ functionality: https://github.com/boostorg/lambda/pull/8 +Changes for type_traits Version2: https://github.com/boostorg/lambda/pull/9 LEXICAL_CAST ~~~~~~~~~~~ missing is_float.hpp in converter_numeric.hpp https://github.com/boostorg/lexical_cast/pull/8 Use mpl instead of ice_ functionality: https://github.com/boostorg/lexical_cast/pull/11 +Change to use operators rather than mpl equivalents for constant boolean values, in the replacements +eliminating dependency on deprecated type_traits headers: +https://github.com/boostorg/lexical_cast/pull/15 + RANDOM ~~~~~~ @@ -60,6 +67,8 @@ RANGE Remove dependency on type traits ice_xxx.hpp headers, which are deprecated: https://github.com/boostorg/range/pull/27 +Use operator || rather than boost::mpl::or_ for constant boolean expression: +https://github.com/boostorg/range/pull/31 VARIANT ------- From b1c92f301f3ea22f9ccf6b58e5762f84094721f0 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Tue, 19 May 2015 12:28:32 -0400 Subject: [PATCH 11/13] PR request for Boost Test --- changes pending.txt | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/changes pending.txt b/changes pending.txt index 9c9d4c9..185f43e 100644 --- a/changes pending.txt +++ b/changes pending.txt @@ -1,3 +1,5 @@ +* = PR requests not yet applied to 'develop' branch + ANY ~~~ @@ -30,14 +32,14 @@ Removed dependency on deprecated template_arity_spec.hpp: https://github.com/boo GRAPH ~~~~~ -Needs to remove ice_or usage: https://github.com/boostorg/graph/pull/30 +* Needs to remove ice_or usage: https://github.com/boostorg/graph/pull/30 ITERATOR ~~~~~~~~ -is_lvalue_iterator.hpp needs to include mpl/bool.hpp +* is_lvalue_iterator.hpp needs to include mpl/bool.hpp https://github.com/boostorg/iterator/pull/11 -Removed reliance on deprecated type traits headers: https://github.com/boostorg/iterator/pull/13 +* Removed reliance on deprecated type traits headers: https://github.com/boostorg/iterator/pull/13 LAMBDA ~~~~~~ @@ -70,6 +72,12 @@ https://github.com/boostorg/range/pull/27 Use operator || rather than boost::mpl::or_ for constant boolean expression: https://github.com/boostorg/range/pull/31 +TEST +---- + +* Add needed MPL header file: +https://github.com/boostorg/test/pull/58 + VARIANT ------- From b3c24153c450d6ed878d5351cd76b5b6d99bb300 Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Tue, 19 May 2015 21:30:15 -0400 Subject: [PATCH 12/13] Test PR applied --- changes pending.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changes pending.txt b/changes pending.txt index 185f43e..3c399a5 100644 --- a/changes pending.txt +++ b/changes pending.txt @@ -75,7 +75,7 @@ https://github.com/boostorg/range/pull/31 TEST ---- -* Add needed MPL header file: +Add needed MPL header file: https://github.com/boostorg/test/pull/58 VARIANT From 34fe226814bf73541b13b0d2db119efdaf1c01cc Mon Sep 17 00:00:00 2001 From: AntonBikineev Date: Wed, 20 May 2015 10:29:22 -0500 Subject: [PATCH 13/13] Added decaying to common_type in accordance with defect LWG2141 --- include/boost/type_traits/common_type.hpp | 21 ++++++++++++++++----- test/common_type_test.cpp | 6 ++++++ 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/include/boost/type_traits/common_type.hpp b/include/boost/type_traits/common_type.hpp index 03f9bd9..194c7c4 100644 --- a/include/boost/type_traits/common_type.hpp +++ b/include/boost/type_traits/common_type.hpp @@ -42,6 +42,9 @@ #include #endif +#include +#include + //----------------------------------------------------------------------------// // // // C++03 implementation of // @@ -53,6 +56,14 @@ namespace boost { + namespace type_traits_detail { + + template + struct std_decay: boost::remove_cv< + typename boost::decay::type> {}; + + } + // prototype #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) template @@ -78,7 +89,7 @@ namespace boost { { BOOST_STATIC_ASSERT_MSG(sizeof(T) > 0, "The template arguments to common_type must be complete types"); public: - typedef T type; + typedef typename type_traits_detail::std_decay::type type; }; // 2 args @@ -93,13 +104,13 @@ namespace type_traits_detail { #if !defined(BOOST_NO_CXX11_DECLTYPE) public: - typedef decltype(declval() ? declval() : declval()) type; + typedef typename std_decay() ? declval() : declval())>::type type; #elif defined(BOOST_COMMON_TYPE_USE_TYPEOF) static typename add_rvalue_reference::type declval_T(); // workaround gcc bug; not required by std static typename add_rvalue_reference::type declval_U(); // workaround gcc bug; not required by std static typename add_rvalue_reference::type declval_b(); public: - typedef __typeof__(declval_b() ? declval_T() : declval_U()) type; + typedef typename std_decay<__typeof__(declval_b() ? declval_T() : declval_U())>::type type; #elif defined(BOOST_COMMON_TYPE_DONT_USE_TYPEOF) public: typedef typename detail_type_traits_common_type::common_type_impl< @@ -111,7 +122,7 @@ namespace type_traits_detail { static typename add_rvalue_reference::type declval_U(); // workaround gcc bug; not required by std static typename add_rvalue_reference::type declval_b(); public: - typedef BOOST_TYPEOF_TPL(declval_b() ? declval_T() : declval_U()) type; + typedef typename std_decay::type type; #endif #if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ == 3 @@ -123,7 +134,7 @@ namespace type_traits_detail { template struct common_type_2 { - typedef T type; + typedef typename type_traits_detail::std_decay::type type; }; } diff --git a/test/common_type_test.cpp b/test/common_type_test.cpp index 111cbb1..047b65f 100644 --- a/test/common_type_test.cpp +++ b/test/common_type_test.cpp @@ -211,5 +211,11 @@ TT_TEST_BEGIN(common_type) #ifndef BOOST_NO_LONG_LONG BOOST_CHECK_TYPE4(tt::common_type::type, boost::long_long_type); #endif + + //changes related to defect LWG2141 + BOOST_CHECK_TYPE(tt::common_type::type, int); + BOOST_CHECK_TYPE(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, int); + BOOST_CHECK_TYPE3(tt::common_type::type, long); } TT_TEST_END