In fact, you could simulate overloading of return values based on IFTI instantiation:void fooImpl(ref int retval, int x) { ... } void fooImpl(ref string retval, int x) { ... }T foo(T)(int x) { T t; fooImpl(t, x); return t; } int x = foo(1); string y = foo(2); -Steve
https://dpaste.dzfl.pl/7d8351fe2f07 What am I doing wrong?