{"type":"rich","image_url":null,"provider_url":"https://hatena.blog","title":" STL\u30b3\u30f3\u30c6\u30ca\u306econst\u30e1\u30f3\u30d0\u30fc\u95a2\u6570","published":"2007-04-26 00:00:01","provider_name":"Hatena Blog","version":"1.0","blog_url":"https://freak-da.hatenablog.com/","description":"3\u56de\u304f\u3089\u3044\u8abf\u3079\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u30e1\u30e2\u3002 STL\u306e\u30b3\u30f3\u30c6\u30ca\u3092\u30e1\u30f3\u30d0\u30fc\u5909\u6570\u306b\u3082\u3063\u3066\u3001const\u30e1\u30f3\u30d0\u30fc\u95a2\u6570\u3092\u5b9f\u88c5\u3059\u308b\u3068\u304d\u306b\u3001\u691c\u7d22\u7cfb\u306e\u95a2\u6570\u306fconst\u304c\u3042\u308b\u3082\u306e\u3068\u7121\u3044\u3082\u306e\u3092\u4f7f\u3044\u5206\u3051\u306a\u3044\u3068\u30c0\u30e1\u3002 \u8a00\u8449\u3067\u66f8\u304f\u3068\u610f\u5473\u4e0d\u660e\u3067\u3059\u3051\u3069\u3001\u8981\u306f\u3053\u3046\u3044\u3046\u3053\u3068\u3067\u3059\u3002 #include<map> using namespace std; struct Foo { map<int,int> m; int get(int a) const { return m[a]; // \u30a8\u30e9\u30fc } }; \u3053\u308c\u3092\u9632\u3050\u305f\u3081\u306b\u306f\u3001\u5f53\u305f\u308a\u524d\u3067\u3059\u304cmap\u3067\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308bconst\u306a\u30e1\u30f3\u30d0\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002 #include<map> using nam\u2026","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffreak-da.hatenablog.com%2Fentry%2F20070426%2Fp2\" title=\" STL\u30b3\u30f3\u30c6\u30ca\u306econst\u30e1\u30f3\u30d0\u30fc\u95a2\u6570 - \u672c\u5f53\u306f\u6016\u3044HPC &amp; AI\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","width":"100%","author_url":"https://blog.hatena.ne.jp/keisukefukuda/","blog_title":"\u672c\u5f53\u306f\u6016\u3044HPC & AI","url":"https://freak-da.hatenablog.com/entry/20070426/p2","author_name":"keisukefukuda","categories":["C++"]}