1/*=============================================================================
2 Copyright (c) 2017 Paul Fultz II
3 decay.cpp
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6==============================================================================*/
7#include <boost/hof/decay.hpp>
8#include "test.hpp"
9
10#define CHECK_DECAY(T) \
11 STATIC_ASSERT_SAME(decltype(boost::hof::decay(std::declval<T>())), std::decay<T>::type)
12
13BOOST_HOF_TEST_CASE()
14{
15 CHECK_DECAY(int);
16 CHECK_DECAY(int*);
17 CHECK_DECAY(int&);
18 CHECK_DECAY(int&&);
19 CHECK_DECAY(const int&);
20 CHECK_DECAY(int[2]);
21 CHECK_DECAY(int(int));
22}
23
24BOOST_HOF_TEST_CASE()
25{
26 BOOST_HOF_TEST_CHECK(boost::hof::decay(3) == 3);
27 BOOST_HOF_STATIC_TEST_CHECK(boost::hof::decay(3) == 3);
28}
29

source code of boost/libs/hof/test/decay.cpp