mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-21 07:19:46 +08:00
Hashing was only officially introduced in c++11. Therefore only define an implementation of the hash function for float16 if c++11 is enabled.
This commit is contained in:
parent
92b7f7b650
commit
0ea7ab4f62
@ -415,12 +415,14 @@ using ::sqrt;
|
||||
using ::floor;
|
||||
using ::ceil;
|
||||
|
||||
#if __cplusplus > 199711L
|
||||
template <>
|
||||
struct hash<Eigen::half> {
|
||||
size_t operator()(const Eigen::half& a) const {
|
||||
return std::hash<unsigned short>()(a.x);
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
} // end namespace std
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user