mirror of
https://github.com/boostorg/mp11.git
synced 2025-12-04 07:49:20 +01:00
More g++ 4.7 workarounds
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
#include <boost/mp11/list.hpp>
|
||||
#include <boost/mp11/integral.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
#include <type_traits>
|
||||
#include <tuple>
|
||||
|
||||
@@ -27,6 +29,16 @@ struct X10 {};
|
||||
struct X11 {};
|
||||
struct X12 {};
|
||||
|
||||
#if BOOST_WORKAROUND( BOOST_GCC, < 40800 )
|
||||
|
||||
template<class A, class B> using mp_plus = std::integral_constant<typename std::remove_const<decltype( A::value + B::value )>::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;
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user