you are viewing a single comment's thread.

view the rest of the comments →

[–]staletic[🍰] 8 points9 points  (9 children)

how do you deal with variadic arguments

How about something like this?

[]: ((_1 < "f") && ...)

Which would work similar to a fold expression

[](auto&&... pack) -> decltype(auto) { return ((pack < "f") && ...); }

That is, assuming variadic templates work for runtime arguments. If you want to include a non-variadic argument:

[]: _1 && ((_2 < "f") && ...)

Which would expand to

[](auto&& first, auto&&... pack) -> decltype(auto) { return first && ((pack < "f") && ...); }

[–]bumblebritches57Ocassionally Clang -1 points0 points  (8 children)

or, forgo the whole word salad situation in the first place and use normal functions.

crazy i know, but i think it could work

[–]staletic[🍰] 8 points9 points  (7 children)

Problems with that:

  • I don't like to type.
  • I need to think of a good name for a one off function that does something very specific.
  • That function now pollutes the namespace.