2 /* Do not edit! -- generated file */
5 #ifndef _SIGC_ADAPTORS_MACROS_DEDUCE_RESULT_TYPEHM4_
6 #define _SIGC_ADAPTORS_MACROS_DEDUCE_RESULT_TYPEHM4_
7 #include <sigc++/functors/functor_trait.h>
12 /** A hint to the compiler.
13 * Functors which have all methods based on templates
14 * should publicly inherit from this hint and define
15 * a nested template class @p deduce_result_type that
16 * can be used to deduce the methods' return types.
18 * adaptor_base inherits from the functor_base hint so
19 * derived types should also have a result_type defined.
21 * Adaptors don't inherit from this type directly. They use
22 * use sigc::adapts as a base type instead. sigc::adaptors
23 * wraps arbitrary functor types as well as function pointers
28 struct adaptor_base : public functor_base {};
31 /** Deduce the return type of a functor.
32 * <tt>typename deduce_result_type<functor_type, list of arg_types>::type</tt>
33 * deduces a functor's result type if @p functor_type inherits from
34 * sigc::functor_base and defines @p result_type or if @p functor_type
35 * is actually a (member) function type. Multi-type functors are not
39 * <tt>typename deduce_result_type<functor_type, list of arg_types>::type</tt>
40 * to determine the return type of their <tt>templated operator()</tt> overloads.
42 * Adaptors in turn define a nested template class @p deduce_result_type
43 * that is used by template specializations of the global deduce_result_type
44 * template to correctly deduce the return types of the adaptor's suitable
45 * <tt>template operator()</tt> overload.
49 template <class T_functor,
50 class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void,
51 bool I_derives_adaptor_base=is_base_and_derived<adaptor_base,T_functor>::value>
52 struct deduce_result_type
53 { typedef typename functor_trait<T_functor>::result_type type; };
55 /** Deduce the return type of a functor.
56 * This is the template specialization of the sigc::deduce_result_type template
59 template <class T_functor>
60 struct deduce_result_type<T_functor, void,void,void,void,void,void,void, true>
61 { typedef typename T_functor::template deduce_result_type<>::type type; };
63 /** Deduce the return type of a functor.
64 * This is the template specialization of the sigc::deduce_result_type template
67 template <class T_functor, class T_arg1>
68 struct deduce_result_type<T_functor, T_arg1, void,void,void,void,void,void, true>
69 { typedef typename T_functor::template deduce_result_type<T_arg1>::type type; };
71 /** Deduce the return type of a functor.
72 * This is the template specialization of the sigc::deduce_result_type template
75 template <class T_functor, class T_arg1,class T_arg2>
76 struct deduce_result_type<T_functor, T_arg1,T_arg2, void,void,void,void,void, true>
77 { typedef typename T_functor::template deduce_result_type<T_arg1,T_arg2>::type type; };
79 /** Deduce the return type of a functor.
80 * This is the template specialization of the sigc::deduce_result_type template
83 template <class T_functor, class T_arg1,class T_arg2,class T_arg3>
84 struct deduce_result_type<T_functor, T_arg1,T_arg2,T_arg3, void,void,void,void, true>
85 { typedef typename T_functor::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type type; };
87 /** Deduce the return type of a functor.
88 * This is the template specialization of the sigc::deduce_result_type template
91 template <class T_functor, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
92 struct deduce_result_type<T_functor, T_arg1,T_arg2,T_arg3,T_arg4, void,void,void, true>
93 { typedef typename T_functor::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type type; };
95 /** Deduce the return type of a functor.
96 * This is the template specialization of the sigc::deduce_result_type template
99 template <class T_functor, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
100 struct deduce_result_type<T_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, void,void, true>
101 { typedef typename T_functor::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type type; };
103 /** Deduce the return type of a functor.
104 * This is the template specialization of the sigc::deduce_result_type template
107 template <class T_functor, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
108 struct deduce_result_type<T_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, void, true>
109 { typedef typename T_functor::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type type; };
111 /** Deduce the return type of a functor.
112 * This is the template specialization of the sigc::deduce_result_type template
115 template <class T_functor, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
116 struct deduce_result_type<T_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, true>
117 { typedef typename T_functor::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type; };
120 } /* namespace sigc */
121 #endif /* _SIGC_ADAPTORS_MACROS_DEDUCE_RESULT_TYPEHM4_ */