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

Yusuke Suzuki ysuzuki at apple.com
Mon Dec 6 14:36:43 PST 2021


I recently upgraded GCC requirement to 8.3.0 based on https://trac.webkit.org/wiki/WebKitGTK/GCCRequirement <https://trac.webkit.org/wiki/WebKitGTK/GCCRequirement> (https://trac.webkit.org/changeset/283348/webkit <https://trac.webkit.org/changeset/283348/webkit>)
As a result, we can use some of C++20 features.
I wonder if we can flip C++20 now. While some of C++20 features cannot be used since GCC 8.3.0 does not support, but some of features can be used, and it is super useful.
One of the good features is initializer for bit-fields, which can avoid uninitialized bit-field bugs.

class A {
    bool m_test : 1 : { false };
};

-Yusuke

> On Dec 6, 2021, at 12:52 PM, Alex Christensen via webkit-dev <webkit-dev at lists.webkit.org> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20211206/de8251af/attachment.htm>


More information about the webkit-dev mailing list