On Wednesday, 25 May 2016 at 21:50:06 UTC, Jonathan M Davis wrote:
It's not an overloaded operator anymore at that point, and that
definitely fails to work for generic code, since not all
operators are overloaded operators. Free functions don't have
that problem.
Sorry to reiterate the previous post but is that really the case?
void FuncTemplate(...)(...) {
X.FreeFunc(Y);
}
import ModuleA; // contains FreeFunc
import ModuleB; // contains a conflicting FreeFunc overload
FuncTemplate!()(); // fails
Where is the difference with writing generic code with operators
(overloaded or not)?