What does [](int) mean?

What does [](int) mean?

1
2
3
4
5
6
7
8
9
10
namespace Extended_STL {
// …
template<typename C, typename Predicate>
Iterator<C> find_if(C& c, Predicate pred)
{
return std::find_if(c.begin(),c.end(),pred);
}
// …
}
auto p = find_if(v, [](int x) { return x%2; } );  //  assuming v is a vector<int> 


Any answer would be appreciated :)
Last edited on
Thanks a lot :)
Topic archived. No new replies allowed.