Boost logo

Boost Users :

Subject: [Boost-users] [program_option] how to say only certain strings are allowed as arguments?
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2010-03-04 15:49:59


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


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