This might work: this(U)(U obj) if(is(U : T) && !is(U == typeof(null))) { }- Jonathan M Davis
Interesting. With or wihtout that, if i add a method to Foo it prints "Stack overflow" also.
http://dpaste.dzfl.pl/91dad66c Can you explain that?
This might work: this(U)(U obj) if(is(U : T) && !is(U == typeof(null))) { }- Jonathan M Davis
Interesting. With or wihtout that, if i add a method to Foo it prints "Stack overflow" also.
http://dpaste.dzfl.pl/91dad66c Can you explain that?