cpp C++ std::exchange a = std::exchange(b, c) in C++ is like a, b = b, c in Python Usage Patterns Use std::exchange in move operations “Swap-and-iterate” pattern