[libcxx-commits] [libcxx] [libcxx] Remove empty ~__no_destroy (PR #89882)

Vitaly Buka via libcxx-commits libcxx-commits at lists.llvm.org
Wed Apr 24 09:55:28 PDT 2024


================
@@ -29,33 +29,25 @@ struct __uninitialized_tag {};
 // initialization using __emplace.
 template <class _Tp>
 struct __no_destroy {
-  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI explicit __no_destroy(__uninitialized_tag) : __dummy_() {
-    if (__libcpp_is_constant_evaluated()) {
-      __dummy_ = char();
-    }
-  }
-  _LIBCPP_HIDE_FROM_ABI ~__no_destroy() {
-    // nothing
-  }
+  _LIBCPP_CONSTEXPR_SINCE_CXX14 _LIBCPP_HIDE_FROM_ABI explicit __no_destroy(__uninitialized_tag) {}
----------------
vitalybuka wrote:

done and reordered to have _LIBCPP_HIDE_FROM_ABI first for better text alignment and consistency with the rest of libcxx

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


More information about the libcxx-commits mailing list