2009-07-06から1日間の記事一覧

mutableラムダはパラメータリストを省略できない

C++

comp.std.c++ - Empty parameter list not optional for mutable lambdas? パラメータを受け取らないラムダ式は、パラメータリストを省略できることになっていますが int x; // 以下の2つは同じ意味 auto f1 = [&]() { ++x; }; auto f2 = [&] { ++x; }; パラ…