andrey-zherikov / argparse

Parser for command-line arguments
https://andrey-zherikov.github.io/argparse/
Boost Software License 1.0
30 stars 6 forks source link

Simplify functions with `auto ref` parameters #140

Closed SirNickolas closed 8 months ago

SirNickolas commented 9 months ago
  1. The overload NamedArgument(string) is redundant since there is NamedArgument(string[]...).
  2. auto ref is unnecessary when the argument is not mutated.
  3. The type of an auto ref parameter doesn’t need to be a template placeholder; it can be a concrete type. However, a function featuring such parameter should be a template nonetheless.