<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/move-in-c-without-a-std-move-dfcqdf7pw" -->

---
title: Move in C++ without a std::move | daily.dev
description: A deep dive into implicit move semantics in C++ explains how return value optimization (RVO/NRVO) and guaranteed copy elision since C++17 minimize copy and...
canonical: https://daily.dev/posts/move-in-c-without-a-std-move-dfcqdf7pw
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Move in C++ without a std::move | daily.dev
og:description: A deep dive into implicit move semantics in C++ explains how return value optimization (RVO/NRVO) and guaranteed copy elision since C++17 minimize copy and...
og:url: https://daily.dev/posts/move-in-c-without-a-std-move-dfcqdf7pw
og:image: https://api.daily.dev/og/posts/dFCqdf7pw.png
og:image:alt: Move in C++ without a std::move
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Move in C++ without a std::move

**[Andreas Fertig](https://daily.dev/sources/andreasfertig)** · 3 min read · 0 upvotes · 0 comments

## Summary

A deep dive into implicit move semantics in C++ explains how return value optimization (RVO/NRVO) and guaranteed copy elision since C++17 minimize copy and move operations. It covers edge cases where functions returning rvalue reference parameters historically required a manual std::move to avoid a copy (or, with less-conforming compilers like Clang, got a move anyway), and notes that GCC gives a copy while Clang gives a move in pre-C++20 code. Starting with C++23, both problematic cases now perform an implicit move automatically, eliminating the need for explicit std::move calls in these scenarios.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://andreasfertig.com/blog/2026/09/move-in-cpp-without-a-stdmove>

## Questions this post answers

### Does C++23 change how functions returning an rvalue reference parameter behave regarding copies and moves?

Yes, starting with C++23, functions that take an rvalue reference parameter and return that same reference now perform an implicit move automatically. Before C++23, this pattern either required a manual std::move to compile in some cases, or produced an unwanted copy construction under conforming compilers like GCC, while Clang inconsistently produced a move instead.

_Track compiler-specific move semantics quirks like this one before upgrading C++ codebases, using daily.dev._

### Why does GCC copy but Clang move when a function returns an rvalue reference parameter in older C++ standards?

Before C++20, taking an rvalue reference parameter and returning the same object triggers a copy construction under a standards-conforming compiler such as GCC, whereas the less strictly conforming Clang instead performs a move construction in that same scenario. This discrepancy existed prior to C++23, which later made an implicit move the guaranteed behavior for both compilers.

_Comparing compiler behavior on move semantics like this helps C++ developers deciding which toolchain to trust, via daily.dev._

## Similar posts on daily.dev

- [C\+\+ Insights Episode 77: RVO, NRVO, std::move EXPLAINED](https://daily.dev/posts/c-insights-episode-77-rvo-nrvo-std-move-explained-jyxuxt35e) · Andreas Fertig · 0 upvotes · 0 comments
- [std::move doesn't move anything: A deep dive into Value Categories](https://daily.dev/posts/std-move-doesn-t-move-anything-a-deep-dive-into-value-categories-hbbu5zmdc) · Hacker News · 1 upvotes · 0 comments

---

Tags: [#c++](https://daily.dev/tags/c++), [#compiler-optimization](https://daily.dev/tags/compiler-optimization)

[View this post on daily.dev](https://daily.dev/posts/move-in-c-without-a-std-move-dfcqdf7pw)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Move in C++ without a std::move","url":"https://daily.dev/posts/move-in-c-without-a-std-move-dfcqdf7pw","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/move-in-c-without-a-std-move-dfcqdf7pw"},"datePublished":"2026-09-01T11:17:30.655Z","dateModified":"2026-09-01T11:17:52.911Z","description":"A deep dive into implicit move semantics in C++ explains how return value optimization (RVO/NRVO) and guaranteed copy elision since C++17 minimize copy and...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9121d5324aec916a93cc3d09d9349388?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9121d5324aec916a93cc3d09d9349388?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Andreas Fertig","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Andreas Fertig","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/3721178188164a95922fd3c9970bcab7","url":"https://daily.dev/sources/andreasfertig"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/move-in-c-without-a-std-move-dfcqdf7pw","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c++,compiler-optimization","timeRequired":"PT3M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Andreas Fertig","item":"https://daily.dev/sources/andreasfertig"},{"@type":"ListItem","position":3,"name":"Move in C++ without a std::move"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/move-in-c-without-a-std-move-dfcqdf7pw#faq","mainEntity":[{"@type":"Question","name":"Does C++23 change how functions returning an rvalue reference parameter behave regarding copies and moves?","acceptedAnswer":{"@type":"Answer","text":"Yes, starting with C++23, functions that take an rvalue reference parameter and return that same reference now perform an implicit move automatically. Before C++23, this pattern either required a manual std::move to compile in some cases, or produced an unwanted copy construction under conforming compilers like GCC, while Clang inconsistently produced a move instead. Track compiler-specific move semantics quirks like this one before upgrading C++ codebases, using daily.dev."}},{"@type":"Question","name":"Why does GCC copy but Clang move when a function returns an rvalue reference parameter in older C++ standards?","acceptedAnswer":{"@type":"Answer","text":"Before C++20, taking an rvalue reference parameter and returning the same object triggers a copy construction under a standards-conforming compiler such as GCC, whereas the less strictly conforming Clang instead performs a move construction in that same scenario. This discrepancy existed prior to C++23, which later made an implicit move the guaranteed behavior for both compilers. Comparing compiler behavior on move semantics like this helps C++ developers deciding which toolchain to trust, via daily.dev."}}]}
```

