Boost logo

Boost Users :

Subject: [Boost-users] [Program Options] Requiring command-line options
From: Jeremy Abramson (abramson_at_[hidden])
Date: 2010-06-03 03:41:21


Heya! I just thinking about switching from simpleOpt to BoostPO for
command line handling, mainly because of its support of configuration
files. This may be a stupid question, but I haven't seen anything about
making a command line parameter *required*. You'd think this is a
pretty common thing, but I didn't see any mention of it in the tutorials
or anything. I guess I could just make certain parameters default
-1/NULL or something, and then test at the end if they're still equal to
that, but that seems a bit ugly.

Is there built in support (a flag in the "add_options" function or
something) for making certain parameters required?

Thanks a lot!


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