开发者

Does it make sense to make std::map key const? [duplicate]

This question already has answers here: What开发者_C百科 is difference between const and non const key? (7 answers) Closed 9 years ago.

When defining a std::map, does it make sense to make the key type const?


The key is already const, actually, because a key cannot change once an element was inserted in the map.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜