Friday, March 20, 2009

World's longest error?

Been playing around with hashtables (excuse me, "unordered maps") from the forthcoming version of C++. The use of templates here is truly impressive, as are the error messages that result if you do something wrong. On the right is an error I got while compiling. It's not something I contrived -- it's a real compile error. And no, you're not looking at multiple error messages -- that's a single error message. It's so long, the terminal runs out of space to display it. It's saying that you can't ask whether an iterator to a unordered map of has the same value as an interator to an unordered map of . This is perfectly reasonable. Trying to figure that out from the error message, though, is quite a challenge!


  1. An iterator to an unordered map of--huh??? THAT doesn't make sense to me. But then none of your computer stuff does. I wish I could help you like you help me, but I don't know enough to. :(

    And yes, that is quite an error message. Goodness.

  2. Are you sure you didn't just miss a semi-colon?

  3. Actually, I used the wrong variable on one side of the comparison.