Bug 238443

Summary: [GLIB] Build error in GraphicsContextState.cpp (error: no match for 'operator!=') in Ubuntu LTS after r291696
Product: WebKit Reporter: Diego Pino <dpino>
Component: New BugsAssignee: Diego Pino <dpino>
Status: RESOLVED FIXED    
Severity: Normal CC: aperez, lmoura, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch ews-feeder: commit-queue-

Diego Pino
Reported 2022-03-28 03:45:14 PDT
[GLIB] Build error in GraphicsContextState.cpp (error: no match for 'operator!=') in Ubuntu LTS after r291696
Attachments
Patch (3.66 KB, patch)
2022-03-28 03:47 PDT, Diego Pino
ews-feeder: commit-queue-
Patch (3.68 KB, patch)
2022-03-28 05:19 PDT, Diego Pino
ews-feeder: commit-queue-
Diego Pino
Comment 1 2022-03-28 03:47:27 PDT
Adrian Perez
Comment 2 2022-03-28 04:05:13 PDT
Comment on attachment 455896 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455896&action=review > Source/WebCore/platform/graphics/GraphicsTypes.h:90 > +} This cannot work, moving the function outside of the “class” block means that now there is no implicit “this”, and that no operator== is defined at all for CompositeMode. You need to leave this one as it was.
Diego Pino
Comment 3 2022-03-28 05:19:25 PDT
Diego Pino
Comment 4 2022-03-28 06:11:53 PDT
The build error from the Ubuntu LTS build bot was: ``` Source/WebCore/platform/graphics/GraphicsContextState.cpp:60:84: error: no match for ‘operator!=’ (operand types are ‘const WebCore::CompositeMode’ and ‘WebCore::CompositeMode’) 60 | changeFlags.set(change, !lastDrawingState || (*lastDrawingState).*property != this->*property); ``` https://build.webkit.org/#/builders/68/builds/12304/steps/8/logs/stdio
EWS
Comment 5 2022-03-28 10:05:21 PDT
Committed r291970 (248935@main): <https://commits.webkit.org/248935@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 455903 [details].
Radar WebKit Bug Importer
Comment 6 2022-03-28 10:06:16 PDT
Lauro Moura
Comment 7 2022-03-28 12:23:04 PDT
FTR, this seems to be related to changes to the C++20 equality/spaceship operators in GCC 10 Sample godbolt: https://godbolt.org/z/GWen331rM GCC C++20 support: https://gcc.gnu.org/projects/cxx-status.html#cxx20 Especially the following spec, first supported in gcc10: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1185r2.html#wording > A defaulted != operator function for a class C with parameters x and y is defined as deleted if > (snip list of cases where != would be deleted.) > Otherwise, the operator function yields (x == y) ? false : true if an operator == with the original order of parameters was selected, or (y == x) ? false : true otherwise. So, GCC >10 correctly defined the defaulted `!=` operator, while older GCC's needed them to be explicitly defined (like the patch did), as it did not implement this behavior.
Note You need to log in before you can comment on or make changes to this bug.