From 9a69b1213c064660b13a71dcb50001ffed8b2243 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Wed, 31 May 2017 07:08:56 +0300 Subject: [PATCH] g++ 6 has problems with mp_and --- include/boost/mp11/function.hpp | 2 +- test/mp_all.cpp | 9 ++++++++- test/mp_any.cpp | 7 ++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/include/boost/mp11/function.hpp b/include/boost/mp11/function.hpp index 24054b6..7c99b4a 100644 --- a/include/boost/mp11/function.hpp +++ b/include/boost/mp11/function.hpp @@ -87,7 +87,7 @@ template using mp_and = typename detail::mp_and_impl>: #endif // mp_all -#if BOOST_WORKAROUND( BOOST_MSVC, <= 1910 ) || BOOST_WORKAROUND( BOOST_GCC, < 40800 ) +#if BOOST_WORKAROUND( BOOST_MSVC, <= 1910 ) || BOOST_WORKAROUND( BOOST_GCC, < 70000 ) template using mp_all = mp_bool< mp_count_if< mp_list, mp_to_bool >::value == sizeof...(T) >; diff --git a/test/mp_all.cpp b/test/mp_all.cpp index 6b5e2d7..9974cfb 100644 --- a/test/mp_all.cpp +++ b/test/mp_all.cpp @@ -12,9 +12,13 @@ #include #include +using boost::mp11::mp_all; + +template using check1 = mp_all, std::is_copy_constructible..., std::is_copy_assignable...>; +template using check2 = mp_all, mp_all..., mp_all...>>>; + int main() { - using boost::mp11::mp_all; using boost::mp11::mp_true; using boost::mp11::mp_false; using boost::mp11::mp_int; @@ -53,5 +57,8 @@ int main() BOOST_TEST_TRAIT_TRUE((std::is_same, mp_size_t<2>, mp_size_t<114>, mp_size_t<8>, mp_size_t<94>>, mp_true>)); BOOST_TEST_TRAIT_TRUE((std::is_same, mp_size_t<2>, mp_size_t<114>, mp_size_t<0>, mp_size_t<94>>, mp_false>)); + BOOST_TEST_TRAIT_TRUE((std::is_same, mp_true>)); + BOOST_TEST_TRAIT_TRUE((std::is_same, mp_true>)); + return boost::report_errors(); } diff --git a/test/mp_any.cpp b/test/mp_any.cpp index 9619522..53f5574 100644 --- a/test/mp_any.cpp +++ b/test/mp_any.cpp @@ -12,9 +12,12 @@ #include #include +using boost::mp11::mp_any; + +template using check = mp_any..., mp_any...>>; + int main() { - using boost::mp11::mp_any; using boost::mp11::mp_true; using boost::mp11::mp_false; using boost::mp11::mp_int; @@ -58,5 +61,7 @@ int main() BOOST_TEST_TRAIT_TRUE((std::is_same, mp_int<0>, mp_false, mp_size_t<141>>, mp_true>)); BOOST_TEST_TRAIT_TRUE((std::is_same, mp_int<0>, mp_false>, mp_false>)); + BOOST_TEST_TRAIT_TRUE((std::is_same, mp_true>)); + return boost::report_errors(); }