Why can't I have overloading and generics?

David d at dav1d.de
Sat Mar 10 01:39:28 PST 2012


You can strip

 > ref A foo(T)(T item) if (is(T==B)) {

down to:

ref A foo(T : B)(T item) // or to match your example
ref A foo(T == B)(T item)


More information about the Digitalmars-d-learn mailing list