File indexing completed on 2025-01-30 09:34:24
0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef BOOST_CLBL_TRTS_DETAIL_FUNCTION_HPP
0010 #define BOOST_CLBL_TRTS_DETAIL_FUNCTION_HPP
0011
0012 #include <boost/callable_traits/detail/config.hpp>
0013 #include <boost/callable_traits/detail/qualifier_flags.hpp>
0014 #include <boost/callable_traits/detail/forward_declarations.hpp>
0015 #include <boost/callable_traits/detail/set_function_qualifiers.hpp>
0016 #include <boost/callable_traits/detail/default_callable_traits.hpp>
0017
0018 namespace boost { namespace callable_traits { namespace detail {
0019
0020 template<typename T>
0021 struct function : default_callable_traits<T> {};
0022
0023 #undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0024 #define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0025 #include <boost/callable_traits/detail/unguarded/function.hpp>
0026 #undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0027
0028 #ifndef BOOST_CLBL_TRTS_DISABLE_ABOMINABLE_FUNCTIONS
0029
0030 #define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const
0031 #include <boost/callable_traits/detail/unguarded/function.hpp>
0032 #undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0033
0034 #define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS volatile
0035 #include <boost/callable_traits/detail/unguarded/function.hpp>
0036 #undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0037
0038 #define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const volatile
0039 #include <boost/callable_traits/detail/unguarded/function.hpp>
0040 #undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0041
0042 #ifndef BOOST_CLBL_TRTS_DISABLE_REFERENCE_QUALIFIERS
0043
0044 #define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS &
0045 #include <boost/callable_traits/detail/unguarded/function.hpp>
0046 #undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0047
0048 #define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS &&
0049 #include <boost/callable_traits/detail/unguarded/function.hpp>
0050 #undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0051
0052 #define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const &
0053 #include <boost/callable_traits/detail/unguarded/function.hpp>
0054 #undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0055
0056 #define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const &&
0057 #include <boost/callable_traits/detail/unguarded/function.hpp>
0058 #undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0059
0060 #define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS volatile &
0061 #include <boost/callable_traits/detail/unguarded/function.hpp>
0062 #undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0063
0064 #define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS volatile &&
0065 #include <boost/callable_traits/detail/unguarded/function.hpp>
0066 #undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0067
0068 #define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const volatile &
0069 #include <boost/callable_traits/detail/unguarded/function.hpp>
0070 #undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0071
0072 #define BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS const volatile &&
0073 #include <boost/callable_traits/detail/unguarded/function.hpp>
0074 #undef BOOST_CLBL_TRTS_INCLUDE_QUALIFIERS
0075
0076 #endif
0077 #endif
0078
0079
0080
0081 #define BOOST_CLBL_TRTS_CC_TAG dummy
0082 #define BOOST_CLBL_TRTS_VARARGS_CC BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
0083 #define BOOST_CLBL_TRTS_CC
0084 #define BOOST_CLBL_TRTS_ST
0085 #include <boost/callable_traits/detail/unguarded/function_ptr.hpp>
0086 #include <boost/callable_traits/detail/unguarded/function_ptr_varargs.hpp>
0087 #undef BOOST_CLBL_TRTS_ST
0088 #undef BOOST_CLBL_TRTS_CC
0089 #undef BOOST_CLBL_TRTS_CC_TAG
0090 #undef BOOST_CLBL_TRTS_VARARGS_CC
0091
0092
0093
0094
0095
0096
0097
0098
0099
0100
0101
0102
0103
0104
0105 #ifdef BOOST_CLBL_TRTS_ENABLE_STDCALL
0106 #define BOOST_CLBL_TRTS_CC_TAG stdcall_tag
0107 #define BOOST_CLBL_TRTS_VARARGS_CC BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
0108 #define BOOST_CLBL_TRTS_CC __stdcall
0109 #define BOOST_CLBL_TRTS_ST
0110 #include <boost/callable_traits/detail/unguarded/function_ptr.hpp>
0111 #undef BOOST_CLBL_TRTS_ST
0112 #undef BOOST_CLBL_TRTS_CC
0113 #undef BOOST_CLBL_TRTS_CC_TAG
0114 #undef BOOST_CLBL_TRTS_VARARGS_CC
0115 #endif
0116
0117 #ifdef BOOST_CLBL_TRTS_ENABLE_FASTCALL
0118 #define BOOST_CLBL_TRTS_CC_TAG fastcall_tag
0119 #define BOOST_CLBL_TRTS_VARARGS_CC BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
0120 #define BOOST_CLBL_TRTS_CC __fastcall
0121 #define BOOST_CLBL_TRTS_ST
0122 #include <boost/callable_traits/detail/unguarded/function_ptr.hpp>
0123 #undef BOOST_CLBL_TRTS_CC
0124 #undef BOOST_CLBL_TRTS_ST
0125 #undef BOOST_CLBL_TRTS_CC_TAG
0126 #undef BOOST_CLBL_TRTS_VARARGS_CC
0127 #endif
0128
0129 #ifdef BOOST_CLBL_TRTS_ENABLE_PASCAL
0130 #define BOOST_CLBL_TRTS_CC_TAG pascal_tag
0131 #define BOOST_CLBL_TRTS_VARARGS_CC BOOST_CLBL_TRTS_DEFAULT_VARARGS_CC
0132 #define BOOST_CLBL_TRTS_CC
0133 #define BOOST_CLBL_TRTS_ST pascal
0134 #include <boost/callable_traits/detail/unguarded/function_ptr.hpp>
0135 #undef BOOST_CLBL_TRTS_CC
0136 #undef BOOST_CLBL_TRTS_ST
0137 #undef BOOST_CLBL_TRTS_CC_TAG
0138 #undef BOOST_CLBL_TRTS_VARARGS_CC
0139 #endif
0140
0141 template<typename T>
0142 struct function<T&> : std::conditional<function<T>::value,
0143 function<T>, default_callable_traits<T&>>::type {
0144
0145 static constexpr const bool value = !std::is_pointer<T>::value;
0146
0147 using traits = function;
0148 using base = function<T>;
0149 using type = T&;
0150 using remove_varargs = typename base::remove_varargs&;
0151 using add_varargs = typename base::add_varargs&;
0152
0153 using remove_member_reference = reference_error;
0154 using add_member_lvalue_reference = reference_error;
0155 using add_member_rvalue_reference = reference_error;
0156 using add_member_const = reference_error;
0157 using add_member_volatile = reference_error;
0158 using add_member_cv = reference_error;
0159 using remove_member_const = reference_error;
0160 using remove_member_volatile = reference_error;
0161 using remove_member_cv = reference_error;
0162
0163 template<typename NewReturn>
0164 using apply_return = typename base::template apply_return<NewReturn>&;
0165
0166 using clear_args = typename base::clear_args&;
0167
0168 template<typename... NewArgs>
0169 using push_front = typename base::template push_front<NewArgs...>&;
0170
0171 template<typename... NewArgs>
0172 using push_back = typename base::template push_back<NewArgs...>&;
0173
0174 template<std::size_t Count>
0175 using pop_back = typename base::template pop_back<Count>&;
0176
0177 template<std::size_t Count>
0178 using pop_front = typename base::template pop_front<Count>&;
0179
0180 template<std::size_t Index, typename... NewArgs>
0181 using insert_args = typename base::template insert_args<Index, NewArgs...>&;
0182
0183 template<std::size_t Index, std::size_t Count>
0184 using remove_args = typename base::template remove_args<Index, Count>&;
0185
0186 template<std::size_t Index, typename... NewArgs>
0187 using replace_args = typename base::template replace_args<Index, NewArgs...>&;
0188 };
0189
0190 }}}
0191
0192 #endif