mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 07:04:39 +00:00
parent
79eba4e81f
commit
c6cc306ec8
@ -527,13 +527,4 @@ private:
|
|||||||
std::map<std::string, std::shared_ptr<Argument>> mArgumentMap;
|
std::map<std::string, std::shared_ptr<Argument>> mArgumentMap;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define PARSE_ARGS(parser, argc, argv) \
|
|
||||||
try { \
|
|
||||||
parser.parse_args(argc, argv); \
|
|
||||||
} catch (const std::runtime_error &err) { \
|
|
||||||
std::cout << err.what() << std::endl; \
|
|
||||||
parser.print_help(); \
|
|
||||||
exit(0); \
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace argparse
|
} // namespace argparse
|
||||||
|
Loading…
Reference in New Issue
Block a user