From cec93d0c9fd95fbc5075245109a5bdb53894e2f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 27 May 2021 14:36:55 +0200 Subject: [PATCH] special case for pointers --- Hash_map/include/CGAL/Handle_hash_function.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Hash_map/include/CGAL/Handle_hash_function.h b/Hash_map/include/CGAL/Handle_hash_function.h index 0ff617d8c05..7a77b9486ed 100644 --- a/Hash_map/include/CGAL/Handle_hash_function.h +++ b/Hash_map/include/CGAL/Handle_hash_function.h @@ -37,6 +37,16 @@ namespace internal{ sizeof( typename std::iterator_traits::value_type); } }; + + template + struct Hash_functor{ + std::size_t + operator()(const H* h) + { + return std::size_t(h) / + sizeof(H); + } + }; } }