RESOLVED FIXED 234546
MSVC reports "SVGPropertyAnimator.h(94): error C2839: invalid return type 'T *' for overloaded 'operator ->'" with /std:c++20
https://bugs.webkit.org/show_bug.cgi?id=234546
Summary MSVC reports "SVGPropertyAnimator.h(94): error C2839: invalid return type 'T ...
Fujii Hironori
Reported 2021-12-20 21:30:56 PST
MSVC reports "SVGPropertyAnimator.h(94): error C2839: invalid return type 'T *' for overloaded 'operator ->'" with /std:c++20 > Source\WebCore\svg\properties\SVGPropertyAnimator.h(94): error C2839: invalid return type 'T *' for overloaded 'operator ->' > Source\WebCore\svg\properties\SVGPropertyAnimator.h(102): note: see reference to class template instantiation 'WebCore::SVGPropertyAnimator<AnimationFunction>' being compiled > Source\WebCore\svg\properties\SVGPropertyAnimator.h(94): error C2039: 'isSVGElement': is not a member of 'WTF::RefPtr'
Attachments
Patch (1.63 KB, patch)
2021-12-20 21:37 PST, Fujii Hironori
no flags
Patch for landing (1.63 KB, patch)
2021-12-20 23:17 PST, Fujii Hironori
no flags
Patch (1.94 KB, patch)
2022-02-01 13:35 PST, Fujii Hironori
no flags
Fujii Hironori
Comment 1 2021-12-20 21:37:59 PST
Alex Christensen
Comment 2 2021-12-20 22:46:33 PST
Comment on attachment 447688 [details] Patch auto*
Fujii Hironori
Comment 3 2021-12-20 23:17:27 PST
Created attachment 447691 [details] Patch for landing Thank you for the review.
EWS
Comment 4 2021-12-21 00:30:11 PST
Committed r287300 (245452@main): <https://commits.webkit.org/245452@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 447691 [details].
Radar WebKit Bug Importer
Comment 5 2021-12-21 00:31:19 PST
Darin Adler
Comment 6 2021-12-21 01:05:33 PST
Comment on attachment 447691 [details] Patch for landing This change is going in the opposite direction that our future code is going. Taking out the use of RefPtr because we know nothing is done between the call to parentElement and the call to computeCSSPropertyValue is absolutely *not* the theme of our modern code. Why does the use of RefPtr here not compile? We need to fix that, not remove smart pointers. To move in the direction of more secure code, we need to move to always using smart pointers for local variables.
Fujii Hironori
Comment 7 2021-12-21 02:25:44 PST
Thank you for the feedback. Reopened.
Alex Christensen
Comment 8 2021-12-21 15:07:06 PST
I agree with Darin's feedback.
Fujii Hironori
Comment 9 2021-12-23 13:02:15 PST
Don Olmstead
Comment 10 2021-12-24 19:24:50 PST
Fujii just provide the full templated type here. Look at my WIP patch for the /permissive- to see what got me past this error
Fujii Hironori
Comment 11 2021-12-26 13:06:17 PST
Yup. Your workaround seems the best (attachment 445038 [details]). I just wanted to confirm that this is MSVC bug and let them know before preparing a patch for WebKit.
Fujii Hironori
Comment 12 2022-02-01 13:35:29 PST
EWS
Comment 13 2022-02-01 14:49:05 PST
Committed r288913 (246653@main): <https://commits.webkit.org/246653@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 450563 [details].
Note You need to log in before you can comment on or make changes to this bug.