Skip to content

Commit 6fbe5bf

Browse files
committed
Migrate to CGAL 6
1 parent 7415650 commit 6fbe5bf

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

benches/libigl/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ set_target_properties(${TARGET} PROPERTIES
1212
)
1313

1414
if(UNIX)
15-
target_compile_options(${TARGET} PRIVATE -Wall -Wextra -Werror)
15+
target_compile_options(${TARGET} PRIVATE -Wall -Wextra)
1616
elseif(MSVC)
17-
target_compile_options(${TARGET} PRIVATE /W4 /WX /wd4702)
17+
target_compile_options(${TARGET} PRIVATE /W4 /wd4702)
1818
endif()
1919

2020
target_link_libraries(${TARGET} PRIVATE

include/kigumi/Side_of_triangle_soup.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <algorithm>
1111
#include <iterator>
1212
#include <stdexcept>
13+
#include <variant>
1314
#include <vector>
1415

1516
namespace kigumi {
@@ -53,13 +54,13 @@ class Side_of_triangle_soup {
5354
continue;
5455
}
5556

56-
if (const auto* point = boost::get<Point>(&*result)) {
57+
if (const auto* point = std::get<Point>(&*result)) {
5758
if (*point == p) {
5859
return CGAL::ON_ORIENTED_BOUNDARY;
5960
}
6061
auto d = CGAL::squared_distance(p, *point);
6162
intersections_.emplace_back(std::move(d), fi);
62-
} else if (const auto* segment = boost::get<Segment>(&*result)) {
63+
} else if (const auto* segment = std::get<Segment>(&*result)) {
6364
if (segment->source() == p || segment->target() == p) {
6465
return CGAL::ON_ORIENTED_BOUNDARY;
6566
}

tests/face_face_intersection_test.cc

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
#include <algorithm>
99
#include <array>
10-
#include <boost/variant/get.hpp>
10+
#include <variant>
1111
#include <vector>
1212

1313
using K = CGAL::Exact_predicates_exact_constructions_kernel;
@@ -53,16 +53,16 @@ bool test(Point_list& points, std::array<std::size_t, 3> abc, std::array<std::si
5353

5454
auto inter = CGAL::intersection(Triangle{pa, pb, pc}, Triangle{pp, pq, pr});
5555
if (inter) {
56-
if (const auto* p = boost::get<Point>(&*inter)) {
56+
if (const auto* p = std::get<Point>(&*inter)) {
5757
expected.push_back(*p);
58-
} else if (const auto* s = boost::get<Segment>(&*inter)) {
58+
} else if (const auto* s = std::get<Segment>(&*inter)) {
5959
expected.push_back(s->source());
6060
expected.push_back(s->target());
61-
} else if (const auto* t = boost::get<Triangle>(&*inter)) {
61+
} else if (const auto* t = std::get<Triangle>(&*inter)) {
6262
expected.push_back(t->vertex(0));
6363
expected.push_back(t->vertex(1));
6464
expected.push_back(t->vertex(2));
65-
} else if (const auto* ps = boost::get<std::vector<Point>>(&*inter)) {
65+
} else if (const auto* ps = std::get<std::vector<Point>>(&*inter)) {
6666
expected = *ps;
6767
}
6868
}

vcpkg

Submodule vcpkg updated 3523 files

0 commit comments

Comments
 (0)