http://d.puremagic.com/issues/show_bug.cgi?id=10574
--- Comment #6 from monarchdo...@gmail.com 2013-07-11 10:18:31 PDT --- (In reply to comment #5) > (In reply to comment #3) > > > That's exactly the current compiler's behavior. "auto ref" always behave as > > "ref" parameter against lvalue argument `i`, then T[] cannot deduce type T > > from > > immutable(int[]). > > To the user, auto ref should really mean "use ref if possible, otherwise do > not" > > In other words, I think auto ref should be the equivalent of having two > identical templates, one with ref, and one without. Because IFTI can do some > implicit casting, and implicit casting changes lvalues to rvalues, I think the > rule is incorrect. For the record (without putting any words in Kenji's mouth), I think he was just stating what the compiler was *doing*, and why the code was rejected. I don't think he meant to say that the current behavior was correct. Kenji, could you confirm that this is what you meant? That this is a correct "rejects-valid" ? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------