mirror of https://github.com/CGAL/cgal
fixes after merge
This commit is contained in:
parent
9cdfe70abb
commit
bdfa15c08f
|
|
@ -309,10 +309,8 @@ public:
|
|||
template<typename T>
|
||||
bool compare_to_other_variant(const T& t) const
|
||||
{
|
||||
if(ov->type() == typeid(T))
|
||||
if(auto* r = std::get_if<T>(&*ov))
|
||||
{
|
||||
auto* r = std::get_if<T>(&*ov); // ov is an optional<variant>
|
||||
assert(r);
|
||||
return (t == *r);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ int main(int, char**)
|
|||
|
||||
auto result = intersection(cub, pl);
|
||||
|
||||
const std::vector<Point>* res = boost::get <std::vector<Point> >(&*result);
|
||||
const std::vector<Point>* res = std::get_if <std::vector<Point> >(&*result);
|
||||
for(const Point& p : *res)
|
||||
std::cout << p << std::endl;
|
||||
|
||||
|
|
|
|||
|
|
@ -1148,7 +1148,7 @@ public:
|
|||
Intersection operator()(const Segment_3& s) const
|
||||
{
|
||||
#ifndef CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
|
||||
CGAL_precondition(r_domain_.do_intersect_surface_object()(s) != boost::none);
|
||||
CGAL_precondition(r_domain_.do_intersect_surface_object()(s) != std::nullopt);
|
||||
#endif // NOT CGAL_MESH_3_NO_LONGER_CALLS_DO_INTERSECT_3
|
||||
return this->operator()(s.source(),s.target());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -751,7 +751,7 @@ Refine_cells_3<Tr,Cr,MD,C3T3_,P_,Ct,C_>::
|
|||
number_of_bad_elements_impl()
|
||||
{
|
||||
typedef typename MD::Subdomain_index Subdomain_index;
|
||||
typedef boost::optional<Subdomain_index> Subdomain;
|
||||
typedef std::optional<Subdomain_index> Subdomain;
|
||||
typedef typename Tr::Finite_cells_iterator Finite_cell_iterator;
|
||||
|
||||
int count = 0;
|
||||
|
|
|
|||
|
|
@ -1053,7 +1053,7 @@ Refine_facets_3<Tr,Cr,MD,C3T3_,P_,Ct,B_,C_>::
|
|||
number_of_bad_elements_impl()
|
||||
{
|
||||
typedef typename MD::Subdomain_index Subdomain_index;
|
||||
typedef boost::optional<Subdomain_index> Subdomain;
|
||||
typedef std::optional<Subdomain_index> Subdomain;
|
||||
typedef typename Tr::Finite_facets_iterator Finite_facet_iterator;
|
||||
|
||||
int count = 0, count_num_bad_surface_facets = 0;
|
||||
|
|
@ -1735,7 +1735,7 @@ is_facet_encroached(const Facet& facet,
|
|||
const Weighted_point& point) const
|
||||
{
|
||||
typedef typename MD::Subdomain_index Subdomain_index;
|
||||
typedef boost::optional<Subdomain_index> Subdomain;
|
||||
typedef std::optional<Subdomain_index> Subdomain;
|
||||
|
||||
if ( r_tr_.is_infinite(facet) || ! this->is_facet_on_surface(facet) )
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -572,7 +572,7 @@ compute_artifical_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2<K, Segment_2_with
|
|||
|
||||
FT t;
|
||||
|
||||
if(const Segment_2* seg = std::get<Segment_2>(&*inter_res))
|
||||
if(const Segment_2* seg = std::get_if<Segment_2>(&*inter_res))
|
||||
{
|
||||
// get the segment extremity closest to the seed
|
||||
Boolean res = (K().compare_distance_2_object()(*seed, seg->source(), seg->target()) == CGAL::SMALLER);
|
||||
|
|
@ -581,7 +581,7 @@ compute_artifical_isec_timeC2 ( Trisegment_2_ptr< Trisegment_2<K, Segment_2_with
|
|||
}
|
||||
else
|
||||
{
|
||||
const Point_2* inter_pt = std::get<const Point_2>(&*inter_res);
|
||||
const Point_2* inter_pt = std::get_if<Point_2>(&*inter_res);
|
||||
if(!CGAL_NTS is_finite(inter_pt->x()) || !CGAL_NTS is_finite(inter_pt->y()))
|
||||
return std::nullopt;
|
||||
t = l0->a() * inter_pt->x() + l0->b() * inter_pt->y() + l0->c() ;
|
||||
|
|
@ -879,12 +879,12 @@ construct_artifical_isecC2 ( Trisegment_2_ptr< Trisegment_2<K, Segment_2_with_ID
|
|||
if (!inter_res) // shouldn't be here if there is no intersection
|
||||
return std::nullopt;
|
||||
|
||||
if(const Point_2* inter_pt = std::get<Point_2>(&*inter_res))
|
||||
if(const Point_2* inter_pt = std::get_if<Point_2>(&*inter_res))
|
||||
{
|
||||
bool ok = CGAL_NTS is_finite(inter_pt->x()) && CGAL_NTS is_finite(inter_pt->y()) ;
|
||||
return cgal_make_optional(ok, *inter_pt) ;
|
||||
}
|
||||
else if(const Segment_2* seg = std::get<Segment_2>(&*inter_res))
|
||||
else if(const Segment_2* seg = std::get_if<Segment_2>(&*inter_res))
|
||||
{
|
||||
// get the segment extremity closest to the seed
|
||||
const Point_2& pt = (K().compare_distance_2_object()(*seed,
|
||||
|
|
|
|||
Loading…
Reference in New Issue