August 15, 2016
Just a small bug found while trying to generalize template parameter packs for C++11 support in Calypso (this is more intrusive that I would like, but I can't see any simple alternative to implementing it in DMD):

> if (i < nparams && (*tempdecl.parameters)[i].specialization())
>     buf.writeByte('H'); //

isn't correct when i and args get switched by:

> // Tuple va = isTuple(o);
> else if (va)
> {
>     assert(i + 1 == args.dim); // must be last one
>     args = &va.objects;
>     i = -cast(size_t)1;
> }

But this begs a question: why and how does some template instances end up with Tuple in their tiargs?

The presence of Tuple doesn't seem consistent with findBestMatch which expands Tuple tdtypes into multiple tiargs:

Having to deal with the two possible cases, one where Tuple are expanded, the other where they're aren't, makes adding support for multiple parameter packs much harder.

Any good reason for not wanting a Tuple-free tiargs?
dmd-internals mailing list