diff --git a/BGL/examples/BGL_polyhedron_3/copy_polyhedron.cpp b/BGL/examples/BGL_polyhedron_3/copy_polyhedron.cpp index 3695a0fa227..ec36c663545 100644 --- a/BGL/examples/BGL_polyhedron_3/copy_polyhedron.cpp +++ b/BGL/examples/BGL_polyhedron_3/copy_polyhedron.cpp @@ -16,11 +16,10 @@ #include -#include - #include #include #include +#include typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; diff --git a/STL_Extension/include/CGAL/hash_openmesh.h b/STL_Extension/include/CGAL/hash_openmesh.h index 757c08b91ea..49b0d1278f3 100644 --- a/STL_Extension/include/CGAL/hash_openmesh.h +++ b/STL_Extension/include/CGAL/hash_openmesh.h @@ -20,11 +20,12 @@ #ifndef CGAL_HASH_OPENMESH_H #define CGAL_HASH_OPENMESH_H +#include -#ifndef CGAL_DISABLE_HASH_OPENMESH +#ifndef OM_HAS_HASH #include -#include + namespace OpenMesh { inline std::size_t hash_value(const BaseHandle& h) { return h.idx(); } @@ -40,16 +41,61 @@ namespace std { #ifndef CGAL_CFG_NO_STD_HASH - template <> - struct hash - : public std::unary_function - { +template <> +struct hash + : public std::unary_function +{ + + std::size_t operator()(const OpenMesh::BaseHandle& h) const + { + return h.idx(); + } +}; + +template <> +struct hash + : public std::unary_function +{ + + std::size_t operator()(const OpenMesh::VertexHandle& h) const + { + return h.idx(); + } +}; + +template <> +struct hash + : public std::unary_function +{ + + std::size_t operator()(const OpenMesh::HalfedgeHandle& h) const + { + return h.idx(); + } +}; + +template <> +struct hash + : public std::unary_function +{ + + std::size_t operator()(const OpenMesh::EdgeHandle& h) const + { + return h.idx(); + } +}; + +template <> +struct hash + : public std::unary_function +{ + + std::size_t operator()(const OpenMesh::FaceHandle& h) const + { + return h.idx(); + } +}; - std::size_t operator()(const OpenMesh::BaseHandle& h) const - { - return h.idx(); - } - }; #endif // CGAL_CFG_NO_STD_HASH #if defined(BOOST_MSVC) @@ -58,7 +104,7 @@ namespace std { } // namespace std -#endif // CGAL_DISABLE_HASH_OPENMESH +#endif // OM_HAS_HASH #endif // CGAL_HASH_OPENMESH_H