From 4fa191db941a2ab4e8de9e51911645ebb1bd399c Mon Sep 17 00:00:00 2001 From: Harsha Totakura Date: Mon, 15 Sep 2025 13:41:14 +0200 Subject: [PATCH] [rstar]: Use the dynamic type while calling epsilon(). Current call to epsilon is made with the assumption that the dynamic type `content_type` is compatible with double. This does not hold true for numeric types that are bigger than double, e.g: `absl::uint128`. This CL fixes it by binding the call to `content_type`'s type. --- .../geometry/index/detail/rtree/rstar/choose_next_node.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/geometry/index/detail/rtree/rstar/choose_next_node.hpp b/include/boost/geometry/index/detail/rtree/rstar/choose_next_node.hpp index 8032a2626e..13e33e6ad0 100644 --- a/include/boost/geometry/index/detail/rtree/rstar/choose_next_node.hpp +++ b/include/boost/geometry/index/detail/rtree/rstar/choose_next_node.hpp @@ -132,7 +132,7 @@ class choose_next_node // is this assumption ok? if min_content_diff == 0 there is no overlap increase? - if ( min_content_diff < -std::numeric_limits::epsilon() || std::numeric_limits::epsilon() < min_content_diff ) + if ( min_content_diff < -std::numeric_limits::epsilon() || std::numeric_limits::epsilon() < min_content_diff ) { size_t first_n_children_count = children_count; if ( 0 < overlap_cost_threshold && overlap_cost_threshold < children.size() )