Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost-users][program_options] How can I restrict possible values?
From: Adam Nielsen (a.nielsen_at_[hidden])
Date: 2010-04-09 22:12:43


> Hello. I'm using boost.program_options and I want to know if I can
> restrict the possible values for an option. I couldn't
> find an obvious way in the documentation. Thanks.

As far as I'm aware program_options only gives you the values, your code will
have to decide if they're valid and report an error if not. There are a few
different ways to validate parameters like this, these are listed in the docs.

Cheers,
Adam.


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