How to use lambda auto parameters in C++11

前端 未结 5 743
野的像风
野的像风 2020-12-05 10:33

I have a code in C++14. However, when I used it in C++11, it has an error at const auto. How to use it in C++11?

vector &g         


        
5条回答
  •  眼角桃花
    2020-12-05 10:43

    Unfortunately, generic lambdas that take auto (whether const or not) is a C++14 only feature.

    See here https://isocpp.org/wiki/faq/cpp14-language#generic-lambdas for some more details.

提交回复
热议问题