Open
Description
#include <algorithm>
#include <cstddef>
void f()
{
auto val = [](size_t m) {
size_t a = 0;
return std::max(m, a);
};
}
<source>:6:16: warning: use a trailing return type for this lambda [modernize-use-trailing-return-type]
6 | auto val = [](size_t m) {
| ^
| -> unsigned long
https://godbolt.org/z/9K4M7Mz8E
It should be reporting size_t
instead. It seems to be related to the template call involved.