[program options] why is ->multitoken() not default for vector arguments?

Hi, I have code like bpo::options_description desc("Allowed options"); desc.add_options() ("help", "produce help message") ("file", bpo::value<std::string>(), ".sug file with graph description") ("new_edge", bpo::value<std::vector<unsigned>>()->multitoken(), "two numbers denoting the new edge"); I had to add the ->multitoken to make a command like ./clique_tester.exe --new_edge 1 2 --file bug1.sug ^^^^^^^^ work. This seems wierd. Why would I want a vector of values, yet only parse one of the trailing argument? Thanks -Thorsten

Vladimir Prus skrev:
I fail to see this evilness. Something like foo.exe --new_edge 1 --new_edge 2 is hardly readable. How can there be difficulties in parsing everything until the next --arg is reached? -Thorsten
participants (2)
-
Thorsten Ottosen
-
Vladimir Prus