I have a struct
struct Key {
double x;
double y;
double z;
bool operator==(const Key& k) const{
return (x == k.x && y == k.y && z == k.z);
}
}
I do this because I want to make this as key for the hash map.
Then I do
std::unordered_map<Key, int> map = {{1.01, 2.02, 3.03}, 333};
and I want to use initialization list as constructor but I get error no matching constructor for initialization of 'std::unordered_map<key, int> map = {{1.01, 2.02, 3.03}, 333};'