Boost logo

Boost Users :

Subject: Re: [Boost-users] [program_option] how to say only certain strings are allowed as arguments?
From: Michele Caini (michele.caini_at_[hidden])
Date: 2010-03-05 03:59:01


Il 04/03/2010 21:49, Thorsten Ottosen ha scritto:
> Hi,
>
> Is there some way to say
>
> bpo::options_description desc("Allowed options");
> desc.add_options()
> ("method",
> bpo::value<std::string>()->allowed_values("foo")("bar"), "" )
>
> so I donøt have to reject the arguments manually?
>
> Thanks
>
> -Thorsten

Can you try using regex to cut off options?


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