0

I am compiling the below program with g++ -std=c++11 lol.cpp and getting a weird error. Please help!

#include <iostream>
#include <unordered_map>
#include <array>

int main(void)
{
  std::unordered_map <std::array<int, 2>, int> abc;
}

These are the errors: https://gist.github.com/lokeshh/f1f007bc8d3756ff2c92

9
  • What are weird errors? Commented Feb 3, 2016 at 17:09
  • gist.github.com/lokeshh/f1f007bc8d3756ff2c92 Commented Feb 3, 2016 at 17:13
  • unordered_map doesn't know how to hash a std::array. Commented Feb 3, 2016 at 17:16
  • @101010 Are you sure? Because [this] (stackoverflow.com/questions/9848868/…) answer here says it does. Commented Feb 3, 2016 at 17:17
  • 1
    @Lokesh Please put error messages verbatim in your question, not in a link. Commented Feb 3, 2016 at 17:20

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.