- Aldebaran documentation |
- C++ Libraries |
- index

libqi-api 2.8.7.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- Class List
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | List of all members
qi::UnitFuture Struct Reference

`#include <future_fwd.hpp>`

## Public Types
using | retract_type = SrcFuture

## Public Member Functions
| UnitFuture ()
template<typename T >
Future< ka::Decay< T > > | operator() (T &&t) const
| There is no constraint on T. More...
Future< void > | operator() () const

## Detailed Description

Polymorphic function object that creates a Future from a value, if provided.

"unit" is traditionally the name of a transformation that sends a value into the monadic level, because it is a "unit" or "neutral element" for monadic composition.

See the comment of `semiLift` for an explanation.

Example:

// `i` is an `int`
UnitFuture unit;
Future<int> fut0 = unit(i);
Future<void> fut1 = unit();

Definition at line 1119 of file future_fwd.hpp.

## Member Typedef Documentation

using qi::UnitFuture::retract_type = SrcFuture

Definition at line 1144 of file future_fwd.hpp.

## Constructor & Destructor Documentation

qi::UnitFuture::UnitFuture | ( |  | ) |
| inline

Definition at line 1124 of file future_fwd.hpp.

## Member Function Documentation

template<typename T >

Future<ka::Decay<T> > qi::UnitFuture::operator() | ( | T && | t | ) | const
| inline

There is no constraint on T.

Definition at line 1132 of file future_fwd.hpp.

Future<void> qi::UnitFuture::operator() | ( |  | ) | const
| inline

Definition at line 1137 of file future_fwd.hpp.

The documentation for this struct was generated from the following file:

- /home/opennao/work/release-2.8/sdk/libqi/qi/detail/future_fwd.hpp