http://d.puremagic.com/issues/show_bug.cgi?id=3969
Andrej Mitrovic <andrej.mitrov...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrov...@gmail.com --- Comment #1 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2012-12-20 15:37:13 PST --- We can collect all legal operators for opUnary, opBinary, etc, and statically reject those which aren't legal. However I think this can only work for simple cases, e.g.: bool opBinary(string op : "==", T)(T t) bool opBinary(string op, T)(T t) if (op == "==") bool opBinary(string op, T)(T t) if (isOpEquals!op) The 1st case is easy and doable. The 2nd case might be doable, but it depends on how complex the expression is. The 3rd case is off-hands, because there's no telling what isOpEquals does internally - or rather it could be hugely expensive to do anaylsis on the template instance. So is it worth having? I'm very fond of the idea personally, at least for case #1. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------