From 4d797b55c494f48dc1ffcfe558cd17dd3a29e9ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 17 Nov 2022 19:03:30 +0100 Subject: [PATCH] try working around a warning --- STL_Extension/include/CGAL/Handle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STL_Extension/include/CGAL/Handle.h b/STL_Extension/include/CGAL/Handle.h index 4fa3a17286b..07fb7748e21 100644 --- a/STL_Extension/include/CGAL/Handle.h +++ b/STL_Extension/include/CGAL/Handle.h @@ -122,7 +122,7 @@ class Handle int refs() const noexcept { return PTR->count.load(std::memory_order_relaxed); } - Id_type id() const noexcept { return PTR - static_cast(0); } + Id_type id() const noexcept { return std::distance(static_cast(0), PTR); } bool identical(const Handle& h) const noexcept { return PTR == h.PTR; }