xentara-utils v2.0.3
The Xentara Utility Library
|
Tools used for function-like objects. More...
Classes | |
class | function_ref |
Implementation of std::function_ref More... | |
class | function_ref< R(ArgTypes...) const > |
Specialization of xentara::utils::functional::function_ref for callable with signature auto (ArgTypes...) const -> R. More... | |
class | function_ref< R(ArgTypes...) const noexcept > |
Specialization of xentara::utils::functional::function_ref for callable with signature auto (ArgTypes...) const noexcept -> R. More... | |
class | function_ref< R(ArgTypes...) noexcept > |
Specialization of xentara::utils::functional::function_ref for callable with signature auto (ArgTypes...) noexcept -> R. More... | |
class | function_ref< R(ArgTypes...)> |
Specialization of xentara::utils::functional::function_ref for callable with signature auto (ArgTypes...) -> R. More... | |
struct | nontype_t |
Implementation of std::nontype_t More... | |
Functions | |
template<class F > requires std::is_function_v<F> | |
function_ref (F *) -> function_ref< F > | |
Deduction guide for a function_ref from a function pointer. | |
template<auto f> requires std::is_function_v<std::remove_pointer_t<decltype(f)>> | |
function_ref (nontype_t< f >) -> function_ref< std::remove_pointer_t< dectype(f)> > | |
Deduction guide for a function_ref from xentara::utils::functional::nontype. | |
template<auto f, class T > | |
function_ref (nontype_t< f >, auto) -> function_ref< __exposition_only_deduce_signature< f, T > > | |
Deduction guide for a function_ref from xentara::utils::functional::nontype and an argument. | |
Variables | |
template<auto V> | |
constexpr nontype_t< V > | nontype |
Implementation of std::nontype_t | |
Tools used for function-like objects.
This namespace contains facilities for using function-like objects like function pointers, callables, functors, etc.
xentara::utils::functional::function_ref | ( | F * | ) | -> function_ref< F > |
Deduction guide for a function_ref from a function pointer.
xentara::utils::functional::function_ref | ( | nontype_t< f > | ) | -> function_ref< std::remove_pointer_t< dectype(f)> > |
Deduction guide for a function_ref from xentara::utils::functional::nontype.
xentara::utils::functional::function_ref | ( | nontype_t< f > | , |
auto | |||
) | -> function_ref< __exposition_only_deduce_signature< f, T > > |
Deduction guide for a function_ref from xentara::utils::functional::nontype and an argument.
This deduction guide has very complex constraints, which are not shown here, but is essentially used for:
|
constexpr |
Implementation of std::nontype_t
This is an implementation of the proposed std::nontype_t from P0792R13 from C++23, taken from https://github.com/zhihaoy/nontype_functional.
nontype is a helper object used to construct function_ref objects from pointers to members.
#include <xentara/utils/functional/functional_ref.hpp>