Boost logo

Boost Users :

Subject: [Boost-users] program_options allow_unregistered and *nix style
From: Michael Powell (mwpowellhtx_at_[hidden])
Date: 2013-04-12 16:03:07


Hello,

I would like to find a way to allow_unregistered program_options, as well
as specify cls::unix_style ^ cls::allow_short, where cls is
po::command_line_style.

The code I've got here doesn't seem to like unrecognized ones:

//vis_ are my visible options, vars_ is my variable map.
    po::store(parse_command_line(argc, argv, vis_,
            cls::unix_style ^ cls::allow_short), vars_);
    po::notify(vars_);

And then a slight variation with apparently a way to do this (untested),
how to specify that cls?

//
http://stackoverflow.com/questions/10178525/how-to-handle-unsolicited-parameters-in-boostprogram-options
    po::parsed_options parsed_ = po::command_line_parser(argc, argv)
        .options(vis_).allow_unregistered().run();

Possible? Thank ye...

Regards,

Michael Powell



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net