[libcxx-commits] [libcxx] [libc++] Add move constructor & assignment to `exception_ptr` (PR #164281)

Adrian Vogelsgesang via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 27 13:10:17 PDT 2025


================
@@ -88,10 +91,26 @@ class _LIBCPP_EXPORTED_FROM_ABI exception_ptr {
     return !(__x == __y);
   }
 
+  friend _LIBCPP_HIDE_FROM_ABI void swap(exception_ptr& __x, exception_ptr& __y) _NOEXCEPT {
+    void* __tmp = __x.__ptr_;
+    __x.__ptr_  = __y.__ptr_;
+    __y.__ptr_  = __tmp;
+  }
----------------
vogelsgesang wrote:

fixed

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


More information about the libcxx-commits mailing list