]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/callable_traits/test/add_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/detail/config.hpp>
11 #ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
15 #include <boost/callable_traits/add_transaction_safe.hpp>
18 template<typename Safe
, typename NotSafe
>
21 CT_ASSERT(std::is_same
<Safe
, TRAIT(add_transaction_safe
, NotSafe
)>::value
);
24 CT_ASSERT(!std::is_same
<Safe
, NotSafe
>::value
);
27 #define TEST_TRANSACTION_SAFE(not_safe) test<not_safe transaction_safe, not_safe>()
31 TEST_TRANSACTION_SAFE(int(int) &);
32 TEST_TRANSACTION_SAFE(int(*)(int));
33 TEST_TRANSACTION_SAFE(int(int, ...) &&);
34 TEST_TRANSACTION_SAFE(int(*)(int, ...));
38 TEST_TRANSACTION_SAFE(int(foo::*)(int));
39 TEST_TRANSACTION_SAFE(int(foo::*)(int) const);
40 TEST_TRANSACTION_SAFE(int(foo::*)(int, ...));
41 TEST_TRANSACTION_SAFE(int(foo::*)(int, ...) volatile);