[libcxx-commits] [libcxx] [libc++] Fix UB in <expected> related to "has value" flag (#68552) (PR #68733)
Jan Kokemüller via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 30 03:27:43 PDT 2023
================
@@ -129,7 +129,7 @@ constexpr bool test() {
std::expected<TrackedMove<true>, TrackedMove<false>> e1(std::in_place, 5);
std::expected<TrackedMove<true>, TrackedMove<false>> e2(std::unexpect, 10);
- e1.swap(e2);
+ swap(e1, e2);
----------------
jiixyj wrote:
I found three places where a member swap was used in the "free.swap" tests. Is fixing this in this PR OK?
https://github.com/llvm/llvm-project/pull/68733
More information about the libcxx-commits
mailing list