Initially I had code that looked like this:
std::map< std::pair<int,int>, std::vector<Class0*> > aMap;
It worked. Now I have code that looks like this:
std::map< std::pair<Vec3f, Vec3f>, std::vector<Class0*> > aMap;
It no longer maps correctly (compiles fine). Why? And how can I fix that?
EDIT: After popular demand here is the comparison code for a 3D vector (3 floats):
class Vec3f {
...
bool operator () ( const Vector3f& v0, const Vector3f& v1 ) const {
return std::tie(v0[0], v0[1], v0[2]) < std::tie(v1[0], v1[1], v1[2]);
} ...
from this question Overloading operator for set. The above comparison works fine for a set, but apparently not for a pair. Why?