Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ for(auto it = map.begin(); it != map.end(); ++it) {
it.value() = 2; // Ok
}
```

Reverse iterators are `std::reverse_iterator` adaptors and do not expose `value()`.
To modify a value during reverse iteration, include `<iterator>` and use
`std::prev(it.base()).value()`. The base iterator points one position past the
element referred to by the reverse iterator; in particular, `rbegin().base()` is
`end()` and must not be dereferenced.

```c++
for(auto it = map.rbegin(); it != map.rend(); ++it) {
std::prev(it.base()).value() = 3;
}
```
- By default the map can only hold up to 2<sup>32</sup> - 1 values, that is 4 294 967 295 values. This can be raised through the `IndexType` class template parameter, check the [API](https://tessil.github.io/ordered-map/classtsl_1_1ordered__map.html#details) for details.
- No support for some bucket related methods (like `bucket_size`, `bucket`, ...).

Expand Down