Merge pull request #7975 from afabri/SDG2-fix7972-GF

Segment_delaunay_graph_2:  Fix Issue 7972
This commit is contained in:
Laurent Rineau 2024-01-24 15:57:17 +01:00
commit 02263fab9b
2 changed files with 23 additions and 2 deletions

View File

@ -632,11 +632,11 @@ public:
}
template <class Segment_2>
static const Point_2& get_source(const Segment_2& segment){
static Point_2 get_source(const Segment_2& segment){
return segment.source();
}
template <class Segment_2>
static const Point_2& get_target(const Segment_2& segment){
static Point_2 get_target(const Segment_2& segment){
return segment.target();
}

View File

@ -0,0 +1,21 @@
#include <CGAL/Segment_Delaunay_graph_2.h>
#include <CGAL/Segment_Delaunay_graph_traits_2.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
typedef CGAL::Exact_predicates_exact_constructions_kernel K;
typedef CGAL::Segment_Delaunay_graph_traits_2<K> Gt;
typedef CGAL::Segment_Delaunay_graph_2<Gt> SDG2;
int main() {
auto segments = std::vector({
CGAL::Segment_2<K>(
CGAL::Point_2<K>(0.0, 0.0),
CGAL::Point_2<K>(1.0, 0.0))
});
SDG2 delaunay;
delaunay.insert_segments(segments.begin(), segments.end());
return 0;
}