Loading...
Searching...
No Matches
caf::optional< T & > Class Template Reference

Template specialization to allow optional to hold a reference rather than an actual value with minimal overhead. More...

`#include <optional.hpp>`

## Public Types

using | type = T

## Public Member Functions

| optional (const none_t &=none)
| optional (T &x)
| optional (T *x)
| optional (const optional &other)=default
optional & | operator= (const optional &other)=default
| operator bool () const
bool | operator! () const
T & | operator* ()
const T & | operator* () const
T * | operator-> ()
const T * | operator-> () const
T & | value ()
const T & | value () const
const T & | value_or (const T &default_value) const

## Related Symbols

(Note that these are not member symbols.)
std::string | to_string (const optional< T > &x)
T && | move_if_optional (optional< T > &x)
| Returns an rvalue to the value managed by x.
T & | move_if_optional (T *x)
| Returns *x.
bool | operator== (const optional< T > &lhs, const optional< T > &rhs)
bool | operator!= (const optional< T > &lhs, const optional< T > &rhs)
bool | operator< (const optional< T > &lhs, const optional< T > &rhs)
bool | operator<= (const optional< T > &lhs, const optional< T > &rhs)
bool | operator>= (const optional< T > &lhs, const optional< T > &rhs)
bool | operator> (const optional< T > &lhs, const optional< T > &rhs)
bool | operator== (const optional< T > &lhs, none_t)
bool | operator== (none_t, const optional< T > &rhs)
bool | operator!= (const optional< T > &lhs, none_t)
bool | operator!= (none_t, const optional< T > &rhs)
bool | operator< (const optional< T > &, none_t)
bool | operator< (none_t, const optional< T > &rhs)
bool | operator<= (const optional< T > &lhs, none_t)
bool | operator<= (none_t, const optional< T > &)
bool | operator> (const optional< T > &lhs, none_t)
bool | operator> (none_t, const optional< T > &)
bool | operator>= (const optional< T > &, none_t)
bool | operator>= (none_t, const optional< T > &)
bool | operator== (const optional< T > &lhs, const T &rhs)
bool | operator== (const T &lhs, const optional< T > &rhs)
bool | operator!= (const optional< T > &lhs, const T &rhs)
bool | operator!= (const T &lhs, const optional< T > &rhs)
bool | operator< (const optional< T > &lhs, const T &rhs)
bool | operator< (const T &lhs, const optional< T > &rhs)
bool | operator<= (const optional< T > &lhs, const T &rhs)
bool | operator<= (const T &lhs, const optional< T > &rhs)
bool | operator> (const optional< T > &lhs, const T &rhs)
bool | operator> (const T &lhs, const optional< T > &rhs)
bool | operator>= (const optional< T > &lhs, const T &rhs)
bool | operator>= (const T &lhs, const optional< T > &rhs)

## Detailed Description

template<class T>
class caf::optional< T & >

Template specialization to allow optional to hold a reference rather than an actual value with minimal overhead.

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

- /build/actor-framework-Z9pIPl/actor-framework-0.17.6/libcaf_core/caf/optional.hpp