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:
Martchus 2022-01-18 21:53:51 +01:00
parent bd72fce0a7
commit 462e5e4b51
1 changed files with 1 additions and 1 deletions

View File

@ -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";
}
```