1
0
forked from boostorg/mp11

More g++ 4.7 workarounds

This commit is contained in:
Peter Dimov
2017-03-24 21:53:57 +02:00
parent 8999977bdd
commit c21636d2ce
3 changed files with 36 additions and 3 deletions

View File

@@ -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>
@@ -21,6 +23,16 @@ struct X4 {};
template<class T1, class T2> struct F {};
#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;
@@ -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;

View File

@@ -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;
{

View File

@@ -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 @@ using boost::mp11::mp_push_front;
template<class T, class L> using rev_push_back = mp_push_back<L, T>;
template<class T, class L> using rev_push_front = mp_push_front<L, T>;
#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;
@@ -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;