0

I am using boost/program_options for my CLI application.

I am reading a variable named name from the user.

The variable CLI option called --name or -n for short name.

When i execute

... --name val ...

the variable is set to val (as expected).

But when i execute (accidentally)

... -name val ...

the variable is set to ame.

How can i configure boost to block this scenario ?

Saar peer
  • 817
  • 6
  • 21
  • 1
    Maybe turn off [`short_allow_adjacent`](http://www.boost.org/doc/libs/1_63_0/doc/html/boost/program_options/command_line_style/style_t.html#boost.program_options.command_line_style.style_t.short_allow_adjacent) ? – Dan Mašek Oct 25 '17 at 14:11
  • Tried it, didn't work :-) – Saar peer Oct 26 '17 at 07:02

0 Answers0