Project

General

Profile

Actions

Task #1745

closed

skiplist: Changing to const_iterators

Added by Alex Afanasyev over 11 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
07/08/2014
Due date:
% Done:

0%

Estimated time:

Description

Reported by Junxiao:

http://stackoverflow.com/questions/765257/should-i-prefer-iterators-over-const-iterators

This article points out that a caller may modify a value referenced by an iterator. I don't think the SkipList type can handle this situation correctly.
I suggest changing all iterator to const_iterator, so that they cannot be changed. repo index won't need to use a mutable iterator anywhere.

Actions #1

Updated by Shuo Chen over 11 years ago

  • Status changed from New to Resolved
Actions #2

Updated by Junxiao Shi over 8 years ago

  • Status changed from Resolved to Closed

This is no longer needed because Index is now based on std::set.

Actions

Also available in: Atom PDF