Key already exists in unordered_map, but “find” returns as not found
问题 I constructed an unordered_map using key type rot3d, which is defined below: #ifndef EPS6 #define EPS6 1.0e-6 #endif struct rot3d { double agl[3]; // alpha, beta, gamma in ascending order bool operator==(const rot3d &other) const { // printf("== used\n"); return abs(agl[0]-other.agl[0]) <= EPS6 && abs(agl[1]-other.agl[1]) <= EPS6 && abs(agl[2]-other.agl[2]) <= EPS6; } }; Equality of rot3d is defined by the condition that each component is within a small range of the same component from the