Antonio Piccolboni wrote:
If I can add my 2c, before switching to program_options I was using TCLAP (tclap.sourceforge.net/). The main reason for swtiching was to avoid relying on one-man-show libraries, so it's not a technical one and I am not in a position to do thorough comparison. One thing I noticed though, is that with program_options I have to specify the type of an argument twice, first with po::value<type>, then with vm["optname"].as<type>(). Not only it is verbose, but it is checked only runtime.
Really? I've never done this. I always used po::value<type> alone, and everything works fine for me. What is .as used for? For myself, what I would like to see is straightforward support for multiple-argument options, of the form: -x a b c -y d e The documentation suggests that this is possible, but does not seem to explain how. The documentation suggests that this is somehow unusual behaviour (and that each flag should have at most one argument) but I have seen numerous people asking about it on this mailing list. I don't remember seeing any explanation of how to do it on the mailing list, though. Paul