Skip to content

Commit d83ac3e

Browse files
rdemellowdaverigby
authored andcommitted
Remove deprecated use of std::iterator<>
As of C++17 std::iterator<> is deprecated, so update MutationLog::iterator to use member types rather than inheriting from std::iterator<>. For more information: https://www.fluentcpp.com/2018/05/08/std-iterator-deprecated/ Change-Id: I6ea891dd5ea406929ca8f88914bd22400df23d8b Reviewed-on: https://review.couchbase.org/c/kv_engine/+/172770 Tested-by: Build Bot <[email protected]> Reviewed-by: Dave Rigby <[email protected]>
1 parent 662d742 commit d83ac3e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

engines/ep/src/mutation_log.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,13 @@ class MutationLog {
306306
*
307307
* A ReadException may be thrown at any point along iteration.
308308
*/
309-
class iterator : public std::iterator<std::input_iterator_tag,
310-
const MutationLogEntry> {
309+
class iterator {
311310
public:
311+
using iterator_category = std::input_iterator_tag;
312+
using value_type = const MutationLogEntry;
313+
using difference_type = const MutationLogEntry;
314+
using pointer = const MutationLogEntry*;
315+
using reference = const MutationLogEntry&;
312316

313317
iterator(const iterator& mit);
314318

0 commit comments

Comments
 (0)