Boost logo

Boost Users :

Subject: [Boost-users] [boost] [program options] Recommended way to specify a list of strings
From: Sanjit Jhala (sjhalaz_at_[hidden])
Date: 2009-12-21 17:45:08


Say I want to specify a list of servers via the boost program_options
library. Something like:
--total-servers N --server srv1 --server srv2 ... --server srvN

How would I do this? It doesn't look like multitoken would work for this
case, so would it be better for me to just have something like:
--total-servers N --serverlist srv1 srv2 ... srvN

and use a single string to store the serverlist and parse it myself?

-Sanjit



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