File indexing completed on 2025-01-30 09:34:24
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_CLBL_TRTS_ADD_MEMBER_LVALUE_REFERENCE_HPP
0010 #define BOOST_CLBL_TRTS_ADD_MEMBER_LVALUE_REFERENCE_HPP
0011
0012 #include <boost/callable_traits/detail/core.hpp>
0013
0014 namespace boost { namespace callable_traits {
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 #ifdef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
0025
0026 template<typename T>
0027 struct add_member_lvalue_reference_t {
0028 static_assert(std::is_same<T, detail::dummy>::value,
0029 "Reference member qualifiers are not supported by this configuration.");
0030 };
0031
0032 #else
0033
0034 template<typename T>
0035 using add_member_lvalue_reference_t =
0036
0037 #ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
0038
0039 detail::sfinae_try<
0040 typename detail::traits<T>::add_member_lvalue_reference,
0041
0042 detail::fail_when_same<typename detail::traits<T>::add_member_lvalue_reference,
0043 detail::abominable_functions_not_supported_on_this_compiler,
0044 this_compiler_doesnt_support_abominable_function_types>,
0045
0046 detail::fail_if_invalid<
0047 typename detail::traits<T>::add_member_lvalue_reference,
0048 member_qualifiers_are_illegal_for_this_type>>;
0049 #else
0050
0051 detail::try_but_fail_if_invalid<
0052 typename detail::traits<T>::add_member_lvalue_reference,
0053 member_qualifiers_are_illegal_for_this_type>;
0054
0055 #endif
0056 #endif
0057
0058 namespace detail {
0059
0060 template<typename T, typename = std::false_type>
0061 struct add_member_lvalue_reference_impl {};
0062
0063 template<typename T>
0064 struct add_member_lvalue_reference_impl <T, typename std::is_same<
0065 add_member_lvalue_reference_t<T>, detail::dummy>::type>
0066 {
0067 using type = add_member_lvalue_reference_t<T>;
0068 };
0069 }
0070
0071
0072 template<typename T>
0073 struct add_member_lvalue_reference
0074 : detail::add_member_lvalue_reference_impl<T> {};
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
0111
0112
0113 #endif
0114