
Argument Parser for Modern C++ - p-ranav
https://github.com/p-ranav/argparse
======
danmg
Why use this over boost::program_options?

~~~
p-ranav
Hello. If boost is already part of your workflow, there is probably no reason
to switch. boost::program_options is sophisticated and widely used by the
community.

If boost is not part of your workflow and you want something lightweight, then
here are some reasons (some of these reasons are "in my opinion"): This
library is header-only. It's a single header file and you're off. As the
README suggests, the ArgumentParser class is easy to use and intuitive.
Processing functions can be provided as "action" lambdas in each argument to
convert the argument value from raw strings to higher-level objects and
aggregates - examples in the README better represent what I mean here. The
parser supports parsing and extraction of std::vector<T> and std::list<T> from
a list of argument values too.

There are numerous argument parsers for C++ and this post should have been
titled "Yet another argument parser for C++" but hey, I've had fun putting
this together. If you think it suits your use-cases, you're welcome to try it
out and give me feedback. Thanks.

