Closed mattgodbolt closed 4 years ago
Update: removing the required
and adding cardinality(1, std::numeric_limits<size_t>())
seems to do what I want. But it's not all that obvious :)
Would adding something like a at_least(1)
method that does the right thing be a good enough solution?
The following code:
when passed
./test a b c
gives the error:How might I set it to take any number of arguments? I saw the
cardinality()
call, but there's essentially no upper bound on the number of arguments. I could specify some arbitrary high limit, but I suspect I'm doing it wrong :)