libsigc++: sigc::deduce_result_type< T_functor, T_args > Struct Template Reference

libsigc++ 2.12.1

Public Types | Static Public Member Functions | List of all members
sigc::deduce_result_type< T_functor, T_args > Struct Template Reference
Adaptors

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

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

## Public Types
using | type = decltype (test<T_functor> ())

## Static Public Member Functions
template<class U_functor>
static functor_trait< T_functor >::result_type | test ()
template<class U_functor, typename = typename std::is_base_of<adaptor_base, T_functor>::type>
static U_functor::template deduce_result_type< T_args... >::type | test ()

## Detailed Description

template<class T_functor, class... T_args>
struct sigc::deduce_result_type< T_functor, T_args >

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.

## Member Typedef Documentation

## ◆ type

template <class T_functor, class... T_args>

using sigc::deduce_result_type< T_functor, T_args >::type = decltype (test<T_functor> ())

## Member Function Documentation

## ◆ test() [1/2]

template <class T_functor, class... T_args>
template <class U_functor>

functor_trait< T_functor >::result_type sigc::deduce_result_type< T_functor, T_args >::test | ( |  | ) |
| static

## ◆ test() [2/2]

template <class T_functor, class... T_args>
template <class U_functor, typename = typename std::is_base_of<adaptor_base, T_functor>::type>

U_functor::template deduce_result_type< T_args... >::type sigc::deduce_result_type< T_functor, T_args >::test | ( |  | ) |
| static