Skip to content

Commit

Permalink
Fix BOOST_GEOMETRY_CONSTEXPR call in index (including support for c++17)
Browse files Browse the repository at this point in the history
  • Loading branch information
vissarion committed Mar 29, 2024
1 parent 40712c0 commit 7c4879b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/boost/geometry/index/detail/rtree/visitors/insert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,11 @@ class insert
// Enlarge it in case if it's not bounding geometry type.
// It's because Points and Segments are compared WRT machine epsilon
// This ensures that leafs bounds correspond to the stored elements
if (BOOST_GEOMETRY_CONSTEXPR ((std::is_same<Element, value_type>::value
if BOOST_GEOMETRY_CONSTEXPR ((std::is_same<Element, value_type>::value)
&& ! index::detail::is_bounding_geometry
<
typename indexable_type<translator_type>::type
>::value)))
>::value)
{
geometry::detail::expand_by_epsilon(m_element_bounds);
}
Expand Down Expand Up @@ -424,15 +424,16 @@ class insert
// Enlarge bounds of a leaf node.
// It's because Points and Segments are compared WRT machine epsilon
// This ensures that leafs' bounds correspond to the stored elements.
if (BOOST_GEOMETRY_CONSTEXPR ((std::is_same<Node, leaf>::value
if BOOST_GEOMETRY_CONSTEXPR ((std::is_same<Node, leaf>::value)
&& ! index::detail::is_bounding_geometry
<
typename indexable_type<translator_type>::type
>::value)))
>::value)
{
geometry::detail::expand_by_epsilon(n_box);
geometry::detail::expand_by_epsilon(additional_nodes[0].first);
}

#endif

// node is not the root - just add the new node
Expand Down

0 comments on commit 7c4879b

Please sign in to comment.