diff --git a/Hash_map/include/CGAL/Handle_hash_function.h b/Hash_map/include/CGAL/Handle_hash_function.h index 1450384d6cc..0ff617d8c05 100644 --- a/Hash_map/include/CGAL/Handle_hash_function.h +++ b/Hash_map/include/CGAL/Handle_hash_function.h @@ -33,7 +33,7 @@ namespace internal{ std::size_t operator()(const H& h) { - return std::size_t(&*h) / + return std::size_t(h.operator->()) / sizeof( typename std::iterator_traits::value_type); } }; diff --git a/STL_Extension/include/CGAL/In_place_list.h b/STL_Extension/include/CGAL/In_place_list.h index 3266d1ae674..9c99f2e9a8f 100644 --- a/STL_Extension/include/CGAL/In_place_list.h +++ b/STL_Extension/include/CGAL/In_place_list.h @@ -179,7 +179,7 @@ namespace internal { template std::size_t hash_value(const In_place_list_iterator& i) { - T* ptr = &*i; + T* ptr = i.operator->(); return reinterpret_cast(ptr)/ sizeof(T); } @@ -187,7 +187,7 @@ template template std::size_t hash_value(const In_place_list_const_iterator& i) { - const T* ptr = &*i; + const T* ptr = i.operator->(); return reinterpret_cast(ptr)/ sizeof(T); } @@ -792,7 +792,7 @@ namespace std { std::size_t operator()(const CGAL::internal::In_place_list_iterator& i) const { - const T* ptr = &*i; + const T* ptr = i.operator->(); return reinterpret_cast(ptr)/ sizeof(T); } }; @@ -803,7 +803,7 @@ namespace std { std::size_t operator()(const CGAL::internal::In_place_list_const_iterator& i) const { - const T* ptr = &*i; + const T* ptr =i.operator->(); return reinterpret_cast(ptr)/ sizeof(T); } };