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?
const auto
vector &g
Unfortunately, generic lambdas that take auto (whether const or not) is a C++14 only feature.
auto
const
See here https://isocpp.org/wiki/faq/cpp14-language#generic-lambdas for some more details.