@@ -47,7 +47,7 @@ namespace promise {
47
47
template <typename T,
48
48
bool is_basic_type = (std::is_void<T>::value
49
49
|| std::is_fundamental<T>::value
50
- || std::is_pointer<T>::value
50
+ || ( std::is_pointer<T>::value && !std::is_function< typename std::remove_pointer<T>::type>::value)
51
51
|| std::is_union<T>::value
52
52
|| std::is_enum<T>::value
53
53
|| std::is_array<T>::value) && !std::is_function<T>::value>
@@ -141,7 +141,7 @@ struct call_traits_impl<RET(T::*)(ARG...), false> {
141
141
};
142
142
143
143
template <typename RET, class T , typename ...ARG>
144
- struct call_traits_impl <RET(T:: *)(ARG...) const , false > {
144
+ struct call_traits_impl <RET(T::*)(ARG...) const , false > {
145
145
static const bool is_callable = true ;
146
146
typedef std::function<RET(ARG...)> fun_type;
147
147
typedef RET result_type;
@@ -183,30 +183,6 @@ struct call_traits_impl<RET(ARG...), false> {
183
183
}
184
184
};
185
185
186
- template <typename RET, typename ...ARG>
187
- struct call_traits_impl <RET(*)(ARG...), true > {
188
- static const bool is_callable = true ;
189
- typedef std::function<RET(ARG...)> fun_type;
190
- typedef RET result_type;
191
- typedef std::tuple<ARG...> argument_type;
192
-
193
- static fun_type to_std_function (RET(*func)(ARG...)) {
194
- return func;
195
- }
196
- };
197
-
198
- template <typename RET, typename ...ARG>
199
- struct call_traits_impl <RET(ARG...), true > {
200
- static const bool is_callable = true ;
201
- typedef std::function<RET(ARG...)> fun_type;
202
- typedef RET result_type;
203
- typedef std::tuple<ARG...> argument_type;
204
-
205
- static fun_type to_std_function (RET(*func)(ARG...)) {
206
- return func;
207
- }
208
- };
209
-
210
186
template <typename T>
211
187
struct call_traits_impl <T, false > {
212
188
static const bool is_callable = has_operator_parentheses<T>::type::value;
0 commit comments