From c21636d2ce4b73a4d1e8001c2edec1b994e2e78d Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 24 Mar 2017 21:53:57 +0200 Subject: [PATCH] More g++ 4.7 workarounds --- test/mp_fold.cpp | 13 ++++++++++++- test/mp_reverse.cpp | 13 ++++++++++++- test/mp_reverse_fold.cpp | 13 ++++++++++++- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/test/mp_fold.cpp b/test/mp_fold.cpp index 96dd7ba..de4ec9a 100644 --- a/test/mp_fold.cpp +++ b/test/mp_fold.cpp @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include @@ -21,6 +23,16 @@ struct X4 {}; template struct F {}; +#if BOOST_WORKAROUND( BOOST_GCC, < 40800 ) + +template using mp_plus = std::integral_constant::type, A::value + B::value>; + +#else + +using boost::mp11::mp_plus; + +#endif + int main() { using boost::mp11::mp_list; @@ -57,7 +69,6 @@ int main() using boost::mp11::mp_iota_c; using boost::mp11::mp_reverse; using boost::mp11::mp_size_t; - using boost::mp11::mp_plus; { int const N = 37; diff --git a/test/mp_reverse.cpp b/test/mp_reverse.cpp index e1aebf5..0035808 100644 --- a/test/mp_reverse.cpp +++ b/test/mp_reverse.cpp @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include @@ -27,6 +29,16 @@ struct X10 {}; struct X11 {}; struct X12 {}; +#if BOOST_WORKAROUND( BOOST_GCC, < 40800 ) + +template using mp_plus = std::integral_constant::type, A::value + B::value>; + +#else + +using boost::mp11::mp_plus; + +#endif + int main() { using boost::mp11::mp_list; @@ -71,7 +83,6 @@ int main() using boost::mp11::mp_iota_c; using boost::mp11::mp_size_t; using boost::mp11::mp_transform; - using boost::mp11::mp_plus; using boost::mp11::mp_fill; { diff --git a/test/mp_reverse_fold.cpp b/test/mp_reverse_fold.cpp index 0556bee..820f64b 100644 --- a/test/mp_reverse_fold.cpp +++ b/test/mp_reverse_fold.cpp @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include @@ -27,6 +29,16 @@ using boost::mp11::mp_push_front; template using rev_push_back = mp_push_back; template using rev_push_front = mp_push_front; +#if BOOST_WORKAROUND( BOOST_GCC, < 40800 ) + +template using mp_plus = std::integral_constant::type, A::value + B::value>; + +#else + +using boost::mp11::mp_plus; + +#endif + int main() { using boost::mp11::mp_list; @@ -59,7 +71,6 @@ int main() using boost::mp11::mp_iota_c; using boost::mp11::mp_reverse; using boost::mp11::mp_size_t; - using boost::mp11::mp_plus; { int const N = 37;