Lambda of a lambda : the function is not captured

前端 未结 2 1753
无人共我
无人共我 2021-02-03 21:29

The following program do not compile :

#include 
#include 
#include 
#include 
#include 

        
2条回答
  •  孤街浪徒
    2021-02-03 21:30

    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]).

提交回复
热议问题