On Mon, 25 Mar 2013 11:31:17 -0400, Ali Çehreli <[email protected]> wrote:
This design allows templated constructors:
struct S // <-- not a template
{
this(T)(T t) // <-- template
{
// ...
}
// ...
}
The same in C++...
Templated constructors would not be disallowed if you allowed IFTI on
templated structs/classes without templated constructors.
When you decompose constructors, they are simply fucntions, and IFTI
exists on functions. The same should be allowed for constructors.
There is almost no difference between this:
template foo(T){
void foo(T t) {}
}
and this:
struct foo(T){
this(T t) {}
}
-Steve