Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 4040e34eb77ce64f6b7e8d1b72c92875eea6ed53 https://github.com/WebKit/WebKit/commit/4040e34eb77ce64f6b7e8d1b72c92875eea6ed53 Author: Alex Christensen <achristen...@apple.com> Date: 2025-07-30 (Wed, 30 Jul 2025)
Changed paths: M Source/WTF/wtf/StdLibExtras.h M Source/WTF/wtf/Vector.h M Source/WebCore/dom/Element.cpp M Source/WebCore/html/HTMLTemplateElement.cpp Log Message: ----------- Get 298038@main compiling with GCC https://bugs.webkit.org/show_bug.cgi?id=296705 rdar://157131936 Reviewed by Abrar Rahman Protyasha. In order to get WTF::map to work with a std::span<const Attribute> as input, we need something like std::forward_like that doesn't apply the constness of the first template parameter to the second template parameter. The second template parameter should keep its constness. Otherwise, we get lots of compiler errors, especially in our use of copyToVectorOf<Ref<T>> from const collections of non-const members, such as this in SVGElement.cpp: copyToVectorOf<Ref<SVGElement>>(instances()) I'm still not completely sure why this worked with clang but not gcc, but std::enable_if<std::is_rvalue_reference<SourceType&&> is suspicious, and gcc said we were calling WTFMove with a const parameter. Removing the enable_if in Mapper made it work with both compilers. * Source/WTF/wtf/StdLibExtras.h: (WTF::forward_like_non_const): * Source/WTF/wtf/Vector.h: (WTF::Mapper::map): * Source/WebCore/dom/Element.cpp: (WebCore::Element::serializeNode const): * Source/WebCore/html/HTMLTemplateElement.cpp: (WebCore::HTMLTemplateElement::serializeNode const): Canonical link: https://commits.webkit.org/298052@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes