Variadic templates

Lionello Lunesu lio at lunesu.remove.com
Sat Nov 4 00:20:37 PST 2006


Walter Bright wrote:
> Knud Sørensen wrote:
>> Will something like this be possible ??
>>
>> tuple t=(7, 'a', 6.8);
> 
> Something like that.
> 
>>  print at t; // for print(7, 'a', 6.8)
> 
> It would be:
>     print(t);

What about the comma operator? It would be perfect for creating tuples, 
and very consistent with the way functions are called. For example 
print(7,'a',6.8) passes to tuple (7,'a',6.8) to the function print.

L.



More information about the Digitalmars-d mailing list