Boost logo

Boost Users :

Subject: Re: [Boost-users] [program options] vectro from config file
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-07-15 01:38:02


Diederick C. Niehorster wrote:

> I see that it is possible to define/override the validator for a
> user-defined data-type/class, this is not what you are suggesting,
> right? Instead, you are suggesting to make it possible to store a
> custom validator function in the option_description, which would then
> be called instead, right? Hmm, that would do the trick too, though
> that operates on a conceptually different level. I would then have to
> specify that custom validator for every option of type vector<T>.
> Instead, this is a suggestion for enhanced syntax for specifying
> vectors (that is, options that can occur multiple times) on the
> command line, in a config file or even in the environment variable
> (well, who'd do that?). It will not break any existing option input
> systems defined by users. IMHO, allowing this enhanced syntax is a
> simple, local change to the validate function for vectors that can be
> made quickly, whereas allowing to specify a custom validate function
> for a given option will be a much bigger hassle, though also a
> necessary thing (say you want only even ints as input for whatever
> reason, you'll need this). I'll do the coding (still need to take care
> of vectors of strings) and I'll put it in as a feature request/bug
> report so we can discuss this at the appropriate place.

Thanks. Filing this at svn.boost.org is indeed good idea. No changes
like this are likely to be in 1.40 (since the window has closed), and
then I'll be able to ponder about this change.

- Volodya


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