How can I make the following code working? I get error 'no match for operator[]`. This is a situation in my application, appearantly there are ways to workaround but I would like to know if this is at all supported.
#include <unordered_map>
#include <utility>
std::pair<int, int> mypair(int a, int b)
{
return std::pair<int, int>(a, b);
}
int main()
{
std::unordered_map<std::pair<int, int>, int> mymap;
mymap[mypair(2, 3)] = 5;
return 0;
}