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_NOEXCEPT_HPP
0011 #define BOOST_CLBL_TRTS_ADD_NOEXCEPT_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_noexcept)
0018 BOOST_CLBL_TRTS_SFINAE_MSG(add_noexcept, cannot_add_noexcept_to_this_type)
0019
0020 #ifndef BOOST_CLBL_TRTS_ENABLE_NOEXCEPT_TYPES
0021 template<typename T>
0022 struct add_noexcept_t {
0023 static_assert(std::is_same<T, detail::dummy>::value,
0024 "noexcept types not supported by this configuration.");
0025 };
0026
0027 template<typename T>
0028 struct add_noexcept {
0029 static_assert(std::is_same<T, detail::dummy>::value,
0030 "noexcept types not supported by this configuration.");
0031 };
0032
0033 #else
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043 template<typename T>
0044 using add_noexcept_t =
0045
0046 detail::try_but_fail_if_invalid<
0047 typename detail::traits<T>::add_noexcept,
0048 cannot_add_noexcept_to_this_type>;
0049
0050 namespace detail {
0051
0052 template<typename T, typename = std::false_type>
0053 struct add_noexcept_impl {};
0054
0055 template<typename T>
0056 struct add_noexcept_impl <T, typename std::is_same<
0057 add_noexcept_t<T>, detail::dummy>::type>
0058 {
0059 using type = add_noexcept_t<T>;
0060 };
0061 }
0062
0063
0064 template<typename T>
0065 struct add_noexcept : detail::add_noexcept_impl<T> {};
0066
0067
0068 #endif
0069 }}
0070
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 #endif