[webkit-dev] Using C++20 in WebKit

Carlos Alberto Lopez Perez clopez at igalia.com
Tue Dec 7 14:02:42 PST 2021


On 06/12/2021 20:52, Alex Christensen via webkit-dev wrote:
> In April 2019 in https://bugs.webkit.org/show_bug.cgi?id=197131
> <https://bugs.webkit.org/show_bug.cgi?id=197131> I increased WebKit’s
> minimum C++ language requirement from C++14 to C++17.  In 2022 I’m
> planning to increase WebKit’s minimum C++ requirement from C++17 to
> C++20.  Would April 2022 be a good time to do that?
> 
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
> 



According to the WebKitGTK Dependencies policy [1], we have to support
GCC-8 until August 2022. But we would like, if possible, to support it
until October 2022 which is when we will branch for doing the 2.38.x
releases. That way we can do one more official release supporting GCC-8.

Then, after October 2022 we can raise the minimum GCC requirement to
GCC-9. On April 2023 we can raise the minimum GCC requirement to GCC-10
and so on.

So this will be the timeline of minimum versions required that would fit
our policy:

 - Now until October 2022 -> GCC-8
 - October 2022 - April 2023 -> GCC-9
 - April 2023 - 2024 -> GCC-10


Depending on the minimum GCC version required some C++-20 features can
be used. You can check those on this "C++20 Language Features" table [2]

Some examples that were brought here:

 - initializer for bit-fields -> GCC-8 (so that can be used already now)
 - coroutines -> GCC-10 (will have to wait until April 2023)

Regards!
--------

[1] https://trac.webkit.org/wiki/WebKitGTK/GCCRequirement
[2] https://gcc.gnu.org/projects/cxx-status.html


More information about the webkit-dev mailing list