<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/c-insights-episode-77-rvo-nrvo-std-move-explained-jyxuxt35e" -->

---
title: C++ Insights Episode 77: RVO, NRVO, std::move EXPLAINED
description: 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...
canonical: https://daily.dev/posts/c-insights-episode-77-rvo-nrvo-std-move-explained-jyxuxt35e
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: C++ Insights Episode 77: RVO, NRVO, std::move EXPLAINED | daily.dev
og:description: 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...
og:url: https://daily.dev/posts/c-insights-episode-77-rvo-nrvo-std-move-explained-jyxuxt35e
og:image: https://api.daily.dev/og/posts/JyXUXt35E.png
og:image:alt: C++ Insights Episode 77: RVO, NRVO, std::move EXPLAINED
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.

# 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

- [Move in C\+\+ without a std::move](https://daily.dev/posts/move-in-c-without-a-std-move-dfcqdf7pw) · Andreas Fertig · 0 upvotes · 0 comments
- [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)

```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":"C++ Insights Episode 77: RVO, NRVO, std::move EXPLAINED","url":"https://daily.dev/posts/c-insights-episode-77-rvo-nrvo-std-move-explained-jyxuxt35e","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/c-insights-episode-77-rvo-nrvo-std-move-explained-jyxuxt35e"},"datePublished":"2026-08-19T06:20:01.672Z","dateModified":"2026-08-19T06:20:16.633Z","description":"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...","image":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","thumbnailUrl":"https://media.daily.dev/image/upload/s--VDukGCjf--/f_auto/v1722860399/public/Placeholder%2002","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/c-insights-episode-77-rvo-nrvo-std-move-explained-jyxuxt35e","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"c++,compiler-optimization","timeRequired":"PT1M"}
{"@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":"C++ Insights Episode 77: RVO, NRVO, std::move EXPLAINED"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/c-insights-episode-77-rvo-nrvo-std-move-explained-jyxuxt35e#faq","mainEntity":[{"@type":"Question","name":"When should I use std::move when returning a value from a C++ function?","acceptedAnswer":{"@type":"Answer","text":"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."}}]}
```

