IFTI for constructors worth a DIP?

Dmitry Olshansky dmitry.olsh at gmail.com
Fri Mar 30 06:21:27 UTC 2018


I think it should be mostly stright-forward and we can get rid of 
“instantiator” functions to do IFTI.

The problem (I guess) is 2 type parameter lists, one of aggregate 
and the other of function:

struct Foo(T)
if (isSomeSuch!T)
{
     this(U)(T a, U u) if (isSomethindElse!U) {...}
     this(R)(T x, R r) if (yetAnother!U){ ... }
}

I believe in such a case compiler can as far as IFTI goes just 
consider a combined tuple of types.

Thoughts?


More information about the Digitalmars-d mailing list