mirror of
https://github.com/boostorg/mp11.git
synced 2025-12-04 07:49:20 +01:00
g++ 6 has problems with mp_and
This commit is contained in:
@@ -12,9 +12,13 @@
|
||||
#include <boost/core/lightweight_test_trait.hpp>
|
||||
#include <type_traits>
|
||||
|
||||
using boost::mp11::mp_all;
|
||||
|
||||
template<class V, class... T> using check1 = mp_all<std::is_same<V, void>, std::is_copy_constructible<T>..., std::is_copy_assignable<T>...>;
|
||||
template<class V, class... T> using check2 = mp_all<std::is_same<V, void>, mp_all<std::is_copy_constructible<T>..., mp_all<std::is_copy_assignable<T>...>>>;
|
||||
|
||||
int main()
|
||||
{
|
||||
using boost::mp11::mp_all;
|
||||
using boost::mp11::mp_true;
|
||||
using boost::mp11::mp_false;
|
||||
using boost::mp11::mp_int;
|
||||
@@ -53,5 +57,8 @@ int main()
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_all<mp_size_t<1>, mp_size_t<2>, mp_size_t<114>, mp_size_t<8>, mp_size_t<94>>, mp_true>));
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<mp_all<mp_size_t<1>, mp_size_t<2>, mp_size_t<114>, mp_size_t<0>, mp_size_t<94>>, mp_false>));
|
||||
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<check1<void, int, float>, mp_true>));
|
||||
BOOST_TEST_TRAIT_TRUE((std::is_same<check2<void, int, float>, mp_true>));
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user