// 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 B {}; struct D1: B {}; struct D2: B {}; struct ND {}; 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, B>::fn, L1>; BOOST_TEST_TRAIT_TRUE((std::is_same>)); } { using L2 = mp_transform_q, B>, L1>; BOOST_TEST_TRAIT_TRUE((std::is_same>)); } // return boost::report_errors(); }