On Sunday, 15 January 2017 at 23:25:25 UTC, Ryan wrote:
How would overloading work?
Overload resolution works based on function/method parameters,
not return types. In the example you gave the 3 get functions
are indistinguishable. If the template parameter was used for a
method parameter
On Sunday, 15 January 2017 at 20:33:30 UTC, Alexandru Ermicioi
wrote:
Currently doing so is allowed, though, it is impossible to call
implemented methods directly from implementation.
You should be able to do obj.Wr!(ubyte).get() too.
On Sunday, 15 January 2017 at 20:33:30 UTC, Alexandru Ermicioi
wrote:
Good day,
Given following code example, where a templated interface Wr,
and an implementation Im is present:
interface Wr(T) {
T get();
}
class Im(T : ubyte) : Wr!ubyte, Wr!ushort, Wr!string {
public T t;
On Sunday, 15 January 2017 at 20:33:30 UTC, Alexandru Ermicioi
wrote:
Good day,
Given following code example, where a templated interface Wr,
and an implementation Im is present:
From the standpoint of the compiler they are 3 distinct
interfaces, so all is good.
interface Wr(T) {
T