iceoryx_doc
1.0.1
|
cxx::function_ref is a non-owning reference to a callable. More...
#include <function_ref.hpp>
Public Member Functions | |
function_ref () noexcept | |
Creates an empty function_ref in an invalid state. More... | |
function_ref (const function_ref &) noexcept=default | |
function_ref & | operator= (const function_ref &) noexcept=default |
template<typename CallableType , typename = std::enable_if_t<!is_function_ref<std::remove_reference_t<CallableType>>::value>, typename = std::enable_if_t<is_invocable<CallableType, ArgTypes...>::value>> | |
function_ref (CallableType &&callable) noexcept | |
Creates a function_ref with a callable whose lifetime has to be longer than function_ref. More... | |
function_ref (function_ref &&rhs) noexcept | |
function_ref & | operator= (function_ref &&rhs) noexcept |
ReturnType | operator() (ArgTypes... args) const noexcept |
Calls the provided callable. More... | |
operator bool () const noexcept | |
Checks whether a valid target is contained. More... | |
void | swap (function_ref &rhs) noexcept |
Swaps the contents of two function_ref's. More... | |
cxx::function_ref is a non-owning reference to a callable.
It has these features: * No heap usage * No exceptions * Stateful lambda support * C++11/14 support
|
inlinenoexcept |
Creates an empty function_ref in an invalid state.
|
inlinenoexcept |
Creates a function_ref with a callable whose lifetime has to be longer than function_ref.
[in] | callable | that is not a function_ref |
|
inlineexplicitnoexcept |
Checks whether a valid target is contained.
|
inlinenoexcept |
Calls the provided callable.
[in] | Arguments | are forwarded to the underlying function pointer |
|
inlinenoexcept |
Swaps the contents of two function_ref's.
[in] | Reference | to another function_ref |