Open
Description
Split from #144509.
#include <algorithm>
#include <vector>
void f()
{
auto it2 = [](const std::vector<int>& v) {
return std::find_if(v.cbegin(), v.cend(), [](int i) -> bool {
return i == 0;
});
};
}
<source>:10:16: warning: use a trailing return type for this lambda [modernize-use-trailing-return-type]
10 | auto it2 = [](const std::vector<int>& v) {
| ^
| -> __gnu_cxx::__normal_iterator<const int *, std::vector<int>>
https://godbolt.org/z/zzYMa4o5r
It should be suggesting std::vector<int>::const_iterator
.