libsigc++: sigc::bind_functor< I_location, T_functor, T_bound > Struct Template Reference

libsigc++ 3.0.0

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

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

Public Member Functions | List of all members
sigc::bind_functor< I_location, T_functor, T_bound > Struct Template Reference
Adaptors » bind(), bind_return()

Adaptor that binds arguments to the wrapped functor. More...

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

Inheritance diagram for sigc::bind_functor< I_location, T_functor, T_bound >:
[legend]

## Public Member Functions
| bind_functor (type_trait_take_t< T_functor > func, type_trait_take_t< T_bound >...bound)
| Constructs a bind_functor object that binds an argument to the passed functor. More...
template<typename... T_arg>
decltype(auto) | operator() (T_arg&&...arg)
| 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...

## Additional Inherited Members
Public Attributes inherited from sigc::adapts< T_functor >
adaptor_type | functor_
| Adaptor that is invoked from operator()(). More...

## Detailed Description

### template<int I_location, typename T_functor, typename... T_bound>
struct sigc::bind_functor< I_location, T_functor, T_bound >

Adaptor that binds arguments to the wrapped functor.

Use the convenience function sigc::bind() to create an instance of sigc::bind_functor.

The following template arguments are used:

- I_location Zero-based position of the argument to fix (`-1` for the last argument).
- T_bound Types of the bound argument.
- T_functor Type of the functor to wrap.

## Constructor & Destructor Documentation

template <int I_location, typename T_functor , typename... T_bound>

sigc::bind_functor< I_location, T_functor, T_bound >::bind_functor | ( | type_trait_take_t< T_functor > | func,
|  | type_trait_take_t< T_bound >... | bound
| ) |  |
| inline

Constructs a bind_functor object that binds an argument to the passed functor.

Parameters

  func | Functor to invoke from operator()().
  bound | Argument to bind to the functor.

## Member Function Documentation

template <int I_location, typename T_functor , typename... T_bound>
template <typename... T_arg>

decltype(auto) sigc::bind_functor< I_location, T_functor, T_bound >::operator() | ( | T_arg &&... | arg | ) |
| inline

Invokes the wrapped functor passing on the arguments.

bound_ is passed as the next argument.

Parameters

  arg | Arguments to be passed on to the functor.

Returns
  The return value of the functor invocation.