---
title: "C++ Insights Episode 77: RVO, NRVO, std::move EXPLAINED"
url: https://daily.dev/posts/c-insights-episode-77-rvo-nrvo-std-move-explained-jyxuxt35e
source_url: https://andreasfertig.com/blog/2026/08/cpp-insights-episode-77-rvo-nrvo-stdmove-explained
type: article
source: "Andreas Fertig"
published: 2026-08-19T06:20:01.672Z
updated: 2026-08-19T06:20:16.633Z
tags: ["c++", "compiler-optimization"]
reading_time: 1
upvotes: 0
comments: 0
language: 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.

# C++ Insights Episode 77: RVO, NRVO, std::move EXPLAINED

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

## Summary

A video episode explains how return value optimization (RVO) and named return value optimization (NRVO) work in C++, and clarifies when std::move should and shouldn't be used when returning values from functions.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://andreasfertig.com/blog/2026/08/cpp-insights-episode-77-rvo-nrvo-stdmove-explained>

## Questions this post answers

### When should I use std::move when returning a value from a C++ function?

Generally you should not use std::move on a local variable being returned, because it can suppress return value optimization or named return value optimization (NRVO), forcing a move instead of eliminating the copy entirely. The compiler already applies RVO/NRVO automatically in most cases, making an explicit std::move unnecessary and sometimes counterproductive.

_Developers sorting out move semantics pitfalls can find deeper C++ explainers curated on daily.dev._

## Similar posts on daily.dev

- [C\+\+ Insights Episode 74: Why move requires noexcept in C\+\+20](https://daily.dev/posts/c-insights-episode-74-why-move-requires-noexcept-in-c-20-uhelxmxyk) · 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/c-insights-episode-77-rvo-nrvo-std-move-explained-jyxuxt35e)
