Why can't templates use tuples for for argument types?

Jarrett Billingsley kb3ctd2 at yahoo.com
Wed Jul 18 17:04:05 PDT 2007


"Bill Baxter" <dnewsgroup at billbaxter.com> wrote in message 
news:f7m9k9$es4$1 at digitalmars.com...
> Rather than proposing a bunch of new syntax, isn't the solution just to 
> make those things work as expected?  If you want at least one thing it 
> seems perfectly reasonable to me to do:
>
> template Foo(A, B...) {
>    alias Tuple!(A,B) ArgTuple;
>    ...
> }

Well the issue is that an identifier as a template parameter already has a 
well-defined meaning - it's a type parameter.  Changing it to allow anything 
seems awfully scary, hence the suggestions for new syntax. 




More information about the Digitalmars-d-learn mailing list