9#ifndef BOOST_CLBL_TRTS_DETAIL_UTILITY_HPP
10#define BOOST_CLBL_TRTS_DETAIL_UTILITY_HPP
16namespace boost {
namespace callable_traits {
namespace detail {
30#ifdef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
31struct abominable_functions_not_supported_on_this_compiler{};
41using bool_type = std::integral_constant<bool, Value>;
44template<std::
size_t I,
typename Tup>
45using at =
typename std::tuple_element<I, Tup>::type;
47template<
typename T,
typename Class>
50template<
typename L,
typename R,
typename ErrorType>
53template<
typename T,
typename ErrorType,
54 typename U =
typename std::remove_reference<T>::type>
58 reference_type_not_supported_by_this_metafunction>>;
60template<
typename T,
typename ErrorType,
61 typename U =
typename std::remove_reference<T>::type,
62 bool is_reference_error = std::is_same<reference_error, U>::value>
64 std::is_same<U, invalid_type>::value || is_reference_error,
65 typename std::conditional<is_reference_error,
66 reference_type_not_supported_by_this_metafunction, ErrorType>::type>;
68template<
typename T,
typename Fallback>
70 std::is_same<T, invalid_type>::value, Fallback, T>::type;
72template<
typename T,
template<
class>
class Alias,
typename U = Alias<T>>
79 typename std::remove_reference<T>::type>::type;
83 using type = std::false_type;
88 using type = std::true_type;
95template<
typename T,
typename = std::true_type>
102 using type =
decltype(std::declval<T>().get());
typename std::conditional< std::is_reference< T >::value, reference_error, invalid_type >::type error_type
typename std::tuple_element< I, Tup >::type at
sfinae_try< T, fail_when_same< U, invalid_type, ErrorType >, fail_when_same< U, reference_error, reference_type_not_supported_by_this_metafunction > > try_but_fail_if_invalid
typename std::remove_cv< typename std::remove_reference< T >::type >::type shallow_decay
T Class::* add_member_pointer
typename std::conditional< std::is_same< T, invalid_type >::value, Fallback, T >::type fallback_if_invalid
std::integral_constant< bool, Value > bool_type
typename is_reference_wrapper_t< shallow_decay< T > >::type is_reference_wrapper
typename unwrap_reference_t< T >::type unwrap_reference
typename BOOST_CLBL_TRTS_DISJUNCTION(FailIfs..., success< T >)::_::type sfinae_try
decltype(std::declval< T >().get()) type