I am using boost program options to get boolean values from command line argument. I would like my argument to be specified as "Y", Yes", "N", "No".
Actually my code did it using a temporary string that
- will be parsed by
boost program options
- checked against "Y", "Yes", "N" or "No"
- assigned to the boolean variable member.
On top of that I am also using another temp string getting the default value.
I did all that work since I tried thee code below that didn't work
namespace pod = boost::program_options;
("Section.Flag",
pod::value<bool>(&myFlag_bool)->default_value( false ),
"description")
Do you know whether boost program options can be used some better then the one I use to achieve that?