// 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 using boost::mp11::mp_invoke_q; using boost::mp11::mp_size_t; struct Q1 { template using fn = void; }; struct Q2 { template class fn; }; struct Q3 { template using fn = mp_size_t; }; struct Q4 { template using fn = T1; }; struct Q5 { template using fn = T2; }; int main() { BOOST_TEST_TRAIT_TRUE((std::is_same, void>)); BOOST_TEST_TRAIT_TRUE((std::is_same, void>)); BOOST_TEST_TRAIT_TRUE((std::is_same, void>)); BOOST_TEST_TRAIT_TRUE((std::is_same, Q2::fn<>>)); BOOST_TEST_TRAIT_TRUE((std::is_same, Q2::fn>)); BOOST_TEST_TRAIT_TRUE((std::is_same, Q2::fn>)); BOOST_TEST_TRAIT_TRUE((std::is_same, mp_size_t<0>>)); BOOST_TEST_TRAIT_TRUE((std::is_same, mp_size_t<1>>)); BOOST_TEST_TRAIT_TRUE((std::is_same, mp_size_t<2>>)); BOOST_TEST_TRAIT_TRUE((std::is_same, int>)); BOOST_TEST_TRAIT_TRUE((std::is_same, int[]>)); BOOST_TEST_TRAIT_TRUE((std::is_same, float>)); return boost::report_errors(); }