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

Alex Christensen achristensen at apple.com
Mon Dec 6 15:07:06 PST 2021


I’m also excited about using coroutines in WebKit.  If there is already a GCC requirement for using a compiler that supports C++20, is there a reason not to switch from C++17 to C++20 later in 2021?

> On Dec 6, 2021, at 2:36 PM, Yusuke Suzuki <ysuzuki at apple.com> wrote:
> 
> 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 <mailto: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 <mailto: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/6b39986c/attachment.htm>


More information about the webkit-dev mailing list