Skip to content

Commit

Permalink
Merge pull request #7975 from afabri/SDG2-fix7972-GF
Browse files Browse the repository at this point in the history
Segment_delaunay_graph_2:  Fix Issue 7972
  • Loading branch information
lrineau committed Jan 24, 2024
2 parents bb986ee + 23e56a8 commit 074a058
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,11 @@ class Segment_Delaunay_graph_2
}

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();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -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;
}

0 comments on commit 074a058

Please sign in to comment.