forked from boostorg/mp11
Remove use of Boost.Config
This commit is contained in:
@@ -12,9 +12,8 @@
|
||||
#endif
|
||||
|
||||
#include <boost/mp11/tuple.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
#include <tuple>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
@@ -33,7 +32,7 @@ struct T2
|
||||
|
||||
T2( std::unique_ptr<int> x, std::unique_ptr<int> y, std::unique_ptr<int> z ): x(std::move(x)), y(std::move(y)), z(std::move(z)) {}
|
||||
|
||||
#if BOOST_WORKAROUND( BOOST_MSVC, <= 1800 )
|
||||
#if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, <= 1800 )
|
||||
|
||||
T2( T2&& r ): x( std::move(r.x) ), y( std::move(r.y) ), z( std::move(r.z) ) {}
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
#endif
|
||||
|
||||
#include <boost/mp11/tuple.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
|
||||
// Technically std::tuple isn't constexpr enabled in C++11, but it works with libstdc++
|
||||
|
||||
#if defined( BOOST_NO_CXX11_CONSTEXPR ) || ( !defined( __GLIBCXX__ ) && __cplusplus < 201400L )
|
||||
#if defined( BOOST_MP11_NO_CONSTEXPR ) || ( !defined( __GLIBCXX__ ) && __cplusplus < 201400L )
|
||||
|
||||
int main() {}
|
||||
|
||||
|
||||
+2
-1
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <boost/mp11/function.hpp>
|
||||
#include <boost/mp11/integral.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
@@ -59,7 +60,7 @@ int main()
|
||||
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<check1<void, int, float>, mp_true>));
|
||||
|
||||
#if !BOOST_WORKAROUND( BOOST_GCC, < 40900 )
|
||||
#if !BOOST_MP11_WORKAROUND( BOOST_MP11_GCC, < 40900 )
|
||||
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<check2<void, int, float>, mp_true>));
|
||||
|
||||
|
||||
+2
-1
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <boost/mp11/function.hpp>
|
||||
#include <boost/mp11/integral.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
@@ -20,7 +21,7 @@ template<class... T> using check2 = mp_any<mp_any<std::is_nothrow_copy_construct
|
||||
template<class... T> using check3 = mp_any<mp_all<std::is_nothrow_copy_constructible<T>...>, std::is_nothrow_default_constructible<T>...>;
|
||||
|
||||
template<bool is_trivially_destructible, bool is_single_buffered, class... T> struct variant_base_impl {};
|
||||
#if BOOST_WORKAROUND( BOOST_GCC, < 40800 )
|
||||
#if BOOST_MP11_WORKAROUND( BOOST_MP11_GCC, < 40800 )
|
||||
template<class... T> using variant_base = variant_base_impl<mp_all<std::has_trivial_destructor<T>...>::value, mp_any<mp_all<std::is_nothrow_move_constructible<T>...>, std::is_nothrow_default_constructible<T>...>::value, T...>;
|
||||
#else
|
||||
template<class... T> using variant_base = variant_base_impl<mp_all<std::is_trivially_destructible<T>...>::value, mp_any<mp_all<std::is_nothrow_move_constructible<T>...>, std::is_nothrow_default_constructible<T>...>::value, T...>;
|
||||
|
||||
+3
-2
@@ -9,6 +9,7 @@
|
||||
|
||||
#include <boost/mp11/utility.hpp>
|
||||
#include <boost/mp11/integral.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
@@ -47,12 +48,12 @@ int main()
|
||||
BOOST_TEST_TRAIT_FALSE((has_type<add_pointer_impl<>>));
|
||||
BOOST_TEST_TRAIT_FALSE((has_type<add_pointer_impl<void, void>>));
|
||||
|
||||
#if !BOOST_WORKAROUND( BOOST_MSVC, <= 1800 )
|
||||
#if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, <= 1800 )
|
||||
BOOST_TEST_TRAIT_TRUE((has_type<Q_add_pointer_impl<void>>));
|
||||
#endif
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<Q_add_pointer_impl<void>::type, void*>));
|
||||
|
||||
#if !BOOST_WORKAROUND( BOOST_MSVC, <= 1800 )
|
||||
#if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, <= 1800 )
|
||||
BOOST_TEST_TRAIT_TRUE((has_type<Q_add_pointer_impl<int>>));
|
||||
#endif
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<Q_add_pointer_impl<int>::type, int*>));
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#include <boost/mp11/list.hpp>
|
||||
#include <boost/mp11/integral.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
#include <type_traits>
|
||||
#include <tuple>
|
||||
|
||||
|
||||
@@ -9,12 +9,11 @@
|
||||
|
||||
#include <boost/mp11/algorithm.hpp>
|
||||
#include <boost/mp11/list.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
#include <tuple>
|
||||
|
||||
#if !defined( BOOST_NO_CXX14_CONSTEXPR )
|
||||
#if defined( BOOST_MP11_HAS_CXX14_CONSTEXPR )
|
||||
# define CONSTEXPR14 constexpr
|
||||
#else
|
||||
# define CONSTEXPR14
|
||||
@@ -46,7 +45,7 @@ int main()
|
||||
|
||||
BOOST_TEST_EQ( (mp_for_each<std::pair<int, short>>( F{0} ).s), 12 );
|
||||
|
||||
#if defined( BOOST_NO_CXX11_CONSTEXPR ) || ( !defined( __GLIBCXX__ ) && __cplusplus < 201400L )
|
||||
#if defined( BOOST_MP11_NO_CONSTEXPR ) || ( !defined( __GLIBCXX__ ) && __cplusplus < 201400L )
|
||||
#else
|
||||
|
||||
static_assert( mp_for_each<mp_list<>>( 11 ) == 11, "mp_for_each<mp_list<>>( 11 ) == 11" );
|
||||
@@ -54,7 +53,7 @@ int main()
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined( BOOST_NO_CXX14_CONSTEXPR ) && !BOOST_WORKAROUND( BOOST_MSVC, < 1920 )
|
||||
#if defined( BOOST_MP11_HAS_CXX14_CONSTEXPR )
|
||||
|
||||
constexpr auto r1 = mp_for_each<mp_list<int, short, char>>( F{0} );
|
||||
static_assert( r1.s == 123, "r1.s == 123" );
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
|
||||
#include <boost/mp11/utility.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
@@ -33,8 +34,7 @@ int main()
|
||||
|
||||
using Qt = mp_quote_trait<mp_identity>;
|
||||
|
||||
#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1800 )
|
||||
#else
|
||||
#if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, <= 1800 )
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<mp_invoke, Qt>));
|
||||
#endif
|
||||
BOOST_TEST_TRAIT_TRUE((mp_valid<mp_invoke, Qt, void>));
|
||||
|
||||
+3
-4
@@ -8,6 +8,7 @@
|
||||
|
||||
|
||||
#include <boost/mp11/utility.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
@@ -38,14 +39,12 @@ int main()
|
||||
{
|
||||
using Q = mp_quote<mp_identity_t>;
|
||||
|
||||
#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1800 )
|
||||
#else
|
||||
#if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, <= 1800 )
|
||||
using R1 = Y<Q::fn, void, char, int>;
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<R1, X<void, char, int>>));
|
||||
#endif
|
||||
|
||||
#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1920 && BOOST_MSVC >= 1900 )
|
||||
#else
|
||||
#if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1920 && BOOST_MP11_MSVC >= 1900 )
|
||||
using R2 = Z<Q, void, char, int>;
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<R2, X<void, char, int>>));
|
||||
#endif
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
|
||||
#include <boost/mp11/utility.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
@@ -43,7 +44,7 @@ int main()
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<Q::fn<void>, void const>));
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<Q::fn<int[]>, int const[]>));
|
||||
|
||||
#if !BOOST_WORKAROUND( BOOST_GCC, < 40900 )
|
||||
#if !BOOST_MP11_WORKAROUND( BOOST_MP11_GCC, < 40900 )
|
||||
|
||||
// g++ 4.7, 4.8 have difficulties with preserving top-level const
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#include <boost/mp11/list.hpp>
|
||||
#include <boost/mp11/integral.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
#include <type_traits>
|
||||
#include <tuple>
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
#include <boost/mp11/list.hpp>
|
||||
#include <boost/mp11/integral.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
#include <type_traits>
|
||||
#include <tuple>
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <boost/mp11/algorithm.hpp>
|
||||
#include <boost/mp11/utility.hpp>
|
||||
#include <boost/mp11/list.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
using boost::mp11::mp_transform;
|
||||
@@ -29,7 +30,7 @@ int main()
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<transform, void, void, void, void>));
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<transform, void, void, void, void, void>));
|
||||
|
||||
#if !BOOST_WORKAROUND( BOOST_MSVC, <= 1800 )
|
||||
#if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, <= 1800 )
|
||||
BOOST_TEST_TRAIT_TRUE((mp_valid<transform, mp_list<>>));
|
||||
#endif
|
||||
|
||||
|
||||
+5
-4
@@ -8,6 +8,7 @@
|
||||
|
||||
|
||||
#include <boost/mp11/utility.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
|
||||
template<class T> struct Xi
|
||||
@@ -52,7 +53,7 @@ int main()
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<add_pointer>));
|
||||
BOOST_TEST_TRAIT_TRUE((mp_valid<add_pointer, void>));
|
||||
BOOST_TEST_TRAIT_TRUE((mp_valid<add_pointer, int>));
|
||||
#if !defined( BOOST_MSVC ) || !BOOST_WORKAROUND( BOOST_MSVC, <= 1800 )
|
||||
#if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, <= 1800 )
|
||||
// msvc-12.0 can form pointer to reference
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<add_pointer, int&>));
|
||||
#endif
|
||||
@@ -63,10 +64,10 @@ int main()
|
||||
BOOST_TEST_TRAIT_TRUE((mp_valid<Q_add_pointer::fn, int>));
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<Q_add_pointer::fn, void, void>));
|
||||
|
||||
#if !defined( BOOST_GCC ) || !BOOST_WORKAROUND( BOOST_GCC, < 70000 )
|
||||
#if !BOOST_MP11_WORKAROUND( BOOST_MP11_GCC, < 70000 )
|
||||
// g++ up to at least 6.3 doesn't like add_reference for some reason or other
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<add_reference>));
|
||||
#if !defined( BOOST_MSVC ) || !BOOST_WORKAROUND( BOOST_MSVC, <= 1800 )
|
||||
#if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, <= 1800 )
|
||||
// msvc-12.0 gives an internal error here
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<add_reference, void>));
|
||||
#endif
|
||||
@@ -76,7 +77,7 @@ int main()
|
||||
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<add_extents>));
|
||||
BOOST_TEST_TRAIT_TRUE((mp_valid<add_extents, int>));
|
||||
#if !defined( BOOST_MSVC ) || !BOOST_WORKAROUND( BOOST_MSVC, <= 1800 )
|
||||
#if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, <= 1800 )
|
||||
// msvc-12.0 can form arrays to void or int&
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<add_extents, void>));
|
||||
BOOST_TEST_TRAIT_FALSE((mp_valid<add_extents, int&>));
|
||||
|
||||
@@ -8,9 +8,8 @@
|
||||
|
||||
|
||||
#include <boost/mp11/algorithm.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
#include <tuple>
|
||||
|
||||
using boost::mp11::mp_size_t;
|
||||
@@ -49,7 +48,7 @@ struct G
|
||||
|
||||
int main()
|
||||
{
|
||||
#if BOOST_WORKAROUND( BOOST_MSVC, < 1900 )
|
||||
#if BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1900 )
|
||||
|
||||
G()( mp_size_t<1>{} );
|
||||
G()( mp_size_t<2>{} );
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
// See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
|
||||
#if defined( BOOST_NO_CXX14_CONSTEXPR )
|
||||
#if !defined( BOOST_MP11_HAS_CXX14_CONSTEXPR )
|
||||
|
||||
int main() {}
|
||||
|
||||
@@ -16,8 +16,6 @@ int main() {}
|
||||
|
||||
#include <boost/mp11/algorithm.hpp>
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/config/workaround.hpp>
|
||||
|
||||
using boost::mp11::mp_size_t;
|
||||
using boost::mp11::mp_with_index;
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
#endif
|
||||
|
||||
#include <boost/mp11/tuple.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
|
||||
// Technically std::tuple isn't constexpr enabled in C++11, but it works with libstdc++
|
||||
|
||||
#if defined( BOOST_NO_CXX11_CONSTEXPR ) || ( !defined( __GLIBCXX__ ) && __cplusplus < 201400L )
|
||||
#if defined( BOOST_MP11_NO_CONSTEXPR ) || ( !defined( __GLIBCXX__ ) && __cplusplus < 201400L )
|
||||
|
||||
int main() {}
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
#endif
|
||||
|
||||
#include <boost/mp11/tuple.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/mp11/detail/config.hpp>
|
||||
|
||||
// Technically std::tuple isn't constexpr enabled in C++11, but it works with libstdc++
|
||||
|
||||
#if defined( BOOST_NO_CXX11_CONSTEXPR ) || ( !defined( __GLIBCXX__ ) && __cplusplus < 201400L )
|
||||
#if defined( BOOST_MP11_NO_CONSTEXPR ) || ( !defined( __GLIBCXX__ ) && __cplusplus < 201400L )
|
||||
|
||||
int main() {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user