Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-05-07 01:52:21

Neal D. Becker wrote:

> > Require that all default_value()'s provide a default value string either
> > from operator << or explicitly when supplying the default value?
> >
> > default_value(x) -> must support operator <<(x)
> > default_value(x, "x") -> no need for operator <<(x)
> Good idea!

True. I've just comitted/uploaded revision 288 which produces the following
(don't forget to use fixed font when viewving ;-) )

   Usage: options_description [options]
   Allowed options:
     --help : produce help message
     --optimization arg (=10) : optimization level
     -I [ --include-path ] arg : include path
     --input-file arg : input file

The (=10) is meant to give default value. The only problem I've found is that
we need to specify empty default value string for std::vector, which leads to
code like this:

    ("second", value< vector<int > >()->default_value(vector<int>(1, 1), ""))

Ok, maybe we just need 'vector_value' function which will take care of default

Please consider this change experimental... we need to see if any problems
will show up.

- Volodya

Boost list run by bdawes at, gregod at, cpdaniel at, john at