An implementation of std::function_ref, a lightweight non-owning reference to a callable.
More...
|
| constexpr | function_ref () noexcept=delete |
| |
| constexpr | function_ref (const function_ref< R(Args...)> &rhs) noexcept=default |
| | Creates a function_ref which refers to the same callable as rhs.
|
| |
template<typename F >
requires (!std::is_same_v<std::decay_t<F>, function_ref> && std::is_invocable_r_v<R, F &&, Args...>) |
| constexpr | function_ref (F &&f) noexcept |
| | Constructs a function_ref referring to f.
|
| |
| constexpr function_ref< R(Args...)> & | operator= (const function_ref< R(Args...)> &rhs) noexcept=default |
| | Makes *this refer to the same callable as rhs.
|
| |
template<typename F >
requires std::is_invocable_r_v<R, F&&, Args...> |
| constexpr function_ref< R(Args...)> & | operator= (F &&f) noexcept |
| | Makes *this refer to f.
|
| |
| constexpr void | swap (function_ref< R(Args...)> &rhs) noexcept |
| | Swaps the referred callables of *this and rhs.
|
| |
| R | operator() (Args... args) const |
| | Call the stored callable with the given arguments.
|
| |
template<class R, class... Args>
class slp::function_ref< R(Args...)>
An implementation of std::function_ref, a lightweight non-owning reference to a callable.