C++ Essence Library 0.1.0
A Utility Library for Modern C++ Programming
Loading...
Searching...
No Matches
essence::delegate< R(Args...)> Class Template Reference

Public Types

using function_type = std::function<R(Args...)>
 
using nothrow_function_type
 

Public Member Functions

 delegate (const delegate &)=delete
 
 delegate (delegate &&) noexcept=delete
 
delegateoperator= (const delegate &)=delete
 
delegateoperator= (delegate &&) noexcept=delete
 
 operator bool () const noexcept
 
decltype(auto) operator+= (const delegate &right)
 
template<std::convertible_to< function_type > Callable>
decltype(auto) operator+= (Callable &&handler)
 
template<typename... Equivalents>
requires std::is_invocable_r_v<R, function_type, Equivalents...>
auto try_invoke (Equivalents &&... args) const
 
template<typename... Equivalents>
requires std::is_invocable_r_v<R, function_type, Equivalents...>
operator() (Equivalents &&... args) const
 
template<std::convertible_to< function_type > Callable>
auto add_listener (Callable &&handler)
 
function_type to_function () const
 
nothrow_function_type to_nothrow_function () const
 

Member Typedef Documentation

◆ nothrow_function_type

template<typename R , typename... Args>
using essence::delegate< R(Args...)>::nothrow_function_type
Initial value:
std::conditional_t<std::is_void_v<R>, function_type, std::function<std::optional<R>(Args...)>>

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