Bug 253377

Summary: Switch from WTF::Span to std::span
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: Web Template FrameworkAssignee: Diego Pino <dpino>
Status: RESOLVED FIXED    
Severity: Normal CC: dpino, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 237178    

Description David Kilzer (:ddkilzer) 2023-03-03 20:54:54 PST
Switch from WTF::Span to std::span.

Now that Apple's ports of WebKit are building with C++20, it can use std::span.

<rdar://103182220>
Comment 1 David Kilzer (:ddkilzer) 2023-03-03 21:24:12 PST
Pull request: https://github.com/WebKit/WebKit/pull/11058
Comment 2 EWS 2023-03-04 21:15:56 PST
Committed 261239@main (6d41b0f74b61): <https://commits.webkit.org/261239@main>

Reviewed commits have been landed. Closing PR #11058 and removing active labels.
Comment 3 Diego Pino 2023-03-05 22:11:09 PST
After this patch landed, WebKitGTK Debian Stable bot started failing with the following error:

```
../../Source/WebKit/Platform/IPC/StreamConnectionBuffer.h: In static member function ‘static constexpr size_t IPC::StreamConnectionBuffer::headerSize()’:
../../Source/WebKit/Platform/IPC/StreamConnectionBuffer.h:140:84: error: ‘max_align_t’ is not a member of ‘std’; did you mean ‘max_align_t’?
  140 |     static constexpr size_t headerSize() { return roundUpToMultipleOf<alignof(std::max_align_t)>(sizeof(Header)); }
      |                                                                                    ^~~~~~~~~~~
In file included from /usr/include/c++/10/bits/cxxabi_init_exception.h:38,
                 from /usr/include/c++/10/bits/exception_ptr.h:38,
                 from /usr/include/c++/10/exception:147,
                 from /usr/include/c++/10/new:41,
                 from /usr/include/c++/10/bits/stl_iterator.h:81,
                 from /usr/include/c++/10/bits/stl_algobase.h:67,
                 from /usr/include/c++/10/algorithm:61,
                 from /home/buildbot/worker/GTK-Linux-64-bit-Release-Debian-Stable-Build/build/Source/WebKit/WebKit2Prefix.h:60,
                 from <command-line>:
/usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:426:3: note: ‘max_align_t’ declared here
  426 | } max_align_t;
```
Comment 5 Diego Pino 2023-03-05 22:12:49 PST
Re-opening for pull request https://github.com/webkit/webkit/pull/11097
Comment 6 EWS 2023-03-05 22:42:50 PST
Committed 261255@main (d4e7ec025851): <https://commits.webkit.org/261255@main>

Reviewed commits have been landed. Closing PR #11097 and removing active labels.