The following program do not compile :
#include #include #include #include #include
You use the f parameter in the lambda inside asort(), but you don't capture it. Try adding f to the capture list (change [] to read [&f]).
f
asort()
[]
[&f]