c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\dom\Document.cpp(1570): error C2446: ':': no conversion from 'WebCore::Document::updateTitleElement::<lambda_16b62001404c23de7212dde0d19dd8c0>' to 'WebCore::Document::updateTitleElement::<lambda_8c64903d313d33c5fcf4c4945dc4e7bd>' (compiling source file C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\dom\DOMAllInOne.cpp) [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj] c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\dom\Document.cpp(1570): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called (compiling source file C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\dom\DOMAllInOne.cpp) c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\dom\Document.cpp(1571): error C2446: ':': no conversion from 'WebCore::Document::updateTitleElement::<lambda_b90aca9775183a3a847bb0f92fa5dde7>' to 'WebCore::Document::updateTitleElement::<lambda_5bf19252f147055cda21dc9527885b1b>' (compiling source file C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\dom\DOMAllInOne.cpp) [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj] c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\dom\Document.cpp(1571): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called (compiling source file C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\dom\DOMAllInOne.cpp) c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\dom\Document.cpp(1572): error C2446: ':': no conversion from 'WebCore::Document::updateTitleElement::<lambda_7d10b9bb64b9bf807f86fa41f4b56cfc>' to 'WebCore::Document::updateTitleElement::<lambda_a2b965e941c6d63acb9048aedb2d8536>' (compiling source file C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\dom\DOMAllInOne.cpp) [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj] c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\dom\Document.cpp(1572): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called (compiling source file C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\dom\DOMAllInOne.cpp) c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\dom\Document.cpp(1574): error C2064: term does not evaluate to a function taking 1 arguments (compiling source file C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\dom\DOMAllInOne.cpp) [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj] c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\dom\Document.cpp(1581): error C2064: term does not evaluate to a function taking 1 arguments (compiling source file C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\dom\DOMAllInOne.cpp) [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj] c:\cygwin\home\buildbot\slave\win-release\build\source\webcore\dom\Document.cpp(1585): error C2064: term does not evaluate to a function taking 1 arguments (compiling source file C:\cygwin\home\buildbot\slave\win-release\build\Source\WebCore\dom\DOMAllInOne.cpp) [C:\cygwin\home\buildbot\slave\win-release\build\WebKitBuild\Release\Source\WebCore\WebCore.vcxproj]
Created attachment 319915 [details] Patch
Created attachment 319916 [details] Patch
This has already been fixed.
I am seeing this compile error again, now.
Comment on attachment 319916 [details] Patch This change makes things less efficient and less elegant. But maybe there is no other way to work around the limitations of the Windows compiler.
Comment on attachment 319916 [details] Patch A better way to work around this unfortunate limitation of the Windows compiler it is to convert all 6 of the lambdas into plain old functions, outside Document::updateTitleElement, just local functions like: static Element* findHTMLTitle(Document& document) { }
(In reply to Darin Adler from comment #6) > Comment on attachment 319916 [details] > Patch > > A better way to work around this unfortunate limitation of the Windows > compiler it is to convert all 6 of the lambdas into plain old functions, > outside Document::updateTitleElement, just local functions like: > > static Element* findHTMLTitle(Document& document) > { > } Thanks for reviewing! I will update the patch.
Created attachment 320034 [details] Patch
Comment on attachment 320034 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320034&action=review > Source/WebCore/dom/Document.cpp:1567 > +static bool isSVGTitle(Element& element) > +{ > + return is<SVGTitleElement>(element); Can we not just use is<SVGTitleElement> where we use isSVGTitle instead of making a wrapper? Same with isHTMLTitle
Committed r221684: <https://trac.webkit.org/changeset/221684/webkit>
(In reply to Alex Christensen from comment #9) > Comment on attachment 320034 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=320034&action=review > > > Source/WebCore/dom/Document.cpp:1567 > > +static bool isSVGTitle(Element& element) > > +{ > > + return is<SVGTitleElement>(element); > > Can we not just use is<SVGTitleElement> where we use isSVGTitle instead of > making a wrapper? Same with isHTMLTitle isSVGTitle and isHTMLTitle is only used when assigning one of the function pointers to a local variable, I don't think we can use is<SVGTitleElement> there, if I understand you correctly? Thanks for reviewing!
Comment on attachment 320034 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=320034&action=review >>> Source/WebCore/dom/Document.cpp:1567 >>> + return is<SVGTitleElement>(element); >> >> Can we not just use is<SVGTitleElement> where we use isSVGTitle instead of making a wrapper? Same with isHTMLTitle > > isSVGTitle and isHTMLTitle is only used when assigning one of the function pointers to a local variable, I don't think we can use is<SVGTitleElement> there, if I understand you correctly? > > Thanks for reviewing! I think we can use is<SVGTitleElement> and is<HTMLTitleElement>. Those are functions--template functions are functions--and can be turned into function pointers. Did you try it?
(In reply to Darin Adler from comment #12) > Comment on attachment 320034 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=320034&action=review > > >>> Source/WebCore/dom/Document.cpp:1567 > >>> + return is<SVGTitleElement>(element); > >> > >> Can we not just use is<SVGTitleElement> where we use isSVGTitle instead of making a wrapper? Same with isHTMLTitle > > > > isSVGTitle and isHTMLTitle is only used when assigning one of the function pointers to a local variable, I don't think we can use is<SVGTitleElement> there, if I understand you correctly? > > > > Thanks for reviewing! > > I think we can use is<SVGTitleElement> and is<HTMLTitleElement>. Those are > functions--template functions are functions--and can be turned into function > pointers. Did you try it? Yes, I tried it, but this also gave compile errors. MSVC was not able to resolve, since is<> has several overloads.
I thought of another way to write this that would be slightly more elegant. Working on a patch for that.
<rdar://problem/34373638>