<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: sprocketz</title><link>https://news.ycombinator.com/user?id=sprocketz</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Sun, 06 Sep 2026 18:17:49 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=sprocketz" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by sprocketz in "Move in C++ without a std:move"]]></title><description><![CDATA[
<p>My little trick is to think of them as "oh, I accidentally made an lvalue from an actual rvalue here because a name was introduced, so I need to cast (i.e move() or forward()) back to an rvalue again", that's why i have them as macros: MOVE_CAST and FORWARD_CAST defined as static_cast (also avoids blowing up compile times).
I never think in terms of "moving this object".</p>
]]></description><pubDate>Wed, 02 Sep 2026 14:51:43 +0000</pubDate><link>https://news.ycombinator.com/item?id=49537214</link><dc:creator>sprocketz</dc:creator><comments>https://news.ycombinator.com/item?id=49537214</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49537214</guid></item><item><title><![CDATA[New comment by sprocketz in "Move in C++ without a std:move"]]></title><description><![CDATA[
<p>I figured any half decent compiler already do plenty of flow and liveness analysis on everything for register allocation, dead code elimination and what not.<p>Maybe it's the guaranteed elision that makes it a problem, like you can't fail the analysis, but then maybe you go the rust route - fail to compile and urge the programmer to rewrite their code so it accepts it.<p>Make it opt in with [[must_elide]] so old code still works I guess.</p>
]]></description><pubDate>Wed, 02 Sep 2026 13:42:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=49536106</link><dc:creator>sprocketz</dc:creator><comments>https://news.ycombinator.com/item?id=49536106</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49536106</guid></item><item><title><![CDATA[New comment by sprocketz in "Move in C++ without a std:move"]]></title><description><![CDATA[
<p>And the most important idea: destructive moves.
Since C++ doesn't track lifetimes it has to leave the object in a "valid state" after a move and the destructor still runs which has to have a check if it should do something or not.</p>
]]></description><pubDate>Wed, 02 Sep 2026 13:06:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=49535620</link><dc:creator>sprocketz</dc:creator><comments>https://news.ycombinator.com/item?id=49535620</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49535620</guid></item><item><title><![CDATA[New comment by sprocketz in "Move in C++ without a std:move"]]></title><description><![CDATA[
<p>What is that makes NVRO so much more difficult to implement? Why couldn't they mandate that just like RVO?
Do compilers literally just special case a simple return statement of a direct construction or something?</p>
]]></description><pubDate>Wed, 02 Sep 2026 13:01:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=49535566</link><dc:creator>sprocketz</dc:creator><comments>https://news.ycombinator.com/item?id=49535566</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=49535566</guid></item></channel></rss>