I have two related questions:
-
What is the simplest way to allow passing a series of values, using Boost Program Options? My aim is to avoid
prog --opt 1 --opt 2 --opt 3
and haveprog --opt 1 2 3
instead. -
What is the simplest way to have an option that takes exactly two numbers, e.g.
prog --opt 137 42
?
(I don't need any "free" program parameters.)
Best Answer
This is a late answer but I hope it helps someone. You could easily use the same technique in item #1, except you need to add another validation on the number of items in your vector:
from rcollyer's example: