find()だとイテレータを返してしまうし(end()のチェックをすれば良いのか)、単に存在チェックするのにat()+try~catchだと大袈裟だ、ということでcontains()なんだけどC++20ってのがなあ。 https://cpprefjp.github.io/reference/map/map/contains.html

Reply to this note

Please Login to reply.

Discussion

No replies yet.