8 #ifndef IS_CALL_POSSIBLE_H_
9 #define IS_CALL_POSSIBLE_H_
18 template<
typename Type>
44 template<
typename T, T t>
74 template<
typename type>
77 template<
typename type,
typename U>
80 template<
typename type,
typename U>
84 template<
typename src_type,
typename dest_type>
91 template<
typename src_type,
typename dest_type>
93 typedef const dest_type
type;
99 template <
typename type,
typename call_details>
114 using type::operator();
124 template<
typename T,
typename DesiredReturnType>
155 template <
typename Mid,
typename... Tail>
157 template <
typename... Head>
164 template <
typename Tail>
166 template <
typename... Head>
168 -> decltype(((
derived_type*) 0)->
operator()(head..., (*(Tail*)0))){
175 template<
bool HasFnCallOperator,
typename F>
180 template<
typename... args,
typename r>
181 struct impl<true, r(args...)> {
198 type>()))) ==
sizeof(
yes);
206 template <
typename SourceType,
typename TargetType>
static Yes Deduce(TargetType)
static yes deduce(DesiredReturnType)
A class which will definitely have a function call operator. If type has a function call operator the...
Provides a member function deduce() which accepts any parameters and whose return type is always no e...
static no deduce(U *, Helper< void(DummyFnCallOperator::*)(),&U::operator()>*=0)
SFINAE. The first overload for deduce takes two arguments, the first is a pointer to an object...
This template only exists for a pair of template parameters where the type of the second parameter is...
details::clone_constness< type, derived >::type derived_type
Same as derived but with the same const-ness as type.
Dispatcher< args...> CallDispatcher
static auto Dispatch(Head...head) -> decltype(Dispatcher< Tail...>::Dispatch(head...,(*(Mid *) 0)))
Template metafunction, ::result evaluates to true if Type has a function call operator member...
Default template, HasFnCallOperator is false so obviously no function call is possible.
static constexpr bool value
This class derives from both the argument of the meta function, and a class which we know has a funct...
Very simply, a class which has a function call operator.
Template meta function, copy's "const" from src_type to dest_type.
U const & operator,(U const &, void_exp_result< type >)
static auto Dispatch(Head...head) -> decltype(((derived_type *) 0) ->operator()(head...,(*(Tail *) 0)))