{"width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fosyo-manga.hatenadiary.org%2Fentry%2F20140628%2F1403964112\" title=\"\u30e9\u30e0\u30c0\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092 static \u5909\u6570\u3067\u4fdd\u6301\u3059\u308b\u6642\u306e\u6ce8\u610f - C++\u3067\u30b2\u30fc\u30e0\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","image_url":null,"title":"\u30e9\u30e0\u30c0\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092 static \u5909\u6570\u3067\u4fdd\u6301\u3059\u308b\u6642\u306e\u6ce8\u610f","provider_name":"Hatena Blog","author_name":"osyo-manga","type":"rich","published":"2014-06-28 23:01:52","height":"190","description":"Lingr \u306e C++ \u90e8\u5c4b\u3067\u8a71\u984c\u306b\u306a\u3063\u305f\u306e\u3067\u3059\u304c\u3001\u53c2\u7167\u30ad\u30e3\u30d7\u30c1\u30e3\u3057\u305f\u30e9\u30e0\u30c0\u3092 static \u5909\u6570\u3067\u4fdd\u6301\u3059\u308b\u306e\u306f\u672a\u5b9a\u7fa9\u306e\u52d5\u4f5c\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308b\u306e\u3067\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\u3068\u3044\u3046\u8a71\u3002\u3055\u3066\u3001\u8a71\u984c\u306b\u306a\u3063\u3066\u3044\u305f\u306e\u306f\u6b21\u306e\u3088\u3046\u306a\u30b3\u30fc\u30c9\u3067\u3059\u3002 void func(int const& i){ static auto f = [&]{ std::cout << i << std::endl; }; f(); } func(1); // => 1 func(2); // => 1 \u547c\u3073\u51fa\u3057\u305f f() \u306f\u4e21\u65b9\u5171 1 \u304c\u51fa\u529b\u3055\u308c\u307e\u3059\u3002 \u3053\u3053\u3067\u5f15\u6570\u3092 int \u306b\u5909\u3048\u3066\u307f\u308b\u3068\u3069\u3046\u3067\u3057\u3087\u3046\u3002 // \u5f15\u6570\u3092 int \u306b\u5909\u66f4 void \u2026","version":"1.0","url":"https://osyo-manga.hatenadiary.org/entry/20140628/1403964112","blog_url":"https://osyo-manga.hatenadiary.org/","author_url":"https://blog.hatena.ne.jp/osyo-manga/","provider_url":"https://hatena.blog","blog_title":"C++\u3067\u30b2\u30fc\u30e0\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0","categories":["C++"]}