boostorg / program_options

Boost.org program_options module
http://boost.org/libs/program_options
110 stars 107 forks source link

canonical_name option for error_with_option_name is giving NULL string #102

Open sgoru opened 4 years ago

sgoru commented 4 years ago

The error is "option is ambiguous and matches 'parent_run' and 'parent_hierarchy' " instead it should be "option '-parent' is ambiguous and matches '-parent_run' and '-parent_hierarchy' " Here since -parent is canonical name and it set to NULL string , it is giving the first error message. I have checked the canonical name using get_canonical_name function. Below is the code snippet. catch(boost::program_options::error& e){ std::cout<<e.what(); }