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

Don Clugston dac at nospam.com.au
Tue Jul 17 05:51:04 PDT 2007


BCS wrote:
> |template Types(A...)
> |{
> |  template Values(A a)
> |  {
> |  }
> |}
> |
> |alias Types!(int, bool, int[]).Values!(1,true,[1,2,3]) bob;

int [] is not an allowed as a template value parameter. Only char[], wchar[], 
dchar[], integers, and floating-point types can be template value parameters.
(In C++, only integers are allowed).


More information about the Digitalmars-d-learn mailing list