From 0ea7ab4f623864c82163d106cc93c8a97e4baac6 Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Thu, 31 Mar 2016 14:44:55 -0700 Subject: Hashing was only officially introduced in c++11. Therefore only define an implementation of the hash function for float16 if c++11 is enabled. --- Eigen/src/Core/arch/CUDA/Half.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Eigen/src/Core/arch/CUDA/Half.h') diff --git a/Eigen/src/Core/arch/CUDA/Half.h b/Eigen/src/Core/arch/CUDA/Half.h index 70050358c..212aa0d5d 100644 --- a/Eigen/src/Core/arch/CUDA/Half.h +++ b/Eigen/src/Core/arch/CUDA/Half.h @@ -415,12 +415,14 @@ using ::sqrt; using ::floor; using ::ceil; +#if __cplusplus > 199711L template <> struct hash { size_t operator()(const Eigen::half& a) const { return std::hash()(a.x); } }; +#endif } // end namespace std -- cgit v1.2.3