[Webkit-unassigned] [Bug 278281] New: [WTF] std::aligned_storage_t is deprecated in C++23

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 17 15:00:05 PDT 2024


https://bugs.webkit.org/show_bug.cgi?id=278281

            Bug ID: 278281
           Summary: [WTF] std::aligned_storage_t is deprecated in C++23
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Template Framework
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: ddkilzer at webkit.org

[WTF] std::aligned_storage_t is deprecated in C++23.

Explanation: <https://stackoverflow.com/questions/71828288/why-is-stdaligned-storage-to-be-deprecated-in-c23-and-what-to-use-instead>

Example build warnings:

In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource374.cpp:2:
In file included from Source/WebCore/platform/text/cf/HyphenationCF.cpp:31:
WebKitBuild/Release/usr/local/include/wtf/TinyLRUCache.h:84:10: error: 'aligned_storage_t' is deprecated [-Werror,-Wdeprecated-declarations]
   84 |     std::aligned_storage_t<sizeof(Entry), std::alignment_of_v<Entry>> m_cacheBuffer[capacity];
      |          ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource374.cpp:1:
In file included from Source/WebCore/WebCorePrefix.h:71:
In file included from /usr/include/c++/v1/functional:540:
In file included from /usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /usr/include/c++/v1/vector:339:
In file included from /usr/include/c++/v1/__memory/temp_value.h:15:
/usr/include/c++/v1/__type_traits/aligned_storage.h:102:25: note: 'aligned_storage_t' has been explicitly marked deprecated here
  102 | using aligned_storage_t _LIBCPP_DEPRECATED_IN_CXX23 = typename aligned_storage<_Len, _Align>::type;
      |                         ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource374.cpp:1:
In file included from Source/WebCore/WebCorePrefix.h:38:
In file included from /usr/include/c++/v1/cstddef:36:
/usr/include/c++/v1/__config:776:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX23'
  776 | #    define _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_DEPRECATED
      |                                         ^
/usr/include/c++/v1/__config:729:49: note: expanded from macro '_LIBCPP_DEPRECATED'
  729 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
      |                                                 ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource374.cpp:2:
In file included from Source/WebCore/platform/text/cf/HyphenationCF.cpp:31:
WebKitBuild/Release/usr/local/include/wtf/TinyLRUCache.h:84:10: error: 'aligned_storage_t' is deprecated [-Werror,-Wdeprecated-declarations]
   84 |     std::aligned_storage_t<sizeof(Entry), std::alignment_of_v<Entry>> m_cacheBuffer[capacity];
      |          ^
WebKitBuild/Release/usr/local/include/wtf/TinyLRUCache.h:84:10: note: in instantiation of template type alias 'aligned_storage_t' requested here
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource374.cpp:1:
In file included from Source/WebCore/WebCorePrefix.h:168:
In file included from WebKitBuild/Release/usr/local/include/wtf/text/AtomString.h:353:
In file included from WebKitBuild/Release/usr/local/include/wtf/text/StringConcatenate.h:33:
In file included from WebKitBuild/Release/usr/local/include/wtf/text/StringView.h:31:
In file included from WebKitBuild/Release/usr/local/include/wtf/RetainPtr.h:30:
WebKitBuild/Release/usr/local/include/wtf/NeverDestroyed.h:105:35: note: in instantiation of template class 'WTF::TinyLRUCache<WTF::AtomString, WTF::RetainPtr<const __CFLocale *>>' requested here
  105 |     typename std::aligned_storage<sizeof(T), std::alignment_of<T>::value>::type m_storage;
      |                                   ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource374.cpp:2:
Source/WebCore/platform/text/cf/HyphenationCF.cpp:43:81: note: in instantiation of template class 'WTF::NeverDestroyed<WTF::TinyLRUCache<WTF::AtomString, WTF::RetainPtr<const __CFLocale *>>>' requested here
   43 |         static NeverDestroyed<TinyLRUCache<AtomString, RetainPtr<CFLocaleRef>>> cache;
      |                                                                                 ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource374.cpp:1:
In file included from Source/WebCore/WebCorePrefix.h:71:
In file included from /usr/include/c++/v1/functional:540:
In file included from /usr/include/c++/v1/__functional/boyer_moore_searcher.h:27:
In file included from /usr/include/c++/v1/vector:339:
In file included from /usr/include/c++/v1/__memory/temp_value.h:15:
/usr/include/c++/v1/__type_traits/aligned_storage.h:102:25: note: 'aligned_storage_t' has been explicitly marked deprecated here
  102 | using aligned_storage_t _LIBCPP_DEPRECATED_IN_CXX23 = typename aligned_storage<_Len, _Align>::type;
      |                         ^
In file included from WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource374.cpp:1:
In file included from Source/WebCore/WebCorePrefix.h:38:
In file included from /usr/include/c++/v1/cstddef:36:
/usr/include/c++/v1/__config:776:41: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX23'
  776 | #    define _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_DEPRECATED
      |                                         ^
/usr/include/c++/v1/__config:729:49: note: expanded from macro '_LIBCPP_DEPRECATED'
  729 | #      define _LIBCPP_DEPRECATED __attribute__((__deprecated__))
      |                                                 ^
2 errors generated.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20240817/abad91e4/attachment.htm>


More information about the webkit-unassigned mailing list