koutil
Loading...
Searching...
No Matches
koutil::argparser::parser Concept Reference

Concept to check if a type is a parser. More...

#include <parser.h>

Concept definition

template<typename T, typename Ctx>
concept koutil::argparser::parser = requires(Ctx& ctx, const Arg& arg, std::string_view value, const SubcommandBase& cmd) {
{ T::parse_argument(ctx, value) } -> std::same_as<ParseResult>;
{ T::parse_option_flag(ctx, arg) } -> std::same_as<ParseResult>;
{ T::parse_option_value(ctx, arg, value) } -> std::same_as<ParseResult>;
{ T::parse_command(ctx, cmd) } -> std::same_as<ParseResult>;
}
Concept to check if a type is a parser.
Definition parser.h:34

Detailed Description

Concept to check if a type is a parser.

Template Parameters
TThe parser type.
CtxThe context type.