File indexing completed on 2025-01-18 09:29:45
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_CLBL_TRTS_DETAIL_FUNCTION_OBJECT_HPP
0010 #define BOOST_CLBL_TRTS_DETAIL_FUNCTION_OBJECT_HPP
0011
0012 #include <boost/callable_traits/detail/pmf.hpp>
0013 #include <boost/callable_traits/detail/default_callable_traits.hpp>
0014 #include <boost/callable_traits/detail/forward_declarations.hpp>
0015 #include <boost/callable_traits/detail/utility.hpp>
0016
0017 namespace boost { namespace callable_traits { namespace detail {
0018
0019 template<typename T, typename Base>
0020 struct function_object : Base {
0021
0022 using type = T;
0023 using error_t = error_type<T>;
0024 using function_type = typename Base::function_object_signature;
0025 using arg_types = typename Base::non_invoke_arg_types;
0026 using non_invoke_arg_types = arg_types;
0027
0028 static constexpr const bool value = std::is_class<
0029 typename std::remove_reference<T>::type>::value;
0030
0031 using traits = function_object;
0032 using class_type = error_t;
0033 using invoke_type = error_t;
0034 using remove_varargs = error_t;
0035 using add_varargs = error_t;
0036 using is_noexcept = typename Base::is_noexcept;
0037 using add_noexcept = error_t;
0038 using remove_noexcept = error_t;
0039 using is_transaction_safe = typename Base::is_transaction_safe;
0040 using add_transaction_safe = error_t;
0041 using remove_transaction_safe = error_t;
0042 using clear_args = error_t;
0043
0044 template<template<class...> class Container>
0045 using expand_args = typename function<function_type>::template
0046 expand_args<Container>;
0047
0048 template<template<class...> class Container, typename... RightArgs>
0049 using expand_args_left = typename function<function_type>::template
0050 expand_args_left<Container, RightArgs...>;
0051
0052 template<template<class...> class Container, typename... LeftArgs>
0053 using expand_args_right = typename function<function_type>::template
0054 expand_args_right<Container, LeftArgs...>;
0055
0056 template<typename C, typename U = T>
0057 using apply_member_pointer =
0058 typename std::remove_reference<U>::type C::*;
0059
0060 template<typename>
0061 using apply_return = error_t;
0062
0063 template<typename...>
0064 using push_front = error_t;
0065
0066 template<typename...>
0067 using push_back = error_t;
0068
0069 template<std::size_t ElementCount>
0070 using pop_args_front = error_t;
0071
0072 template<std::size_t ElementCount>
0073 using pop_args_back = error_t;
0074
0075 template<std::size_t Index, typename... NewArgs>
0076 using insert_args = error_t;
0077
0078 template<std::size_t Index, std::size_t Count>
0079 using remove_args = error_t;
0080
0081 template<std::size_t Index, typename... NewArgs>
0082 using replace_args = error_t;
0083
0084 template<std::size_t Count>
0085 using pop_front = error_t;
0086
0087 template<std::size_t Count>
0088 using pop_back = error_t;
0089
0090 using remove_member_reference = error_t;
0091 using add_member_lvalue_reference = error_t;
0092 using add_member_rvalue_reference = error_t;
0093 using add_member_const = error_t;
0094 using add_member_volatile = error_t;
0095 using add_member_cv = error_t;
0096 using remove_member_const = error_t;
0097 using remove_member_volatile = error_t;
0098 using remove_member_cv = error_t;
0099 };
0100
0101 template<typename T, typename U, typename Base>
0102 struct function_object <T U::*, Base>
0103 : default_callable_traits<> {};
0104
0105 }}}
0106
0107 #endif