Open
Description
#include <algorithm>
#include <vector>
void f()
{
auto it = [](const std::vector<int>& v) {
return v.cbegin();
};
}
<source>:6:15: warning: use a trailing return type for this lambda [modernize-use-trailing-return-type]
6 | auto it = [](const std::vector<int>& v) {
| ^
| -> const_iterator
https://godbolt.org/z/zzYMa4o5r
It should be suggesting std::vector<int>::const_iterator
.