libsigc++: sigc::bind_return_functor< T_return, T_functor > Struct Template Reference

libsigc++ 3.0.3

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

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

Public Member Functions | Public Attributes | List of all members
sigc::bind_return_functor< T_return, T_functor > Struct Template Reference
Adaptors » bind(), bind_return()

Adaptor that fixes the return value of the wrapped functor. More...

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

Inheritance diagram for sigc::bind_return_functor< T_return, T_functor >:
[legend]

## Public Member Functions
| bind_return_functor (type_trait_take_t< T_functor > functor, type_trait_take_t< T_return > ret_value)
| Constructs a bind_return_functor object that fixes the return value to `ret_value`. More...
unwrap_reference< T_return >::type | operator() ()
| Invokes the wrapped functor dropping its return value. More...
template<typename... T_arg>
unwrap_reference< T_return >::type | operator() (T_arg...a)
| Invokes the wrapped functor passing on the arguments. More...
Public Member Functions inherited from sigc::adapts< T_functor >
| adapts (const T_functor& functor)
| Constructs an adaptor that wraps the passed functor. More...

## Public Attributes
bound_argument< T_return > | ret_value_
| The fixed return value. More...
Public Attributes inherited from sigc::adapts< T_functor >
adaptor_type | functor_
| Adaptor that is invoked from operator()(). More...

## Detailed Description

### template<typename T_return, typename T_functor>
struct sigc::bind_return_functor< T_return, T_functor >

Adaptor that fixes the return value of the wrapped functor.

Use the convenience function sigc::bind_return() to create an instance of sigc::bind_return_functor.

The following template arguments are used:

- T_return Type of the fixed return value.
- T_functor Type of the functor to wrap.

## Constructor & Destructor Documentation

template <typename T_return , typename T_functor >

sigc::bind_return_functor< T_return, T_functor >::bind_return_functor | ( | type_trait_take_t< T_functor > | functor,
|  | type_trait_take_t< T_return > | ret_value
| ) |  |
| inline

Constructs a bind_return_functor object that fixes the return value to `ret_value`.

Parameters

  functor | Functor to invoke from operator()().
  ret_value | Value to return from operator()().

## Member Function Documentation

template <typename T_return , typename T_functor >

unwrap_reference< T_return >::type sigc::bind_return_functor< T_return, T_functor >::operator() | ( |  | ) |

Invokes the wrapped functor dropping its return value.

Returns
  The fixed return value.

template <typename T_return , typename T_functor >
template <typename... T_arg>

unwrap_reference<T_return>::type sigc::bind_return_functor< T_return, T_functor >::operator() | ( | T_arg... | a | ) |
| inline

Invokes the wrapped functor passing on the arguments.

Parameters

  a | Arguments to be passed on to the functor.

Returns
  The fixed return value.

## Member Data Documentation

template <typename T_return , typename T_functor >

bound_argument<T_return> sigc::bind_return_functor< T_return, T_functor >::ret_value_

The fixed return value.