A type that can be specialised to provide customisation point implementations for the seqan3::argument_parser such that third party types may be adapted.
#include <system_error>
{
template <>
struct argument_parsing<
std::errc>
{
static inline std::unordered_map<std::string_view, std::errc>
const enumeration_names
{
{"no_error", std::errc{}},
{"timed_out", std::errc::timed_out},
{"invalid_argument", std::errc::invalid_argument},
{"io_error", std::errc::io_error}
};
};
}
int main(int argc, char const * argv[])
{
std::errc value{};
try
{
parser.parse();
}
{
std::cerr << "[PARSER ERROR] " << ext.what() << "\n";
return -1;
}
return 0;
}
Meta-header for the Argument Parser module .
Argument parser exception that is thrown whenever there is an error while parsing the command line ar...
Definition: exceptions.hpp:38
The SeqAn command line parser.
Definition: argument_parser.hpp:154
void add_option(option_type &value, char const short_id, std::string const &long_id, std::string const &desc, option_spec const spec=option_spec::standard, validator_type option_validator=validator_type{})
Adds an option to the seqan3::argument_parser.
Definition: argument_parser.hpp:248
A validator that checks whether a value is inside a list of valid values.
Definition: validators.hpp:192
auto const enumeration_names
Return a conversion map from std::string_view to option_type.
Definition: auxiliary.hpp:160
@ standard
The default were no checking or special displaying is happening.
Definition: auxiliary.hpp:239
A namespace for third party and standard library specialisations of SeqAn customisation points.
Definition: char.hpp:44
SeqAn specific customisations in the standard namespace.
Definition: affine_cell_proxy.hpp:438
Adaptations of concepts from the Ranges TS.