[libcxx-commits] [libcxx] [libc++] Fix __datasizeof_v for Clang17 and 18 in C++03 (PR #106832)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 3 10:38:45 PDT 2024


================
@@ -26,34 +26,22 @@
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-#if __has_keyword(__datasizeof) || __has_extension(datasizeof)
+// TODO: Enable this again once #94816 is fixed.
+#if (__has_keyword(__datasizeof) || __has_extension(datasizeof)) && 0
 template <class _Tp>
 inline const size_t __datasizeof_v = __datasizeof(_Tp);
 #else
-// NOLINTNEXTLINE(readability-redundant-preprocessor) This is https://llvm.org/PR64825
-#  if __has_cpp_attribute(__no_unique_address__)
 template <class _Tp>
 struct _FirstPaddingByte {
----------------
philnik777 wrote:

AFAICT it does. If you have any other ideas how this could break I'm all ears.

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


More information about the libcxx-commits mailing list