]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/callable_traits/test/is_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)
8 #include <boost/callable_traits/is_transaction_safe.hpp>
11 template<typename Safe
, typename NotSafe
>
14 CT_ASSERT( is_transaction_safe
<Safe
>::value
15 // for when tx safe is disabled
16 || std::is_same
<Safe
, NotSafe
>::value
);
17 CT_ASSERT(! is_transaction_safe
<NotSafe
>::value
);
20 #define TEST_TRANSACTION_SAFE(not_safe) \
21 test<not_safe BOOST_CLBL_TRTS_TRANSACTION_SAFE_SPECIFIER, not_safe>()
25 TEST_TRANSACTION_SAFE(int(*)());
27 #ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
28 TEST_TRANSACTION_SAFE(int(...) volatile LREF
);
29 TEST_TRANSACTION_SAFE(int() const);
32 TEST_TRANSACTION_SAFE(int(*)(...));
36 TEST_TRANSACTION_SAFE(int(foo::*)());
37 TEST_TRANSACTION_SAFE(int(foo::*)() const volatile);
38 TEST_TRANSACTION_SAFE(int(foo::*)(...));
39 TEST_TRANSACTION_SAFE(int(foo::*)(...) const volatile RREF
);