Summary: | MSVC reports "SVGPropertyAnimator.h(94): error C2839: invalid return type 'T *' for overloaded 'operator ->'" with /std:c++20 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Fujii Hironori <Hironori.Fujii> | ||||||||
Component: | Tools / Tests | Assignee: | Fujii Hironori <Hironori.Fujii> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | achristensen, darin, dino, don.olmstead, ews-watchlist, fmalita, gyuyoung.kim, pdr, sabouhallawa, schenney, sergio, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=233963 | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 233448 | ||||||||||
Attachments: |
|
Created attachment 447688 [details]
Patch
Comment on attachment 447688 [details]
Patch
auto*
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. https://developercommunity.visualstudio.com/t/error-c2839-invalid-return-type-t-for-overloaded-o/1620672 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]
Patch
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]. |
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'