{"image_url":null,"width":"100%","published":"2009-03-20 23:38:08","categories":["C++"],"description":"\u30af\u30e9\u30b9\u306e\u30e1\u30f3\u30d0\u95a2\u6570\u540d\u306e\u5f8c\u308d\u306bconst\u3092\u4ed8\u3051\u308b\u3068\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5185\u5bb9\u3092\u5909\u66f4\u3067\u304d\u306a\u304f\u306a\u308b\u3002 class Test { int num; public: int func(int n) const { num = n; // \u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc } }; mutable\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u4ed8\u3051\u305f\u30e1\u30f3\u30d0\u5909\u6570\u306fconst\u30e1\u30f3\u30d0\u95a2\u6570\u3067\u3082\u5024\u3092\u5909\u66f4\u3067\u304d\u308b\u3002 class Test { int num; mutable int num2; public: int func(int n) const { //num = n; num2 = n; // \u30b3\u30f3\u30d1\u30a4\u30eb\u3067\u304d\u308b } }; const\u30e1\u30f3\u30d0\u95a2\u6570\u3067\u3082\u5024\u3092\u5909\u66f4\u3067\u304d\u306a\u3044\u3060\u3051\u3067\u2026","provider_url":"https://hatena.blog","author_url":"https://blog.hatena.ne.jp/toburau/","height":"190","author_name":"toburau","version":"1.0","type":"rich","title":"const\u30e1\u30f3\u30d0\u95a2\u6570\u3068mutable","blog_title":"\u30b2\u30fc\u30e0\u304c\u4f5c\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u307e\u3067\u304c\u3093\u3070\u308b\u65e5\u8a18","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftoburau.hatenablog.jp%2Fentry%2F20090320%2F1237559888\" title=\"const\u30e1\u30f3\u30d0\u95a2\u6570\u3068mutable - \u30b2\u30fc\u30e0\u304c\u4f5c\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u307e\u3067\u304c\u3093\u3070\u308b\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_name":"Hatena Blog","blog_url":"https://toburau.hatenablog.jp/","url":"https://toburau.hatenablog.jp/entry/20090320/1237559888"}