libcoro
1.0
Coroutine support library for C++20
|
Movable any replacement with small object optimization - uses coro::function. More...
#include <function.h>
Classes | |
struct | content |
Contains information about stored content. More... | |
Public Member Functions | |
template<hasnt_cast_operator< any > Arg> | |
any (Arg &&arg) | |
Construct any instance. More... | |
any () | |
Construct empty. More... | |
const content | get_info () const |
Retrieve information about the content. More... | |
content | get_info () |
Retrieve information about the content. More... | |
template<typename T > | |
const T * | get_ptr () const noexcept |
Get as pointer. More... | |
template<typename T > | |
T * | get_ptr () noexcept |
Get as pointer. More... | |
template<typename T > | |
const T & | get () const |
Get as reference. More... | |
template<typename T > | |
T & | get () |
Get as reference. More... | |
bool | empty () const noexcept |
Determines whether object is empty. More... | |
operator bool () const noexcept | |
Determines validity. More... | |
template<typename T > | |
bool | contains () const noexcept |
Tests whether object contains given type. More... | |
Movable any replacement with small object optimization - uses coro::function.
reserved_space | specifies reserved space for small objects, default value is 4 pointers. Note that there is always 1 pointer reserved for type information |
Definition at line 306 of file function.h.