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'
Created attachment 447688 [details]
Comment on attachment 447688 [details]
Created attachment 447691 [details]
Patch for landing
Thank you for the review.
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].
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.
Thank you for the feedback. Reopened.
I agree with Darin's feedback.
I created a repro and reported the bug to MSVC team.
Fujii just provide the full templated type here. Look at my WIP patch for the /permissive- to see what got me past this error
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.
Created attachment 450563 [details]
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].