// Copyright 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 template struct L {}; template struct P {}; template using is_base_of_t = typename std::is_base_of::type; struct B1 {}; struct B2 {}; struct D: B1, B2 {}; struct NB {}; int main() { using namespace boost::mp11; BOOST_TEST_TRAIT_TRUE((std::is_same::fn, L>)); BOOST_TEST_TRAIT_TRUE((std::is_same, char[1], char[2]>::fn, L>)); BOOST_TEST_TRAIT_TRUE((std::is_same::fn, P>)); BOOST_TEST_TRAIT_TRUE((std::is_same, char[1]>::fn, P>)); // using L1 = L; { using L2 = mp_transform::fn, L1>; BOOST_TEST_TRAIT_TRUE((std::is_same>)); } { using L2 = mp_transform_q, L1>; BOOST_TEST_TRAIT_TRUE((std::is_same>)); } { using L2 = mp_transform, D>::fn, L1>; BOOST_TEST_TRAIT_TRUE((std::is_same>)); } { using L2 = mp_transform_q, D>, L1>; BOOST_TEST_TRAIT_TRUE((std::is_same>)); } // return boost::report_errors(); }