| Summary: | Start taking advantage of C++20 default comparisons | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Darin Adler <darin> | ||||||||
| Component: | WebKit Misc. | Assignee: | Darin Adler <darin> | ||||||||
| Status: | ASSIGNED --- | ||||||||||
| Severity: | Enhancement | CC: | achristensen, alecflett, beidson, benjamin, cdumez, cgarcia, changseok, cmarcelo, dino, eric.carlson, esprehn+autocc, ews-watchlist, fmalita, fred.wang, glenn, gyuyoung.kim, hi, hta, jamesr, japhet, jer.noble, jfernandez, joepeck, jsbell, kangil.han, keith_miller, kondapallykalyan, luiz, macpherson, mark.lam, menard, mifenton, mmaxfield, msaboff, pangle, pdr, philipj, rego, saam, sabouhallawa, schenney, sergio, simon.fraser, svillar, tommyw, tonikitoo, tzagallo, webkit-bug-importer, ysuzuki | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Bug Depends on: | 233963, 256078 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Darin Adler
2022-01-09 09:42:38 PST
My first patch probably contains too much for one bug; should be landed in pieces Created attachment 448719 [details]
Patch
Created attachment 448885 [details]
Patch
Created attachment 448891 [details]
Patch
Unfortunately, our current GCC baseline is GCC 8.3.0, and I think default value comparisons are not supported in that GCC version... According to the https://trac.webkit.org/wiki/WebKitGTK/GCCRequirement, we can upgrade our GCC to 9 at April. So, we can start many features we strongly wanted! https://en.cppreference.com/w/cpp/compiler_support/20 (In reply to Yusuke Suzuki from comment #5) > Unfortunately, our current GCC baseline is GCC 8.3.0, and I think default > value comparisons are not supported in that GCC version... > According to the https://trac.webkit.org/wiki/WebKitGTK/GCCRequirement, we > can upgrade our GCC to 9 at April. So, we can start many features we > strongly wanted! > > https://en.cppreference.com/w/cpp/compiler_support/20 Looks like three way comparison is not in GCC until GCC 10, so I really wasted my time on that! Probably, right now, the best feature we can use is bitfield initializer :) https://en.cppreference.com/w/cpp/language/bit_field#Cpp20_Default_member_initializers_for_bit_fields @Darin Now, GCC gets 10.2, so this patch is unlocked :) Yes, I hope we can do everything from this patch, but probably not all at once! |