libsigc++: 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

libsigc++ 2.3.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

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
Adaptors

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.