Using decltype for lambda comparators
Advertisements I’m trying to understand the difference in the following two cases. In both, I introduce a comparator as a lambda function: auto comp = [](int x, int y) { return x%2 < y%2; }; But then, if I want to use it with a sort, I can simply write sort(vec.begin(), vec.end(), comp); while for… Read More Using decltype for lambda comparators