22 May 17:36
[program_options] option recognition is too permissive
From: Florent Teichteil <florent.teichteil <at> gmail.com>
Subject: [program_options] option recognition is too permissive
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-05-22 15:36:39 GMT
Subject: [program_options] option recognition is too permissive
Newsgroups: gmane.comp.lib.boost.devel
Date: 2008-05-22 15:36:39 GMT
Hi, I suggest to improve options' parsing error recognition, since program_options does not throw an exception for command line options that are substrings of actual options. To be clear : assume we add an option "myoption" with the boost::program_options::options_description::add_options() function. The following command line options are recognized (program_options does not throw an exception): myoption [OK,should be recognized] myopt [BAD,should not be recognized] The following command line options are not recognized (program_options throws an exception): myoptions [OK,should not be recognized] myopr [OK,should not be recognized] I suggest program_options should parse the entire option string until reaching a '=' or ' ' character, and then trying to recognize this option. Best, Florent _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
RSS Feed