[Issue 17346] Inconsistent l/rvalue overload resolution
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Apr 24 13:20:24 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17346
Steven Schveighoffer <schveiguy at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at yahoo.com
--- Comment #1 from Steven Schveighoffer <schveiguy at yahoo.com> ---
It does work with inout.
Perhaps the reason it doesn't work is because it might view calling Y1(x1_lval)
as Y1(cast(const)x1_lval)
which seems to be an rvalue. But clearly there is no double indirection here,
and if you remove the non-ref constructor, the const ref one is then chosen.
--
More information about the Digitalmars-d-bugs
mailing list