1
0
Fork 0
firefox/tools/clang-tidy/test/performance-inefficient-algorithm.cpp
Daniel Baumann 5e9a113729
Adding upstream version 140.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-25 09:37:52 +02:00

30 lines
695 B
C++

namespace std {
template <typename T> struct less {
bool operator()(const T &lhs, const T &rhs) { return lhs < rhs; }
};
template <typename T> struct greater {
bool operator()(const T &lhs, const T &rhs) { return lhs > rhs; }
};
struct iterator_type {};
template <typename K, typename Cmp = less<K>> struct set {
typedef iterator_type iterator;
iterator find(const K &k);
unsigned count(const K &k);
iterator begin();
iterator end();
iterator begin() const;
iterator end() const;
};
template <typename FwIt, typename K>
FwIt find(FwIt, FwIt end, const K &) { return end; }
}
template <typename T> void f(const T &t) {
std::set<int> s;
find(s.begin(), s.end(), 46);
}