[libcxx-commits] [libcxx] [libc++] Add `__exchange` as a C++11 utility (PR #187953)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Apr 3 08:28:15 PDT 2026


ldionne wrote:

I think I don't quite understand @frederick-vs-ja 's comment here, I don't see the problem with the original version of the patch which used `std::__exchange`. IMO `std::__exchange` is what we want here: we have a standard version for the function and now we're just introducing a convenience internal version, which we have ample precedent for in the code base.

Is there a reason why the original patch was incorrect?

https://github.com/llvm/llvm-project/pull/187953


More information about the libcxx-commits mailing list