]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/callable_traits/test/remove_transaction_safe.cpp
2 Copyright (c) 2016 Barrett Adair
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)
9 #include <boost/callable_traits/remove_transaction_safe.hpp>
11 template<typename Safe
, typename NotSafe
>
14 CT_ASSERT(std::is_same
<NotSafe
, TRAIT(remove_transaction_safe
, Safe
)>::value
);
17 #ifdef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
18 CT_ASSERT(!std::is_same
<Safe
, NotSafe
>::value
);
22 #define TEST_TRANSACTION_SAFE(not_safe) \
23 test<not_safe BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER, not_safe>()
27 TEST_TRANSACTION_SAFE(int(int) LREF
);
28 TEST_TRANSACTION_SAFE(int(*)(int));
29 TEST_TRANSACTION_SAFE(int(int, ...) RREF
);
30 TEST_TRANSACTION_SAFE(int(*)(int, ...));
34 TEST_TRANSACTION_SAFE(int(foo::*)(int));
35 TEST_TRANSACTION_SAFE(int(foo::*)(int) const);
36 TEST_TRANSACTION_SAFE(int(foo::*)(int, ...));
37 TEST_TRANSACTION_SAFE(int(foo::*)(int, ...) volatile);