OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COURGETTE_CONSECUTIVE_RANGE_VISITOR_H_ | 5 #ifndef COURGETTE_CONSECUTIVE_RANGE_VISITOR_H_ |
6 #define COURGETTE_CONSECUTIVE_RANGE_VISITOR_H_ | 6 #define COURGETTE_CONSECUTIVE_RANGE_VISITOR_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include <iterator> | 10 #include <iterator> |
9 | 11 |
10 #include "base/macros.h" | 12 #include "base/macros.h" |
11 | 13 |
12 namespace courgette { | 14 namespace courgette { |
13 | 15 |
14 // Usage note: First check whether std::unique() would suffice. | 16 // Usage note: First check whether std::unique() would suffice. |
15 // | 17 // |
16 // ConsecutiveRangeVisitor is a visitor to read equal consecutive items | 18 // ConsecutiveRangeVisitor is a visitor to read equal consecutive items |
17 // ("ranges") between two iterators. The base value of InputIterator must | 19 // ("ranges") between two iterators. The base value of InputIterator must |
(...skipping 30 matching lines...) Expand all Loading... |
48 InputIterator tail_; // The trailing pionter of a range (inclusive). | 50 InputIterator tail_; // The trailing pionter of a range (inclusive). |
49 InputIterator head_; // The leading pointer of a range (exclusive). | 51 InputIterator head_; // The leading pointer of a range (exclusive). |
50 InputIterator end_; // Store the end pointer so we know when to stop. | 52 InputIterator end_; // Store the end pointer so we know when to stop. |
51 | 53 |
52 DISALLOW_COPY_AND_ASSIGN(ConsecutiveRangeVisitor); | 54 DISALLOW_COPY_AND_ASSIGN(ConsecutiveRangeVisitor); |
53 }; | 55 }; |
54 | 56 |
55 } // namespace courgette | 57 } // namespace courgette |
56 | 58 |
57 #endif // COURGETTE_CONSECUTIVE_RANGE_VISITOR_H_ | 59 #endif // COURGETTE_CONSECUTIVE_RANGE_VISITOR_H_ |
OLD | NEW |