foo.cc: In function ‘int main()’:
foo.cc:12:10: error: ‘generate’ is not a member of ‘std’; did you mean ‘negate’?
12 | std::generate(dp.begin()+3, dp.end(), [&,i=2]() mutable {
| ^~~~~~~~
| negate
foo.cc:12:46: warning: lambda capture initializers only available with ‘-std=c++14’ or ‘-std=gnu++14’ [-Wc++14-extensions]
12 | std::generate(dp.begin()+3, dp.end(), [&,i=2]() mutable {
| ^
foo.cc: In lambda function:
foo.cc:13:32: warning: value computed is not used [-Wunused-value]
13 | return dp[i] + dp[i-1] + dp[i-3], i++; });