// Copyright 2023 Peter Dimov // Distributed under the Boost Software License, Version 1.0. // https://www.boost.org/LICENSE_1_0.txt #include #include #include #if !defined(BOOST_MP11_HAS_TEMPLATE_AUTO) #pragma message("Test skipped because BOOST_MP11_HAS_TEMPLATE_AUTO is not defined") int main() {} #else #include template struct V1 {}; template struct V2 {}; int main() { using boost::mp11::mp_pop_back; using L1 = V1; BOOST_TEST_TRAIT_SAME(mp_pop_back, V1<>); using L2 = V1; BOOST_TEST_TRAIT_SAME(mp_pop_back, V1); using L3 = V2<0>; BOOST_TEST_TRAIT_SAME(mp_pop_back, V2<>); using L4 = V2<0, 1, 2, 3, 4, 5, 6, 7, 8, 9>; BOOST_TEST_TRAIT_SAME(mp_pop_back, V2<0, 1, 2, 3, 4, 5, 6, 7, 8>); using boost::mp11::mp_iota_c; using boost::mp11::mp_rename_v; int const N = 137; using L6 = mp_rename_v, V1>; using L7 = mp_rename_v, V1>; BOOST_TEST_TRAIT_SAME(mp_pop_back, L7); using boost::mp11::mp_valid; using L8 = V2<>; BOOST_TEST_TRAIT_FALSE((mp_valid)); return boost::report_errors(); } #endif