Fix example for iterating range
One must use `equal_range` here, otherwise the iteration will not stop after the last matching key.
This commit is contained in:
parent
bd72fce0a7
commit
462e5e4b51
|
@ -333,7 +333,7 @@ In the more interesting case where we inserted more DNS records, we could
|
|||
iterate over all items with `domain_id = 4` as follows:
|
||||
|
||||
```
|
||||
for(auto iter = txn.find<1>(4): iter != txn.end(); ++iter) {
|
||||
for(auto [iter, end] = txn.equal_range<1>(4): iter != end; ++iter) {
|
||||
cout << iter->qname << "\n";
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue