WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
238443
[GLIB] Build error in GraphicsContextState.cpp (error: no match for 'operator!=') in Ubuntu LTS after
r291696
https://bugs.webkit.org/show_bug.cgi?id=238443
Summary
[GLIB] Build error in GraphicsContextState.cpp (error: no match for 'operator...
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-
Details
Formatted Diff
Diff
Patch
(3.68 KB, patch)
2022-03-28 05:19 PDT
,
Diego Pino
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Diego Pino
Comment 1
2022-03-28 03:47:27 PDT
Created
attachment 455896
[details]
Patch
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
Created
attachment 455903
[details]
Patch
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
<
rdar://problem/90929679
>
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.
Top of Page
Format For Printing
XML
Clone This Bug