incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Lemings" <>
Subject Forward iteration in variadic templates
Date Mon, 14 Jul 2008 20:26:36 GMT

Consider the following function:

template <class... Types>
void print (const Types&... values);

How would you define print() to iterate forward from 0..N, where N is
sizeof... (Types), printing each argument X in the argument list (e.g.
std::cout << X)?


View raw message