Represents a reflected function. More...
#include <refl.hpp>
Public Types | |
template<typename... Args> | |
using | return_type = decltype(member::invoke(std::declval< Args >()...)) |
The return type of an invocation of this member with Args... More... | |
Public Member Functions | |
template<typename... Args> | |
constexpr auto | operator() (Args &&... args) const -> decltype(invoke(std::declval< Args >()...)) |
A synonym for invoke(args...). More... | |
Static Public Member Functions | |
template<typename... Args> | |
static constexpr auto | invoke (Args &&... args) -> decltype(member::invoke(std::declval< Args >()...)) |
Invokes the function with the given arguments. More... | |
template<typename Pointer > | |
static constexpr bool | can_resolve () |
Whether the pointer can be resolved as with the specified type. More... | |
template<typename Pointer > | |
static constexpr auto | resolve () |
Resolves the function pointer as being of type Pointer. More... | |
Static Public Attributes | |
static constexpr auto | pointer { detail::get_function_pointer<member>(0) } |
Returns a pointer to a non-overloaded function. More... | |
static constexpr bool | is_resolved { !std::is_same_v<decltype(pointer), const decltype(nullptr)> } |
Whether the pointer member was correctly resolved to a concrete implementation. More... | |
Represents a reflected function.
using refl::descriptor::function_descriptor< T, N >::return_type = decltype(member::invoke(std::declval<Args>()...)) |
The return type of an invocation of this member with Args...
(as if by invoke(...)).
|
inlinestaticconstexpr |
Whether the pointer can be resolved as with the specified type.
|
inlinestaticconstexpr |
Invokes the function with the given arguments.
If the function is an instance function, a reference to the instance is provided as first argument.
|
inlineconstexpr |
A synonym for invoke(args...).
|
inlinestaticconstexpr |
Resolves the function pointer as being of type Pointer.
Required when taking a pointer to an overloaded function.
|
staticconstexpr |
Whether the pointer member was correctly resolved to a concrete implementation.
If this field is false, resolve() would need to be called instead.
|
staticconstexpr |
Returns a pointer to a non-overloaded function.
When the member is a function, the return value might be nullptr if the type of the function pointer cannot be resolved.