File indexing completed on 2025-01-18 09:29:45
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef BOOST_CLBL_TRTS_ADD_TRANSACTION_SAFE_HPP
0011 #define BOOST_CLBL_TRTS_ADD_TRANSACTION_SAFE_HPP
0012
0013 #include <boost/callable_traits/detail/core.hpp>
0014
0015 namespace boost { namespace callable_traits {
0016
0017 BOOST_CLBL_TRTS_DEFINE_SFINAE_ERROR_ORIGIN(add_transaction_safe)
0018 BOOST_CLBL_TRTS_SFINAE_MSG(add_transaction_safe, cannot_add_transaction_safe_to_this_type)
0019
0020 #ifndef BOOST_CLBL_TRTS_ENABLE_TRANSACTION_SAFE
0021 template<typename T>
0022 struct add_transaction_safe_t {
0023 static_assert(std::is_same<T, detail::dummy>::value,
0024 "transaction_safe not supported by this configuration.");
0025 };
0026
0027 template<typename T>
0028 struct add_transaction_safe {
0029 static_assert(std::is_same<T, detail::dummy>::value,
0030 "transaction_safe not supported by this configuration.");
0031 };
0032
0033 #else
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044 template<typename T>
0045 using add_transaction_safe_t =
0046
0047 detail::try_but_fail_if_invalid<
0048 typename detail::traits<T>::add_transaction_safe,
0049 cannot_add_transaction_safe_to_this_type>;
0050
0051 namespace detail {
0052
0053 template<typename T, typename = std::false_type>
0054 struct add_transaction_safe_impl {};
0055
0056 template<typename T>
0057 struct add_transaction_safe_impl <T, typename std::is_same<
0058 add_transaction_safe_t<T>, detail::dummy>::type>
0059 {
0060 using type = add_transaction_safe_t<T>;
0061 };
0062 }
0063
0064
0065 template<typename T>
0066 struct add_transaction_safe
0067 : detail::add_transaction_safe_impl<T> {};
0068
0069
0070 #endif
0071 }}
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105
0106
0107
0108
0109
0110 #endif