Skip to content

Commit

Permalink
Everywhere: Remove usages of template keyword with no parameter list
Browse files Browse the repository at this point in the history
These were made invalid with P1787, and Clang (19) trunk started warning
on them with llvm/llvm-project#80801.
  • Loading branch information
BertalanD committed Jun 4, 2024
1 parent 23428c0 commit 2fdc632
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion AK/HashMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class HashMap {
template<typename TUnaryPredicate>
bool remove_all_matching(TUnaryPredicate const& predicate)
{
return m_table.template remove_all_matching([&](auto& entry) {
return m_table.remove_all_matching([&](auto& entry) {
return predicate(entry.key, entry.value);
});
}
Expand Down
2 changes: 1 addition & 1 deletion AK/Variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ struct Variant
decltype(auto) downcast() const&
{
if constexpr (sizeof...(NewTs) == 1 && (IsSpecializationOf<NewTs, Variant> && ...)) {
return (*this).template downcast_variant(TypeWrapper<NewTs...> {});
return (*this).downcast_variant(TypeWrapper<NewTs...> {});
} else {
Variant<NewTs...> instance { Variant<NewTs...>::invalid_index, Detail::VariantConstructTag {} };
visit([&](auto const& value) {
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibIPC/Decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ ErrorOr<T> decode(Decoder& decoder)

for (size_t i = 0; i < size; ++i) {
auto value = TRY(decoder.decode<typename T::ValueType>());
vector.template unchecked_append(move(value));
vector.unchecked_append(move(value));
}

return vector;
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibRegex/RegexMatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ RegexResult Matcher<Parser>::match(Vector<RegexStringView> const& views, Optiona
matches.resize(m_pattern->parser_result.capture_groups_count + 1);
if (!input.regex_options.has_flag_set(AllFlags::SkipTrimEmptyMatches)) {
for (auto& matches : result.capture_group_matches)
matches.template remove_all_matching([](auto& match) { return match.view.is_null(); });
matches.remove_all_matching([](auto& match) { return match.view.is_null(); });
}
} else {
result.capture_group_matches.clear_with_capacity();
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibWeb/DOM/Node.h
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ class Node : public EventTarget {
template<typename Callback>
void for_each_child(Callback callback) const
{
return const_cast<Node*>(this)->template for_each_child(move(callback));
return const_cast<Node*>(this)->for_each_child(move(callback));
}

template<typename Callback>
Expand Down
2 changes: 1 addition & 1 deletion Userland/Libraries/LibWeb/TreeNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ class TreeNode {
template<typename Callback>
void for_each_child(Callback callback) const
{
return const_cast<TreeNode*>(this)->template for_each_child(move(callback));
return const_cast<TreeNode*>(this)->for_each_child(move(callback));
}

template<typename Callback>
Expand Down

0 comments on commit 2fdc632

Please sign in to comment.