namespace std {
template<>
struct hash<FlexLength>{
size_t operator()(const FlexLength &length) const {
NSUInteger subhashes[] = {
std::hash<int>()(length.type),
std::hash<float>()(length.value),
};
return VZ::Hash::IntegerArrayHash(subhashes, sizeof(subhashes) / sizeof(subhashes[0]));
}
};
}
template http://blog.sina.com.cn/s/blog_74a271040100tkmj.html
操作符重载
网友评论