using Vertex_handle = CDT::Vertex_handle;
using Face_handle = CDT::Face_handle;
+ template <class T, class... Types>
+ const T *
+ get_if_(const std::variant<Types...> *v)
+ {
+ return std::get_if<T>(v);
+ }
+
+ template <class T, class... Types>
+ const T *
+ get_if_(const boost::variant<Types...> *v)
+ {
+ return boost::get<T>(v);
+ }
+
namespace internal
{
namespace
return {};
}
}
+
+ template <typename... Types>
+ const std::optional<std::variant<Types...>> &
+ convert_boost_to_std(const std::optional<std::variant<Types...>> &opt)
+ {
+ return opt;
+ }
} // namespace
{
const auto intersection =
CGAL::intersection(segm, cdt.triangle(f));
- if (const CGALSegment2 *s =
- boost::get<CGALSegment2>(&*intersection))
+ if (const CGALSegment2 *s = get_if_<CGALSegment2>(&*intersection))
{
vertices.push_back(
{{CGALWrappers::cgal_point_to_dealii_point<2>((*s)[0]),
const auto intersection =
CGAL::intersection(cgal_segment, cgal_tetrahedron);
if (const CGALSegment3_exact *s =
- boost::get<CGALSegment3_exact>(&*intersection))
+ get_if_<CGALSegment3_exact>(&*intersection))
{
if (s->squared_length() > tol * tol)
{
CGAL::intersection(triangulation_quad.triangle(f), tet);
if (const CGALTriangle3_exact *t =
- boost::get<CGALTriangle3_exact>(&*intersection))
+ get_if_<CGALTriangle3_exact>(&*intersection))
{
if (CGAL::to_double(t->squared_area()) > tol * tol)
{
}
if (const std::vector<CGALPoint3_exact> *vps =
- boost::get<std::vector<CGALPoint3_exact>>(
- &*intersection))
+ get_if_<std::vector<CGALPoint3_exact>>(&*intersection))
{
Triangulation3_exact tria_inter;
tria_inter.insert(vps->begin(), vps->end());