<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 24 April 2017 at 18:36, Ola Fosheim Grøstad via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Monday, 24 April 2017 at 04:21:36 UTC, Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Now, I'm not saying that rval references are the only solution here, just that I can overload the construction from an X for the rvalue and non-rvalue case, which is what I want...<br>
</blockquote>
<br></span>
What I've done in the past is simply to create a movable_ref pointer-type. AFAICT that would be similar to C++ "&&" except it isn't downgraded when used as a parameter (which is a language feature). C++ provide that downgrading so that programmers don't accidentally forward a reference as a movable reference without making it explicit.<br></blockquote><div><br></div><div>I've done that too, but that's a seriously shit solution.</div><div>You didn't comment on any of my actual questions ;)</div></div></div></div>