// 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 using boost::mp11::mp_invoke; template struct X {}; template class F, class... T> using Y = X...>; template using Z = X...>; struct B {}; struct D1: B {}; struct D2: B {}; struct ND {}; template using is_base_of_t = typename std::is_base_of::type; int main() { using boost::mp11::mp_identity_t; using boost::mp11::mp_quote; { using Q = mp_quote; BOOST_TEST_TRAIT_TRUE((std::is_same, void>)); BOOST_TEST_TRAIT_TRUE((std::is_same, int[]>)); } { using Q = mp_quote; BOOST_TEST_TRAIT_TRUE((std::is_same, std::is_same>)); BOOST_TEST_TRAIT_TRUE((std::is_same, std::is_same>)); } { using Q = mp_quote; BOOST_TEST_TRAIT_TRUE((std::is_same, X>)); } { using Q = mp_quote; #if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1800 ) #else using R1 = Y; BOOST_TEST_TRAIT_TRUE((std::is_same>)); #endif #if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1910 && BOOST_MSVC >= 1900 ) #else using R2 = Z; BOOST_TEST_TRAIT_TRUE((std::is_same>)); #endif } { using Q = mp_quote; #if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1800 ) #else using R1 = Y; BOOST_TEST_TRAIT_TRUE((std::is_same>)); #endif #if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1910 && BOOST_MSVC >= 1900 ) #else using R2 = Z; BOOST_TEST_TRAIT_TRUE((std::is_same>)); #endif } return boost::report_errors(); }