diff --git a/src/geom.hpp b/src/geom.hpp index 0adb54d36..6cf1ae219 100644 --- a/src/geom.hpp +++ b/src/geom.hpp @@ -200,17 +200,21 @@ class multigeometry_t using iterator = typename std::vector::iterator; using value_type = GEOM; - static constexpr bool FOR_POINT = std::is_same_v; - [[nodiscard]] std::size_t num_geometries() const noexcept { return m_geometry.size(); } - GEOM & - add_geometry(typename std::conditional_t geom) + GEOM &add_geometry(GEOM const &geom) + { + m_geometry.push_back(geom); + return m_geometry.back(); + } + + template + GEOM &add_geometry(T &&geom) { - m_geometry.push_back(std::forward(geom)); + m_geometry.push_back(std::forward(geom)); return m_geometry.back(); }