// Copyright 2015-2017 Peter Dimov. // // Distributed under the Boost Software License, Version 1.0. // // See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt #include #include #include #include #include #include struct X1 {}; struct X2 {}; struct X3 {}; using boost::mp11::mp_bool; template using is_even = mp_bool; int main() { using boost::mp11::mp_list; using boost::mp11::mp_copy_if; { using L1 = mp_list<>; BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); using L2 = mp_list; BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list>)); BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list>)); } { using L1 = std::tuple<>; BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); using L2 = std::tuple; BOOST_TEST_TRAIT_TRUE((std::is_same, L1>)); BOOST_TEST_TRAIT_TRUE((std::is_same, std::tuple>)); BOOST_TEST_TRAIT_TRUE((std::is_same, std::tuple>)); } using boost::mp11::mp_iota_c; using boost::mp11::mp_size_t; { int const N = 12; using L1 = mp_iota_c; using R1 = mp_copy_if; BOOST_TEST_TRAIT_TRUE((std::is_same, mp_size_t<2>, mp_size_t<4>, mp_size_t<6>, mp_size_t<8>, mp_size_t<10>>>)); } return boost::report_errors(); }