| 1 | /*<- |
|---|---|
| 2 | Copyright (c) 2016 Barrett Adair |
| 3 | |
| 4 | Distributed under the Boost Software License, Version 1.0. |
| 5 | (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) |
| 6 | ->*/ |
| 7 | |
| 8 | #include <boost/callable_traits/detail/config.hpp> |
| 9 | #include "test.hpp" |
| 10 | |
| 11 | #include <boost/callable_traits/remove_noexcept.hpp> |
| 12 | |
| 13 | template<typename Noexcept, typename NotNoexcept> |
| 14 | void test() { |
| 15 | |
| 16 | CT_ASSERT(std::is_same<NotNoexcept, TRAIT(remove_noexcept, Noexcept)>::value); |
| 17 | } |
| 18 | |
| 19 | #define TEST_NOEXCEPT(not_noexcept) \ |
| 20 | test<not_noexcept BOOST_CLBL_TRTS_NOEXCEPT_SPECIFIER, not_noexcept>() |
| 21 | |
| 22 | int main() { |
| 23 | |
| 24 | TEST_NOEXCEPT(int(int) LREF); |
| 25 | TEST_NOEXCEPT(int(*)(int)); |
| 26 | TEST_NOEXCEPT(int(int, ...) RREF); |
| 27 | TEST_NOEXCEPT(int(*)(int, ...)); |
| 28 | |
| 29 | struct foo; |
| 30 | |
| 31 | TEST_NOEXCEPT(int(foo::*)(int)); |
| 32 | TEST_NOEXCEPT(int(foo::*)(int) const); |
| 33 | TEST_NOEXCEPT(int(foo::*)(int, ...)); |
| 34 | TEST_NOEXCEPT(int(foo::*)(int, ...) volatile); |
| 35 | } |
| 36 | |
| 37 |
