summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hans Wennborg <hwennborg@google.com> 2024-01-19 15:05:09 +0000
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-01-21 21:41:48 +0000
commitf99be32df8d55405aa70c44899f058e7a842de3e (patch)
tree684d00328c00ad5cc534528854ba23493accb387
parent5e296d8fb1745805c0b0374fc076235007a5afe7 (diff)
Fix 'Filter' function shadowing its own template parameter
Recent Clang versions will error about this, see https://github.com/llvm/llvm-project/pull/78274 Change-Id: I8e15063ab59dba6d4fb4d69102d0805a37fa6e9b
-rw-r--r--libartbase/base/stl_util.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libartbase/base/stl_util.h b/libartbase/base/stl_util.h
index 53eb410519..a6ab16c0d4 100644
--- a/libartbase/base/stl_util.h
+++ b/libartbase/base/stl_util.h
@@ -293,8 +293,8 @@ struct FilterIterator {
std::optional<RealIter> end_;
};
-template <typename BaseRange, typename Filter>
-static inline auto Filter(BaseRange&& range, Filter cond) {
+template <typename BaseRange, typename FilterT>
+static inline auto Filter(BaseRange&& range, FilterT cond) {
auto end = range.end();
auto start = std::find_if(range.begin(), end, cond);
return MakeIterationRange(FilterIterator(start, cond, std::make_optional(end)),