[Issue 752] Assertion failure: 'e->type->ty != Ttuple' on line 4518 in file 'mtype.c'

BCS nothing at pathlink.com
Sun Dec 31 09:00:11 PST 2006


Walter Bright wrote:
> BCS wrote:
>> It would be vary handy to be able to make a member of a tuple be a 
>> tuple it's self. the perens might be a good way to denote this rather 
>> than the usual flattening.
> 
> There's no way to do that with the current tuple semantics.


I was thinking that could be a use for the extra perens

template tpl(V...)
{
	alias V tpl;
}

tpl!(a, (b, c), d);

tuple of three with a tuple of two as the second part.




p.s. while I'm thinking about features, while writing that parser 
generator (see my last post) I realized that allowing a template to 
mixin a specialization for a template and have it overload with other 
templates would be *vary* powerful. mixin and overload can already be 
done for a function by way of an alias.

I'd be interested in your thought on the subject.


More information about the Digitalmars-d-bugs mailing list