[libcxx-commits] [libcxx] [libc++] Resolve LWG4439 and LWG4300 (PR #174257)
William Tran-Viet via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jan 2 19:28:37 PST 2026
================
@@ -175,6 +175,26 @@ constexpr bool test_swap_ref() {
}
return true;
}
+
+struct ADLSwap {
+ static inline bool called_adl_swap{false};
+
+ friend void swap(ADLSwap&, ADLSwap&) noexcept { called_adl_swap = true; }
----------------
smallp-o-p wrote:
Wouldn't the use of the `= delete` `swap` just fail to compile? Would we just be testing that it's a valid expression?
https://github.com/llvm/llvm-project/pull/174257
More information about the libcxx-commits
mailing list