From 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 20:24:20 +0200 Subject: Adding upstream version 14.2.21. Signed-off-by: Daniel Baumann --- src/boost/libs/mp11/test/mp_fold_q.cpp | 62 ++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/boost/libs/mp11/test/mp_fold_q.cpp (limited to 'src/boost/libs/mp11/test/mp_fold_q.cpp') diff --git a/src/boost/libs/mp11/test/mp_fold_q.cpp b/src/boost/libs/mp11/test/mp_fold_q.cpp new file mode 100644 index 00000000..475cf082 --- /dev/null +++ b/src/boost/libs/mp11/test/mp_fold_q.cpp @@ -0,0 +1,62 @@ + +// 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 +#include +#include +#include + +struct X1 {}; +struct X2 {}; +struct X3 {}; +struct X4 {}; + +template struct F {}; + +int main() +{ + using boost::mp11::mp_list; + using boost::mp11::mp_fold_q; + using boost::mp11::mp_quote; + + using Q = mp_quote; + + { + BOOST_TEST_TRAIT_TRUE((std::is_same, void, Q>, void>)); + BOOST_TEST_TRAIT_TRUE((std::is_same, void, Q>, F>)); + BOOST_TEST_TRAIT_TRUE((std::is_same, void, Q>, F, X2>>)); + BOOST_TEST_TRAIT_TRUE((std::is_same, void, Q>, F, X2>, X3>>)); + BOOST_TEST_TRAIT_TRUE((std::is_same, void, Q>, F, X2>, X3>, X4>>)); + } + + { + BOOST_TEST_TRAIT_TRUE((std::is_same, void, Q>, void>)); + BOOST_TEST_TRAIT_TRUE((std::is_same, void, Q>, F>)); + BOOST_TEST_TRAIT_TRUE((std::is_same, void, Q>, F, X2>>)); + BOOST_TEST_TRAIT_TRUE((std::is_same, void, Q>, F, X2>, X3>>)); + BOOST_TEST_TRAIT_TRUE((std::is_same, void, Q>, F, X2>, X3>, X4>>)); + } + + using boost::mp11::mp_push_back; + + { + BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list<>, mp_quote>, mp_list>)); + } + + using boost::mp11::mp_push_front; + + { + BOOST_TEST_TRAIT_TRUE((std::is_same, mp_list<>, mp_quote>, mp_list>)); + } + + return boost::report_errors(); +} -- cgit v1.2.3