// Copyright 2019 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 template using difference_type = typename T::difference_type; struct X { }; struct Y { using difference_type = int; }; int main() { using boost::mp11::mp_eval_or; using boost::mp11::mp_eval_or_q; using boost::mp11::mp_identity; using boost::mp11::mp_quote; BOOST_TEST_TRAIT_SAME(mp_eval_or, void); BOOST_TEST_TRAIT_SAME(mp_eval_or, mp_identity); BOOST_TEST_TRAIT_SAME(mp_eval_or, void); using Q_identity = mp_quote; BOOST_TEST_TRAIT_SAME(mp_eval_or_q, void); BOOST_TEST_TRAIT_SAME(mp_eval_or_q, mp_identity); BOOST_TEST_TRAIT_SAME(mp_eval_or_q, void); BOOST_TEST_TRAIT_SAME(mp_eval_or, std::ptrdiff_t); BOOST_TEST_TRAIT_SAME(mp_eval_or, int); using Q_diff_type = mp_quote; BOOST_TEST_TRAIT_SAME(mp_eval_or_q, std::ptrdiff_t); BOOST_TEST_TRAIT_SAME(mp_eval_or_q, int); return boost::report_errors(); }