[libcxx-commits] [libcxx] [libc++] Add `__exchange` as a C++11 utility (PR #187953)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Apr 4 23:30:56 PDT 2026
frederick-vs-ja wrote:
I think the original patch was (or at least can be made) correct. But IMO it was already shown that 2-argument `__exchange` was a bit inconvenient for our internal uses.
If the 2nd argument passed to `__exchange` would be equivalent to `_T1()` in most cases, I think it's clearer and less error prone to introduce a new helper function to avoid typing the 2nd argument.
https://github.com/llvm/llvm-project/pull/187953
More information about the libcxx-commits
mailing list