"Fossies" - the Fresh Open Source Software archive

Member "libsigc++-2.3.1/docs/reference/html/structsigc_1_1deduce__result__type.html" of archive libsigc++-2.3.1.tar.gz:


Caution: In this restricted "Fossies" environment the current HTML page may not be correctly presentated and may have some non-functional links. Alternatively you can here view or download the uninterpreted source code. That can be also achieved for any archive member file by clicking within an archive contents listing on the first character of the file(path) respectively on the according byte size field.

libsigc++  2.3.1
Public Types | List of all members
sigc::deduce_result_type< T_functor, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, I_derives_adaptor_base > Struct Template Reference

Deduce the return type of a functor. More...

#include <sigc++/adaptors/deduce_result_type.h>

Public Types

typedef functor_trait
< T_functor >::result_type 
type
 

Detailed Description

template<class T_functor, 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, bool I_derives_adaptor_base = is_base_and_derived<adaptor_base,T_functor>::value>
struct sigc::deduce_result_type< T_functor, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, I_derives_adaptor_base >

Deduce the return type of a functor.

typename deduce_result_type<functor_type, list of arg_types>::type deduces a functor's result type if functor_type inherits from sigc::functor_base and defines result_type or if functor_type is actually a (member) function type. Multi-type functors are not supported.

sigc++ adaptors use typename deduce_result_type<functor_type, list of arg_types>::type to determine the return type of their templated operator() overloads.

Adaptors in turn define a nested template class deduce_result_type that is used by template specializations of the global deduce_result_type template to correctly deduce the return types of the adaptor's suitable template operator() overload.