std::exchange Patterns: Fast, Safe, Expressive, and Probably Underused--Ben Deane

Do you know about it?

std::exchange Patterns: Fast, Safe, Expressive, and Probably Underused

by Ben Deane

From the article:

This blog post has been a long time in the making. I gave a lightning talk on std::exchange at CppCon 2017; Jonathan first asked me to write something about std::exchange in January 2019; now here we are in the strange days of the second half of 2020. But although much has changed in the outside world, I would guess that not much has changed in most C++ codebases and in the minds of many C++ programmers with respect to using std::exchange. It could still do with more publicity and more recognition of potential use cases...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.