do not click

Meeting C++ 2026   |  Online   |  Training   |  Books   |  Survey   |  Job fair   |  Advertising   |  Jobposting   |  Login

Meeting C++ 2026 - Not-so-trivial relocation in C++

Conference | Live Schedule | Talks | Get your ticket | Slides | Set your timezone

Not-so-trivial relocation in C++

Join session

Giuseppe D'Angelo

On Day 3 at 20:00 (CET/Berlin) in Track A [Saphir Room and online]

Trivial relocation is, informally, the ability to move an object from one place in memory to another by just copying its bytes, skipping the move constructor and destructor call that C++ normally requires. It is not a new idea: major C++ libraries (Qt, folly, BSL, EA-STL, and others) have relied on this pattern for more than twenty years to speed up container operations, and it has long been considered a natural candidate for standardization.

And yet, during the C++26 cycle, trivial relocation was approved by EWG; voted back; merged into the working draft; and then removed again. The result is that C++26 will ship without it.

This talk looks at what trivial relocation actually is, why people want it, and where it is already being used in production today. From there, we will explore why it turns out to be such a subtle feature to add to a language that already has copies and moves. We will touch on value semantics, the rule of five, relocate-only types, and on why people keep disagreeing about the answers.

By the end of the talk, you will have a clear picture of what trivial relocation is, what it costs to get right, and why a feature that sounds like a one-line optimization quietly touches so much of the language. You will also come away with a sharper understanding of value semantics in C++, and of the operations (copy, move, and now relocation) that give objects their identity as they travel through a program.

Please login to comment

Copyright Meetingcpp GmbH Imprint Privacy Policy