Skip to content

Commit 074a058

Browse files
committed
Merge pull request #7975 from afabri/SDG2-fix7972-GF
Segment_delaunay_graph_2: Fix Issue 7972
2 parents bb986ee + 23e56a8 commit 074a058

File tree

2 files changed

+23
-2
lines changed

2 files changed

+23
-2
lines changed

Segment_Delaunay_graph_2/include/CGAL/Segment_Delaunay_graph_2.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,11 +632,11 @@ class Segment_Delaunay_graph_2
632632
}
633633

634634
template <class Segment_2>
635-
static const Point_2& get_source(const Segment_2& segment){
635+
static Point_2 get_source(const Segment_2& segment){
636636
return segment.source();
637637
}
638638
template <class Segment_2>
639-
static const Point_2& get_target(const Segment_2& segment){
639+
static Point_2 get_target(const Segment_2& segment){
640640
return segment.target();
641641
}
642642

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
#include <CGAL/Segment_Delaunay_graph_2.h>
3+
#include <CGAL/Segment_Delaunay_graph_traits_2.h>
4+
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
5+
6+
typedef CGAL::Exact_predicates_exact_constructions_kernel K;
7+
typedef CGAL::Segment_Delaunay_graph_traits_2<K> Gt;
8+
typedef CGAL::Segment_Delaunay_graph_2<Gt> SDG2;
9+
10+
int main() {
11+
auto segments = std::vector({
12+
CGAL::Segment_2<K>(
13+
CGAL::Point_2<K>(0.0, 0.0),
14+
CGAL::Point_2<K>(1.0, 0.0))
15+
});
16+
17+
SDG2 delaunay;
18+
delaunay.insert_segments(segments.begin(), segments.end());
19+
20+
return 0;
21+
}

0 commit comments

Comments
 (0)