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_quote.cpp | 68 +++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/boost/libs/mp11/test/mp_quote.cpp (limited to 'src/boost/libs/mp11/test/mp_quote.cpp') diff --git a/src/boost/libs/mp11/test/mp_quote.cpp b/src/boost/libs/mp11/test/mp_quote.cpp new file mode 100644 index 00000000..62bc915b --- /dev/null +++ b/src/boost/libs/mp11/test/mp_quote.cpp @@ -0,0 +1,68 @@ + +// 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; + +template struct X {}; + +template class F, class... T> using Y = X...>; + +template using Z = X...>; + +template struct P {}; + +template using first = T; + +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; + +#if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, <= 1800 ) + using R1 = Y; + BOOST_TEST_TRAIT_TRUE((std::is_same>)); +#endif + +#if !BOOST_MP11_WORKAROUND( BOOST_MP11_MSVC, < 1920 && BOOST_MP11_MSVC >= 1900 ) + using R2 = Z; + BOOST_TEST_TRAIT_TRUE((std::is_same>)); +#endif + } + + { + using Q = mp_quote

; + + BOOST_TEST_TRAIT_TRUE((std::is_same, P>)); + BOOST_TEST_TRAIT_TRUE((std::is_same, P>)); + } + + { + using Q = mp_quote; + + BOOST_TEST_TRAIT_TRUE((std::is_same, void>)); + BOOST_TEST_TRAIT_TRUE((std::is_same, char[]>)); + } + + return boost::report_errors(); +} -- cgit v1.2.3