RESTinio
|
A helper template for calling transformation function. More...
#include <easy_parser.hpp>
Static Public Member Functions | |
template<typename Transformer , typename Input_Type > | |
static RESTINIO_NODISCARD Result_Type | invoke (source_t &, Transformer &transformer, expected_t< Input_Type, parse_error_t > &&input) |
A helper template for calling transformation function.
The transformer_invoker class is intended to wrap a call to Transformer::transform method. That method can return a value of type T or a value of type expected_t<T, error_reason_t>.
In the case of return value of type T the returned value of T should be used directly.
In the case of return value of type expected_t<T, error_reason_t> the return value should be checked for the presence of an error. In the case of an error expected_t<T, error_reason_t> should be converted into expected_t<T, parser_error_t>.
Definition at line 1047 of file easy_parser.hpp.
|
inlinestatic |
Definition at line 1052 of file easy_parser.hpp.