stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Lemings" <Eric.Lemi...@roguewave.com>
Subject RE: Forward iteration in variadic templates
Date Mon, 14 Jul 2008 20:29:20 GMT
 

> -----Original Message-----
> From: Eric Lemings 
> Sent: Monday, July 14, 2008 2:27 PM
> To: 'dev@stdcxx.apache.org'
> Subject: Forward iteration in variadic templates
> 
> 
> 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

...and its corresponding index...

> in the 
> argument list (e.g. std::cout << X)?
> 
> Thanks,
> Brad.
> 

Mime
View raw message