[program_options] disable partial matches

28 Feb
2007
28 Feb
'07
2:15 a.m.
Hi With the current implementation, the user does not have to supply the full option names, e.g. "--he" is as good as "--help", unless there is an ambiguity. Is there any way to disable this, i.e. allow only full matches? Thanks

28 Feb
28 Feb
6:58 a.m.
Torrey Pines wrote:
Hi
With the current implementation, the user does not have to supply the full option names, e.g. "--he" is as good as "--help", unless there is an ambiguity. Is there any way to disable this, i.e. allow only full matches?
The parse_command_line function has a 'style' parameter, when you don't specify a value then 'default_style' is assumed. You'd need to explicitly pass 'default_style' with 'allow_guessing' masked out. The styles are defined in cmdline.hpp. HTH, Volodya
6569
Age (days ago)
6569
Last active (days ago)
1 comments
2 participants
participants (2)
-
Torrey Pines
-
Vladimir Prus