diff --git a/src/OpenMesh/Core/Mesh/Handles.hh b/src/OpenMesh/Core/Mesh/Handles.hh index 6cbb8ac4..68ac1d7e 100644 --- a/src/OpenMesh/Core/Mesh/Handles.hh +++ b/src/OpenMesh/Core/Mesh/Handles.hh @@ -165,8 +165,9 @@ namespace std { template <> struct hash - : public std::unary_function { + typedef OpenMesh::BaseHandle argument_type; + typedef std::size_t result_type; std::size_t operator()(const OpenMesh::BaseHandle& h) const { @@ -176,8 +177,9 @@ struct hash template <> struct hash - : public std::unary_function { + typedef OpenMesh::VertexHandle argument_type; + typedef std::size_t result_type; std::size_t operator()(const OpenMesh::VertexHandle& h) const { @@ -187,9 +189,11 @@ struct hash template <> struct hash - : public std::unary_function { + typedef OpenMesh::HalfedgeHandle argument_type; + typedef std::size_t result_type; + std::size_t operator()(const OpenMesh::HalfedgeHandle& h) const { return h.idx(); @@ -198,9 +202,11 @@ struct hash template <> struct hash - : public std::unary_function { + typedef OpenMesh::EdgeHandle argument_type; + typedef std::size_t result_type; + std::size_t operator()(const OpenMesh::EdgeHandle& h) const { return h.idx(); @@ -209,9 +215,11 @@ struct hash template <> struct hash - : public std::unary_function { + typedef OpenMesh::FaceHandle argument_type; + typedef std::size_t result_type; + std::size_t operator()(const OpenMesh::FaceHandle& h) const { return h.idx();