boostorg / boostorg/program_options

No way to get number of non-unlimited positional arguments

Offen
#63 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
C++
Sterne
136
Forks
117
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

[Documentation](https://www.boost.org/doc/libs/1_68_0/doc/html/boost/program_options/positiona_1_3_31_9_9_1_1_1.html) for `positional_options_description` says it has a `max_total_count` function that returns the number of positional arguments, and may return `numeric_limits::max` to indicate unlimited arguments. However, there is no way to determine the number of counted arguments.

Given an instance of `positional_options_description`, it is therefore impossible, for example, to print out a list of all positional arguments, stopping at the last, unlimited argument. A new member function that provides this is all you'd need to add, IMO.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Start with the linked positional_options_description documentation, then locate the class implementation and its existing tests in the program_options module. Check how max_total_count distinguishes unlimited arguments. Done means exposing the count of counted positional arguments and covering that behavior with tests and documentation.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp
Bereich
cli
Issue-Typ
Feature
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.