10 std::size_t
const expected,
11 std::size_t
const nargs)
13 constexpr
auto maybe_plural = [](std::size_t
const nargs) {
14 return nargs == 1ull ?
"" :
"s";
16 constexpr
auto has_or_have = [](std::size_t
const nargs) {
17 return nargs == 1ull ?
"has" :
"have";
19 if (nargs != expected) {
20 std::ostringstream oss;
22 << nargs <<
" value" << maybe_plural(nargs) <<
' ' << has_or_have(nargs)
23 <<
" been provided for the parameter with key:\n" 25 <<
"which expects " << expected <<
" value" << maybe_plural(expected)
void check_nargs_for_bounded_sequences(std::string const &key, std::size_t expected, std::size_t provided)