Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-03-19 09:04:48


Neal D. Becker wrote:
> Why not a default validator?
> namespace po = boost::program_options;
>
> namespace boost { namespace program_options {
> template<typename T>
> void validator<T>::operator()(any& v, const vector<string>& xs)
> {
> }
> }}
>
> This solves my immediate problem, which is that (strangely) program_options
> has a validator for float but not for double.

I think it is addressed. You would just use

    value<double>()

and it should work. The previous version had explicit instantiation for some
types, but it no longer the case.

- Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk