14
Рекурсивные лямбда-функции в C ++ 11
Я новичок в C ++ 11. Я пишу следующую рекурсивную лямбда-функцию, но она не компилируется. sum.cpp #include <iostream> #include <functional> auto term = [](int a)->int { return a*a; }; auto next = [](int a)->int { return ++a; }; auto sum = [term,next,&sum](int a, int b)mutable ->int { if(a>b) return 0; …