{"width":"100%","published":"2012-03-07 00:00:00","author_url":"https://blog.hatena.ne.jp/yohhoy/","provider_url":"https://hatena.blog","blog_title":"yohhoy\u306e\u65e5\u8a18","description":"C++11\u6a19\u6e96\u30e9\u30a4\u30d6\u30e9\u30ea\u306estd::function\u3084std::bind\u3067\u306f\u3001\u30af\u30e9\u30b9\u306e\u30c7\u30fc\u30bf\u30e1\u30f3\u30d0\uff08\u30e1\u30f3\u30d0\u5909\u6570\uff09\u3092\u683c\u7d0d\u3067\u304d\u308b\u3002 #include <functional> struct A { int md; void mf(int v) { md = v * 2; } } a; // \u30e1\u30f3\u30d0\u95a2\u6570 A::mf \uff08\u6bd4\u8f03\u7528\uff09 std::function<void (A&, int)> f1 = &A::mf; f1(a, 3); // a.mf(3) assert(a.md == 6); using std::placeholers::_1; std::function<void (int)> b\u2026","version":"1.0","height":"190","title":"function/bind\u3068\u30af\u30e9\u30b9\u30c7\u30fc\u30bf\u30e1\u30f3\u30d0","type":"rich","blog_url":"https://yohhoy.hatenadiary.jp/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fyohhoy.hatenadiary.jp%2Fentry%2F20120307%2Fp1\" title=\"function/bind\u3068\u30af\u30e9\u30b9\u30c7\u30fc\u30bf\u30e1\u30f3\u30d0 - yohhoy\u306e\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>","author_name":"yohhoy","url":"https://yohhoy.hatenadiary.jp/entry/20120307/p1","categories":["C++","Boost"],"provider_name":"Hatena Blog","image_url":null}