From 6332db40abca3606a9cdfd06288923cd68b02d17 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 24 Mar 2017 21:07:23 +0200 Subject: [PATCH] Try a g++ 4.7 workaround --- test/mp_defer.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/test/mp_defer.cpp b/test/mp_defer.cpp index 492e32b..2178493 100644 --- a/test/mp_defer.cpp +++ b/test/mp_defer.cpp @@ -1,5 +1,5 @@ -// Copyright 2015 Peter Dimov. +// Copyright 2015-2017 Peter Dimov. // // Distributed under the Boost Software License, Version 1.0. // @@ -10,6 +10,8 @@ #include #include #include +#include +#include #include using boost::mp11::mp_identity; @@ -23,7 +25,15 @@ template struct has_type using type = decltype( f(0) ); +#if BOOST_WORKAROUND( BOOST_GCC, < 40800 ) + + static constexpr auto value = type::value; + +#else + static const auto value = type::value; + +#endif }; using boost::mp11::mp_defer;