xentara-utils v2.0.3
The Xentara Utility Library
|
Specialization of xentara::utils::functional::function_ref for callable with signature auto (ArgTypes...) -> R. More...
#include <xentara/utils/functional/function_ref.hpp>
Public Member Functions | |
template<class F > requires std::is_function_v<F> && std::is_invocable_r_v<R, std::remove_cvref_t<F>, ArgTypes...> | |
function_ref (F *) noexcept | |
Constructor that takes a function pointer. | |
template<class F > requires (!std::same_as<std::remove_cvref_t<F>, function_ref>) && (!std::is_member_pointer_v<T>) && std::is_invocable_r_v<R, std::remove_cvref_t<F>, ArgTypes...> | |
constexpr | function_ref (F &&) noexcept |
Constructor that takes an arbitrary callable. | |
template<auto f> requires std::is_invocable_r_v<R, std::remove_cvref_t<decltype(f)>, ArgTypes...> | |
constexpr | function_ref (nontype_t< f >) noexcept |
Constructor that supports pointers to member functions and pointers to member objects. | |
template<auto f, class U > requires std::is_invocable_r_v<R, std::remove_cvref_t<decltype(f)>, std::remove_reference_t<U> &, ArgTypes...> && (!std::is_rvalue_reference_v<U &&>) | |
constexpr | function_ref (nontype_t< f >, U &&) noexcept |
Constructor that binds a callable to a reference. | |
template<auto f, class T > requires std::is_invocable_r_v<R, std::remove_cvref_t<decltype(f)>, T &, ArgTypes...> && (!std::is_rvalue_reference_v<U &&>) | |
constexpr | function_ref (nontype_t< f >, T *) noexcept |
Constructor that binds a callable to a pointer. | |
template<class T > requires (!std::same_as<T, function_ref>) && (!std::is_pointer_v<T) && (!__exposition_only_is_specialization_of<T, nontype_t>) | |
function_ref & | operator= (T)=delete |
Deleted assignment operator that restricts assignment. | |
R | operator() (ArgTypes...) const |
Invokes the callable. | |
Specialization of xentara::utils::functional::function_ref for callable with signature auto (ArgTypes...) -> R.
R | The return type of the callable. |
ArgTypes | The argument type of the callable. |
|
noexcept |
Constructor that takes a function pointer.
|
constexprnoexcept |
Constructor that takes an arbitrary callable.
|
constexprnoexcept |
Constructor that supports pointers to member functions and pointers to member objects.
|
constexprnoexcept |
Constructor that binds a callable to a reference.
This constructor can be used to bind a pointer to member function or a pointer to member object to an object.
|
constexprnoexcept |
Constructor that binds a callable to a pointer.
This constructor can be used to bind a pointer to member function or a pointer to member object to an object.
R xentara::utils::functional::function_ref< R(ArgTypes...)>::operator() | ( | ArgTypes... | ) | const |
Invokes the callable.
|
delete |
Deleted assignment operator that restricts assignment.
Assignment is only possible from: