boostorg / boostorg/program_options

Duplicate option not detected when added

Open
#99 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
136
Forks
117
PR merge metrics
No merged PRs in 30d

Description

According to the documentation, `options_description::add` should throw `duplicate_variable_error`.
This is not the case. Instead `ambiguous_option` is thrown when parsing the command line.
Ironically from within a function called `find_nothrow`

Many of the tests in https://github.com/boostorg/program_options/blob/develop/test/exception_test.cpp should throw `duplicate_variabl_error`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.