{"title":" \u30e9\u30e0\u30c0\u5f0f\u3092\u4f7f\u3046","version":"1.0","type":"rich","description":"auto\u3082\u666e\u901a\u306b\u4f7f\u3048\u308b\u3057\u3001C++\u3092\u66f8\u3044\u3066\u3044\u308b\u611f\u3058\u3058\u3083\u306a\u304b\u3063\u305f\u3002 #include <iostream> #include <functional> using namespace std; int main() { auto make_counter = [](int n) -> std::function<int ()> { return [=]() -> int { // \u30b3\u30d4\u30fc\u306b\u3088\u308b\u30ad\u30e3\u30d7\u30c1\u30e3\u3060\u3068const\u306b\u306a\u308b\u3089\u3057\u3044 int &i = const_cast<int&>(n); return i++; }; }; auto f1 = make_counter(10); auto f2 =\u2026","blog_title":"so what","provider_name":"Hatena Blog","url":"https://so-wh.at/entry/20100617/p1","author_url":"https://blog.hatena.ne.jp/winebarrel/","width":"100%","published":"2010-06-17 00:00:01","height":"190","blog_url":"https://so-wh.at/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fso-wh.at%2Fentry%2F20100617%2Fp1\" title=\" \u30e9\u30e0\u30c0\u5f0f\u3092\u4f7f\u3046 - so what\" 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,"categories":["C++"],"author_name":"winebarrel","provider_url":"https://hatena.blog"}