May 2017
Intermediate to advanced
590 pages
17h 18m
English
In order to write a recursive lambda function, you must perform the following:
The following are examples of recursive lambdas:
void sample() { std::function<int(int const)> lfib = [&lfib](int const n) { return n <= 2 ? 1 : lfib(n - 1) + lfib(n - 2); }; auto f10 = lfib(10); }
std::function<int(int const)> fib_create() ...
Read now
Unlock full access