Boost logo

Boost Users :

Subject: Re: [Boost-users] [program_options][1.35] validating string value
From: michele.caini_at_[hidden]
Date: 2010-02-17 05:45:49


Using regex can help you, maybe?

----- Reply message -----
Da: "Soumen" <soumen78_at_[hidden]>
Data: mer, feb 17, 2010 11:40
Oggetto: [Boost-users] [program_options][1.35] validating string value
A: <boost-users_at_[hidden]>

Hi,

My option (say, "opt1") can take any of only few possible string type values
(say, "value1", "value2", "value3" and "value4"). Is there anyway to specify
this such that if any other value, say - "valueXX", is passed to "opt1", it
throws an error?

If yes, can someone point me to documentation or sample code snippet to show
how to do this?

Or, explicitly, checking against these possible values is my only option?

Regards,
~ Soumen

-- 
View this message in context: http://old.nabble.com/-program_options--1.35--validating-string-value-tp27621865p27621865.html
Sent from the Boost - Users mailing list archive at Nabble.com.
_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users



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