2008-03-28から1日間の記事一覧

Re: std::reference_closure の存在意義

昨日のk.inabaさんのコメントにいったん納得しかけたけれど void funcWithCallback(std::reference_closure<int(int)> const &f); // 定義は別のバイナリにある void g() { int i = 42; funcWithCallback([&](int j){ return i * j; }); } これが std::reference_closu</int(int)>…