What does [](int) mean?

Jun 2, 2016 at 11:09am
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 Jun 2, 2016 at 11:10am
Jun 2, 2016 at 11:13am
Jun 2, 2016 at 3:09pm
Thanks a lot :)
Topic archived. No new replies allowed.