Bug 1879449 [wpt PR 44489] - [wptrunner] Add `infrastructure/expected-fail/` test...
[gecko.git] / tools / clang-tidy / test / performance-inefficient-algorithm.cpp
blobb508260dbd6e1950fb7b745706476dae6a04e247
1 namespace std {
2 template <typename T> struct less {
3 bool operator()(const T &lhs, const T &rhs) { return lhs < rhs; }
4 };
6 template <typename T> struct greater {
7 bool operator()(const T &lhs, const T &rhs) { return lhs > rhs; }
8 };
10 struct iterator_type {};
12 template <typename K, typename Cmp = less<K>> struct set {
13 typedef iterator_type iterator;
14 iterator find(const K &k);
15 unsigned count(const K &k);
17 iterator begin();
18 iterator end();
19 iterator begin() const;
20 iterator end() const;
23 template <typename FwIt, typename K>
24 FwIt find(FwIt, FwIt end, const K &) { return end; }
27 template <typename T> void f(const T &t) {
28 std::set<int> s;
29 find(s.begin(), s.end(), 46);