Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gershnik committed Mar 19, 2022
1 parent f627646 commit f6cab37
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Fully-featured, powerful and simple to use C++ command line argument parser.

[releases]: https://github.com/gershnik/argum/releases
[syntax]: https://github.com/gershnik/argum/wiki/Syntax-Description
[getsubopt]: https://www.gnu.org/software/libc/manual/html_node/Suboptions.html

## Features and goals

Expand Down Expand Up @@ -213,6 +214,8 @@ Note that exceptions are only used for _parsing_ errors. Logic errors such as pa

Having multiple options arguments is a very bad idea. Consider this. Normally with Posix/GNU approach when an option argument itself looks like an option you can always use some syntax to disambiguate. For example if you have option `--foo`, `-f` and argument `-x` you can say: `--foo=-x` and `-f-x` to unambiguously treat `-x` as an argument. With multiple arguments this becomes impossible. People using ArgParse occasionally hit this issue and are surprised. Argum follows standard Unix approach of having at most one argument per option.

If you really, really need more than one argument to an option consider requiring to pass them as comma or semicolon separated list. This is also a de-facto standard Unix approach. See for example [getsubopt].

### Why isn't it using `std::ranges`?

This is simply due to the fact that, currently, not all compilers have standard libraries have ranges yet. Once ranges become widely available this library will integrate them.
Expand Down

0 comments on commit f6cab37

Please sign in to comment.