[libcxx-commits] [libcxx] [libc++] Inline fast path for`exception_ptr` copy constructor & destructor (PR #165909)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Thu Nov 6 07:21:46 PST 2025


================
@@ -110,6 +125,32 @@ class _LIBCPP_EXPORTED_FROM_ABI exception_ptr {
   friend _LIBCPP_EXPORTED_FROM_ABI void rethrow_exception(exception_ptr);
 };
 
+#  ifndef _LIBCPP_BUILDING_LIBRARY
+
+_LIBCPP_EXPORTED_FROM_LIB_INLINEABLE inline exception_ptr::exception_ptr(const exception_ptr& __other) _NOEXCEPT
----------------
philnik777 wrote:

With the `#ifdef` version mentioned above we can just inline these into the class body.

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


More information about the libcxx-commits mailing list