In C++ prime 5 Ed chapter 11. Associative containers. "Table 11.7. Operations to Find Elements in an Associative Container":
It is said: "c.equal_range(k)
returns a pair of iterators denoting the elements with key k. if k is not present, both members are c.end()."
set<int> si{ 5, 7, 23, 16, 81, 24, 10};
auto it = si.equal_range(13);
cout << *it.first << " " << *it.second << endl; // 16 16
- But as you can see above
13
was not found but it returns apair
of iterators for elements16, 16
?!