[libcxx-commits] [libcxx] [libcxx] [libcxxabi] Dont throw in make exception ptr if __cxa_init_primary_exception is available (PR #65534)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Oct 11 07:50:21 PDT 2023


================
@@ -51,11 +69,24 @@ class _LIBCPP_EXPORTED_FROM_ABI exception_ptr {
 template <class _Ep>
 _LIBCPP_HIDE_FROM_ABI exception_ptr make_exception_ptr(_Ep __e) _NOEXCEPT {
 #  ifndef _LIBCPP_HAS_NO_EXCEPTIONS
+#    if defined(LIBCXX_BUILDING_LIBCXXABI)
+  using _Ep2 = typename decay<_Ep>::type;
----------------
philnik777 wrote:

```suggestion
  using _Ep2 = __decay_t<_Ep>;
```


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


More information about the libcxx-commits mailing list