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/hof/test/decay.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/boost/libs/hof/test/decay.cpp (limited to 'src/boost/libs/hof/test/decay.cpp') diff --git a/src/boost/libs/hof/test/decay.cpp b/src/boost/libs/hof/test/decay.cpp new file mode 100644 index 00000000..bcf235bf --- /dev/null +++ b/src/boost/libs/hof/test/decay.cpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2017 Paul Fultz II + decay.cpp + 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 "test.hpp" + +#define CHECK_DECAY(T) \ + STATIC_ASSERT_SAME(decltype(boost::hof::decay(std::declval())), std::decay::type) + +BOOST_HOF_TEST_CASE() +{ + CHECK_DECAY(int); + CHECK_DECAY(int*); + CHECK_DECAY(int&); + CHECK_DECAY(int&&); + CHECK_DECAY(const int&); + CHECK_DECAY(int[2]); + CHECK_DECAY(int(int)); +} + +BOOST_HOF_TEST_CASE() +{ + BOOST_HOF_TEST_CHECK(boost::hof::decay(3) == 3); + BOOST_HOF_STATIC_TEST_CHECK(boost::hof::decay(3) == 3); +} -- cgit v1.2.3