I'm having quite a hard time trying to debug my little piece of code:
std::map<glm::ivec3,int> myMap;
glm::ivec3 myVec(3, 3, 3);
myMap.find(myVec);
I get the following error:
c:\program files (x86)\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.7.1\include\c++\bits\stl_function.h|237|error: no match for 'operator<' in '__x < __y'
Does that mean I can't check whether a glm::ivec3
is smaller than another?
I think that because a stl::map
is ordered, the compiler wants to check which pair comes first. I tried to make the key a pointer and it worked.
Isn't there a way to keep the key a value instead of a pointer? This makes me ask another question: how can compare with a greater than operation something that cannot be compared or that is slow to be compared?
Thank you! :)