Index: boost/program_options/cmdline.hpp
===================================================================
--- boost/program_options/cmdline.hpp (revision 79302)
+++ boost/program_options/cmdline.hpp (working copy)
@@ -20,8 +20,12 @@
It's possible to introduce long options by the same character as
short options, see allow_long_disguise.
- Finally, guessing (specifying only prefix of option) and case
+ Guessing (specifying only prefix of option) and case
insensitive processing are supported.
+
+ Enabling and disabling interspersed arguments is also supported; with
+ interspersed arguments disabled, everything after the first positional
+ argument is treated as positional.
*/
enum style_t {
/// Allow "--long_name" style
@@ -75,11 +79,16 @@
e.g -foo=10
*/
allow_long_disguise = short_case_insensitive << 1,
+ /** Allow interspersed arguments, e.g. mycmd file1 --opt
+ will treat --opt as an option instead of a positional
+ argument.
+ */
+ allow_interspersed = allow_long_disguise << 1,
/** The more-or-less traditional unix style. */
unix_style = (allow_short | short_allow_adjacent | short_allow_next
| allow_long | long_allow_adjacent | long_allow_next
| allow_sticky | allow_guessing
- | allow_dash_for_short),
+ | allow_dash_for_short | allow_interspersed),
/** The default style. */
default_style = unix_style
};
Index: boost/program_options/detail/cmdline.hpp
===================================================================
--- boost/program_options/detail/cmdline.hpp (revision 79302)
+++ boost/program_options/detail/cmdline.hpp (working copy)
@@ -107,7 +107,7 @@
std::vector