I'm trying to implement a map with a lambda function in C++11 as such

std::map<int, int, [](const int&a, const int& b) { return a < b; }> test;

but that fails with

error: type/value mismatch at argument 3 in template parameter list for ‘template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map’

error: expected a type, got ‘{}’

error: invalid type in declaration before ‘;’ token

Any advice?

Edit
Report