От: | _nn_ | www.nemerleweb.com | |
Дата: | 18.04.10 11:12 | ||
Оценка: |
__>>auto f1 = [](int x) -> std::function<int(int)> { return [=](int y) { return x + y; }; };
__>>
R>auto f1 = [](int x) -> decltype([=](int y) {}) { return [=](int y) { return x + y; }; };
R>
auto f = [](int) { return 1;};
typedef decltype(f) a; // OK
typedef decltype([](int) { return 1; }) aa;
error C3477: a lambda cannot appear in an unevaluated context