Simplified implementation of std::function_ref from C++26. More...
#include <MRFunctional.h>
Public Member Functions | |
| constexpr | FunctionRef () noexcept=delete |
| constexpr | FunctionRef (const FunctionRef &rhs) noexcept=default |
| template<typename F , std::enable_if_t< std::is_invocable_r_v< R, F &&, Args... > > * = nullptr> | |
| constexpr | FunctionRef (F &&f) noexcept |
| constexpr FunctionRef & | operator= (const FunctionRef &rhs) noexcept=default |
| template<typename F , std::enable_if_t< std::is_invocable_r_v< R, F &&, Args... > > * = nullptr> | |
| constexpr FunctionRef & | operator= (F &&f) noexcept |
| constexpr void | swap (FunctionRef &rhs) noexcept |
| R | operator() (Args... args) const |
Simplified implementation of std::function_ref from C++26.
FunctionRef can be used as a lightweight replacement for std::function in cases when:
std::function( nullptr ))