On 8/2/17 8:07 AM, Timoses wrote:
Hey,wondering whether it's possible to access the derived type from a function template in the base class or interface.this T does not seem to be working, I guess because it's a static function and this does not exists?!
Yep.
Any way I could accomplish this?
Move test outside the interface:
void test(C)(C c) if(is(C : I))
{
writeln(C.type.stringof);
}
Though, at that point, you don't need I. I'm assuming you have a more
complex real-world example.
-Steve
