From Jason Turner
Watch on YouTube

Summary

This episode explores four scenarios where using 'const' can have unexpected negative performance implications in C++. Jason demonstrates how 'const' can break move semantics in various contexts, causing unnecessary copies instead of efficient moves. The examples show how const qualification can interfere with return value optimization, move assignment, and the performance of containers storing objects with const members.

Resources

Tags