http://d.puremagic.com/issues/show_bug.cgi?id=7177
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #30 from [email protected] 2013-03-21 12:56:04 PDT --- (In reply to comment #16) > The idea in comment #11 is interesting, but one problem point is that current > compiler does not see UFCS fallback for operator overloading. > Making this work enables transparent introduction of the opDollar requirement for eg. finite RandomAccessRanges. > If we accept it, should we also accept this? > > string opBinary(string op)(string s1, string s2) if (op == "+") { > return s1 ~ s2; > } > void main() { > assert("hello " + "world!" == "hello world!"); > // --> "hello ".opBinary!"+"("world!") // op-overloading > // --> .opBinary!"+"("hello ", "world!") // UFCS > } IMO yes. In any case, there is nothing in the spec that would indicate that it does not work. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
