{"type":"rich","author_name":"faith_and_brave","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffaithandbrave.hateblo.jp%2Fentry%2F20081030%2F1225358156\" title=\" VC++10 CTP\u3067\u30e9\u30e0\u30c0\u5f0f\u3092\u904a\u3093\u3067\u307f\u305f - Faith and Brave - C++\u3067\u904a\u307c\u3046\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","provider_url":"https://hatena.blog","published":"2008-10-30 18:15:56","title":" VC++10 CTP\u3067\u30e9\u30e0\u30c0\u5f0f\u3092\u904a\u3093\u3067\u307f\u305f","author_url":"https://blog.hatena.ne.jp/faith_and_brave/","blog_url":"https://faithandbrave.hateblo.jp/","width":"100%","categories":["VC++"],"blog_title":"Faith and Brave - C++\u3067\u904a\u307c\u3046","description":"\u3010\u53c2\u7167\u74b0\u5883\u3092\u6301\u3064\u30e9\u30e0\u30c0\u5f0f\u306f\u30b9\u30b3\u30fc\u30d7\u304c\u5916\u308c\u305f\u3089\u305d\u306e\u5b9f\u884c\u306f\u672a\u5b9a\u7fa9\u3011\u307e\u305a\u306f\u30b3\u30d4\u30fc\u30e9\u30e0\u30c0\u3092\u8fd4\u3057\u3066\u307f\u308b #include <iostream> #include <functional> using namespace std; std::tr1::function<int(int)> foo() { int n = 3; return [n](int i) -> int { return n + i; }; } int main() { cout << foo()(2) << endl; // 5 } \u53c2\u7167\u30e9\u30e0\u30c0\u3092\u8fd4\u3057\u3066\u307f\u308b(reference_closure\u304c\u306a\u3044\u306e\u3067function\u3067\u8fd4\u3059) #in\u2026","image_url":null,"height":"190","url":"https://faithandbrave.hateblo.jp/entry/20081030/1225358156","version":"1.0"}