<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 16, 2009, at 12:47 PM, Anders Carlsson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 3, 2009, at 10:07 AM, Sebastian Redl wrote:</div><blockquote type="cite"><div><font class="Apple-style-span" color="#000000"><br></font>Without understanding your motive for wrapping a reference, I cannot say.<br>But the move security should be preserved if you wrap an object instead.<br></div></blockquote></div><div><br></div></div>
<span><textmate stdin DgA6VZ.txt></span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br><div>Here's a patch that makes FullExprArg wrap an object instead. </div><div><br></div><div>One idea I have is to make FullExprArg just be a smart pointer style wrapper around FullExpr, so we don't have to duplicate the ExprArg API.</div><div><br></div><div>Comments, thoughts?</div></div></div></blockquote><div><br></div><div>This is one ugly const_cast...</div><div><br></div><div>+    FullExprArg(const FullExprArg& Other)</div><div>+      : Expr(move(const_cast<FullExprArg&>(Other).Expr)) {}</div><div><br></div><div>but, since this will be so much nicer with rvalue references (eventually), I think we can cope with the ugliness for now, since the alternative is a lot of code duplicating. Please put in a FIXME noting that this is could/should be tightened up at some point.</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">      </span>- Doug</div></div></body></html>