Skip to content

Commit

Permalink
multimap::equa_range : エラー処理を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
faithandbrave committed Sep 24, 2024
1 parent dee2ab3 commit 175916c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions reference/map/multimap/equal_range.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ int main()
using iterator = decltype(m)::iterator;
std::pair<iterator, iterator> ret = m.equal_range("B");
if (ret.first == m.end()) {
std::cout << "not found" << std::endl;
return 1;
}
for (iterator it = ret.first; it != ret.second; ++it) {
std::cout << it->first << "," << it->second << std::endl;
Expand Down

0 comments on commit 175916c

Please sign in to comment.