mirror of https://github.com/CGAL/cgal
boost::any ==> std::any
This commit is contained in:
parent
604dcdc435
commit
557b64e4a6
|
|
@ -18,7 +18,7 @@ char * Option_parser::s_strategy_opts[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class MyId>
|
template <class MyId>
|
||||||
void Option_parser::my_validate(boost::any & v,
|
void Option_parser::my_validate(std::any & v,
|
||||||
const std::vector<std::string> & values)
|
const std::vector<std::string> & values)
|
||||||
{
|
{
|
||||||
typedef std::vector<MyId> Vector_id;
|
typedef std::vector<MyId> Vector_id;
|
||||||
|
|
@ -28,11 +28,11 @@ void Option_parser::my_validate(boost::any & v,
|
||||||
if (v.empty()) {
|
if (v.empty()) {
|
||||||
Vector_id vec;
|
Vector_id vec;
|
||||||
vec.push_back(MyId(i));
|
vec.push_back(MyId(i));
|
||||||
v = boost::any(vec);
|
v = std::any(vec);
|
||||||
} else {
|
} else {
|
||||||
Vector_id vec = boost::any_cast<Vector_id>(v);
|
Vector_id vec = std::any_cast<Vector_id>(v);
|
||||||
vec.push_back(MyId(i));
|
vec.push_back(MyId(i));
|
||||||
v = boost::any(vec);
|
v = std::any(vec);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -41,14 +41,14 @@ void Option_parser::my_validate(boost::any & v,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Overload the 'validate' function for the user-defined class */
|
/* Overload the 'validate' function for the user-defined class */
|
||||||
void validate(boost::any & v, const std::vector<std::string> & values,
|
void validate(std::any & v, const std::vector<std::string> & values,
|
||||||
Option_parser::Vector_type_id * target_type, int)
|
Option_parser::Vector_type_id * target_type, int)
|
||||||
{
|
{
|
||||||
Option_parser::my_validate<Option_parser::Type_id>(v, values);
|
Option_parser::my_validate<Option_parser::Type_id>(v, values);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Overload the 'validate' function for the user-defined class */
|
/* Overload the 'validate' function for the user-defined class */
|
||||||
void validate(boost::any & v, const std::vector<std::string> & values,
|
void validate(std::any & v, const std::vector<std::string> & values,
|
||||||
Option_parser::Vector_strategy_id * target_type, int)
|
Option_parser::Vector_strategy_id * target_type, int)
|
||||||
{
|
{
|
||||||
Option_parser::my_validate<Option_parser::Strategy_id>(v, values);
|
Option_parser::my_validate<Option_parser::Strategy_id>(v, values);
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ public:
|
||||||
unsigned int get_height() const { return m_win_height; }
|
unsigned int get_height() const { return m_win_height; }
|
||||||
|
|
||||||
template <class MyId>
|
template <class MyId>
|
||||||
static void my_validate(boost::any & v,
|
static void my_validate(std::any & v,
|
||||||
const std::vector<std::string> & values);
|
const std::vector<std::string> & values);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include <CGAL/Origin.h>
|
#include <CGAL/Origin.h>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#include <boost/mpl/if.hpp>
|
#include <boost/mpl/if.hpp>
|
||||||
#include <boost/utility/result_of.hpp>
|
#include <boost/utility/result_of.hpp>
|
||||||
|
|
||||||
|
|
@ -229,7 +229,7 @@ sibson_gradient_fitting_nn_2(const Dt& dt,
|
||||||
// of the value functor is 'DT::Point' or 'DT::Vertex_handle'
|
// of the value functor is 'DT::Point' or 'DT::Vertex_handle'
|
||||||
std::enable_if_t<
|
std::enable_if_t<
|
||||||
std::is_constructible<
|
std::is_constructible<
|
||||||
std::function<boost::any(typename Dt::Point)>,
|
std::function<std::any(typename Dt::Point)>,
|
||||||
ValueFunctor
|
ValueFunctor
|
||||||
>::value>* = nullptr)
|
>::value>* = nullptr)
|
||||||
{
|
{
|
||||||
|
|
@ -255,7 +255,7 @@ sibson_gradient_fitting_nn_2(const Dt& dt,
|
||||||
const Traits& traits,
|
const Traits& traits,
|
||||||
std::enable_if_t<
|
std::enable_if_t<
|
||||||
std::is_constructible<
|
std::is_constructible<
|
||||||
std::function<boost::any(typename Dt::Vertex_handle)>,
|
std::function<std::any(typename Dt::Vertex_handle)>,
|
||||||
ValueFunctor
|
ValueFunctor
|
||||||
>::value>* = nullptr)
|
>::value>* = nullptr)
|
||||||
{
|
{
|
||||||
|
|
@ -299,7 +299,7 @@ sibson_gradient_fitting_rn_2(const Rt& rt,
|
||||||
// of the value functor is 'Rt::Point' (weighted point) or 'Rt::Vertex_handle'
|
// of the value functor is 'Rt::Point' (weighted point) or 'Rt::Vertex_handle'
|
||||||
std::enable_if_t<
|
std::enable_if_t<
|
||||||
std::is_constructible<
|
std::is_constructible<
|
||||||
std::function<boost::any(typename Rt::Point)>,
|
std::function<std::any(typename Rt::Point)>,
|
||||||
ValueFunctor
|
ValueFunctor
|
||||||
>::value>* = nullptr)
|
>::value>* = nullptr)
|
||||||
{
|
{
|
||||||
|
|
@ -325,7 +325,7 @@ sibson_gradient_fitting_rn_2(const Rt& rt,
|
||||||
const Traits& traits,
|
const Traits& traits,
|
||||||
std::enable_if_t<
|
std::enable_if_t<
|
||||||
std::is_constructible<
|
std::is_constructible<
|
||||||
std::function<boost::any(typename Rt::Vertex_handle)>,
|
std::function<std::any(typename Rt::Vertex_handle)>,
|
||||||
ValueFunctor
|
ValueFunctor
|
||||||
>::value>* = nullptr)
|
>::value>* = nullptr)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
#include <boost/variant.hpp>
|
#include <boost/variant.hpp>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#include <boost/timer.hpp>
|
#include <boost/timer.hpp>
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
|
|
@ -78,7 +78,7 @@ intersection_variant(const typename K::Segment_2 &seg1,
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class K>
|
template <class K>
|
||||||
boost::any intersection_any(const typename K::Segment_2 &seg1,
|
std::any intersection_any(const typename K::Segment_2 &seg1,
|
||||||
const typename K::Segment_2 &seg2,
|
const typename K::Segment_2 &seg2,
|
||||||
const K&)
|
const K&)
|
||||||
{
|
{
|
||||||
|
|
@ -88,11 +88,11 @@ boost::any intersection_any(const typename K::Segment_2 &seg1,
|
||||||
switch (ispair.intersection_type()) {
|
switch (ispair.intersection_type()) {
|
||||||
case is_t::NO_INTERSECTION:
|
case is_t::NO_INTERSECTION:
|
||||||
default:
|
default:
|
||||||
return boost::any();
|
return std::any();
|
||||||
case is_t::POINT:
|
case is_t::POINT:
|
||||||
return boost::any(ispair.intersection_point());
|
return std::any(ispair.intersection_point());
|
||||||
case is_t::SEGMENT:
|
case is_t::SEGMENT:
|
||||||
return boost::any(ispair.intersection_segment());
|
return std::any(ispair.intersection_segment());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -165,10 +165,10 @@ struct Any_f : Vec_holder {
|
||||||
Vec_holder(p, s) { }
|
Vec_holder(p, s) { }
|
||||||
|
|
||||||
void operator()(const Segment& s1, const Segment& s2) {
|
void operator()(const Segment& s1, const Segment& s2) {
|
||||||
boost::any obj = intersection_any(s1, s2, K());
|
std::any obj = intersection_any(s1, s2, K());
|
||||||
if (const Point * point = boost::any_cast<Point>(&obj)) {
|
if (const Point * point = std::any_cast<Point>(&obj)) {
|
||||||
p->push_back(*point);
|
p->push_back(*point);
|
||||||
} else if (const Segment * segment = boost::any_cast<Segment>(&obj)) {
|
} else if (const Segment * segment = std::any_cast<Segment>(&obj)) {
|
||||||
s->push_back(*segment);
|
s->push_back(*segment);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <boost/none.hpp>
|
#include <boost/none.hpp>
|
||||||
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -62,7 +62,7 @@ public:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef typename Traits::Point Point; // geometric embedding
|
typedef typename Traits::Point Point; // geometric embedding
|
||||||
|
|
@ -151,7 +151,7 @@ public:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef typename std::list<Halfedge_handle>::iterator fc_iterator;
|
typedef typename std::list<Halfedge_handle>::iterator fc_iterator;
|
||||||
|
|
@ -248,7 +248,7 @@ public:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef typename Traits::Mark Mark; // mark information
|
typedef typename Traits::Mark Mark; // mark information
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
#include <CGAL/Nef_2/debug.h>
|
#include <CGAL/Nef_2/debug.h>
|
||||||
|
|
||||||
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <CGAL/use.h>
|
#include <CGAL/use.h>
|
||||||
|
|
@ -137,7 +137,7 @@ typedef size_t Size_type;
|
||||||
/*{\Mtypemember The size type.}*/
|
/*{\Mtypemember The size type.}*/
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <CGAL/Nef_2/geninfo.h>
|
#include <CGAL/Nef_2/geninfo.h>
|
||||||
#else
|
#else
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
#include <CGAL/Unique_hash_map.h>
|
#include <CGAL/Unique_hash_map.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <CGAL/Nef_2/geninfo.h>
|
#include <CGAL/Nef_2/geninfo.h>
|
||||||
#else
|
#else
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
#undef CGAL_NEF_DEBUG
|
#undef CGAL_NEF_DEBUG
|
||||||
#define CGAL_NEF_DEBUG 13
|
#define CGAL_NEF_DEBUG 13
|
||||||
|
|
@ -92,7 +92,7 @@ struct PMO_from_segs {
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
geninfo<Halfedge_handle>::access(G.info(v)) = e;
|
geninfo<Halfedge_handle>::access(G.info(v)) = e;
|
||||||
#else
|
#else
|
||||||
*boost::any_cast<Halfedge_handle>(&G.info(v)) = e;
|
*std::any_cast<Halfedge_handle>(&G.info(v)) = e;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -102,7 +102,7 @@ struct PMO_from_segs {
|
||||||
return geninfo<Halfedge_handle>::access(G.info(v));
|
return geninfo<Halfedge_handle>::access(G.info(v));
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
boost::any_cast<Halfedge_handle>(G.info(v));
|
std::any_cast<Halfedge_handle>(G.info(v));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -112,7 +112,7 @@ struct PMO_from_segs {
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
geninfo<Halfedge_handle>::clear(G.info(v));
|
geninfo<Halfedge_handle>::clear(G.info(v));
|
||||||
#else
|
#else
|
||||||
G.info(v)=boost::any();
|
G.info(v)=std::any();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -674,7 +674,7 @@ void discard_info(Vertex_handle v) const
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
geninfo<vertex_info>::clear(info(v));
|
geninfo<vertex_info>::clear(info(v));
|
||||||
#else
|
#else
|
||||||
info(v)=boost::any();
|
info(v)=std::any();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -684,7 +684,7 @@ vertex_info& ginfo(Vertex_handle v) const
|
||||||
return geninfo<vertex_info>::access(info(v));
|
return geninfo<vertex_info>::access(info(v));
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
*boost::any_cast<vertex_info>(&info(v));
|
*std::any_cast<vertex_info>(&info(v));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -729,8 +729,8 @@ void discard_info(Halfedge_handle e) const
|
||||||
geninfo<halfedge_info>::clear(info(e));
|
geninfo<halfedge_info>::clear(info(e));
|
||||||
geninfo<halfedge_info>::clear(info(twin(e)));
|
geninfo<halfedge_info>::clear(info(twin(e)));
|
||||||
#else
|
#else
|
||||||
info(e)=boost::any();
|
info(e)=std::any();
|
||||||
info(twin(e))=boost::any();
|
info(twin(e))=std::any();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -740,7 +740,7 @@ halfedge_info& ginfo(Halfedge_handle e) const
|
||||||
return geninfo<halfedge_info>::access(info(e));
|
return geninfo<halfedge_info>::access(info(e));
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
*boost::any_cast<halfedge_info>(&info(e));
|
*std::any_cast<halfedge_info>(&info(e));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -782,7 +782,7 @@ void discard_info(Face_handle f) const
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
geninfo<face_info>::clear(info(f));
|
geninfo<face_info>::clear(info(f));
|
||||||
#else
|
#else
|
||||||
info(f)=boost::any();
|
info(f)=std::any();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -792,7 +792,7 @@ face_info& ginfo(Face_handle f) const
|
||||||
return geninfo<face_info>::access(info(f));
|
return geninfo<face_info>::access(info(f));
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
*boost::any_cast<face_info>(&info(f));
|
*std::any_cast<face_info>(&info(f));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <CGAL/Nef_2/geninfo.h>
|
#include <CGAL/Nef_2/geninfo.h>
|
||||||
#else
|
#else
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CGAL_USE_LEDA_LIBRARY
|
#ifdef CGAL_USE_LEDA_LIBRARY
|
||||||
|
|
@ -497,7 +497,7 @@ protected:
|
||||||
return geninfo<VF_pair>::const_access(CT.info(v)).first;
|
return geninfo<VF_pair>::const_access(CT.info(v)).first;
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
boost::any_cast<VF_pair>(CT.info(v)).first;
|
std::any_cast<VF_pair>(CT.info(v)).first;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -507,7 +507,7 @@ protected:
|
||||||
return geninfo<EF_pair>::const_access(CT.info(e)).first;
|
return geninfo<EF_pair>::const_access(CT.info(e)).first;
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
boost::any_cast<EF_pair>(CT.info(e)).first;
|
std::any_cast<EF_pair>(CT.info(e)).first;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -517,7 +517,7 @@ protected:
|
||||||
return geninfo<EF_pair>::const_access(CT.info(e)).second;
|
return geninfo<EF_pair>::const_access(CT.info(e)).second;
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
boost::any_cast<EF_pair>(CT.info(e)).second;
|
std::any_cast<EF_pair>(CT.info(e)).second;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -584,10 +584,10 @@ protected:
|
||||||
f = geninfo<EF_pair>::access(info(e_from)).second;
|
f = geninfo<EF_pair>::access(info(e_from)).second;
|
||||||
#else
|
#else
|
||||||
f =
|
f =
|
||||||
boost::any_cast<VF_pair>(info(source(e))).second;
|
std::any_cast<VF_pair>(info(source(e))).second;
|
||||||
else
|
else
|
||||||
f =
|
f =
|
||||||
boost::any_cast<EF_pair>(info(e_from)).second;
|
std::any_cast<EF_pair>(info(e_from)).second;
|
||||||
#endif
|
#endif
|
||||||
mark(e) = _DP.mark(f);
|
mark(e) = _DP.mark(f);
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
|
|
@ -968,7 +968,7 @@ PM_point_locator<PMD,GEO>::
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
geninfo<VF_pair>::clear(CT.info(vit));
|
geninfo<VF_pair>::clear(CT.info(vit));
|
||||||
#else
|
#else
|
||||||
CT.info(vit)=boost::any();
|
CT.info(vit)=std::any();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
Halfedge_iterator eit, eend = CT.halfedges_end();
|
Halfedge_iterator eit, eend = CT.halfedges_end();
|
||||||
|
|
@ -976,7 +976,7 @@ PM_point_locator<PMD,GEO>::
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
geninfo<EF_pair>::clear(CT.info(eit));
|
geninfo<EF_pair>::clear(CT.info(eit));
|
||||||
#else
|
#else
|
||||||
CT.info(eit)=boost::any();
|
CT.info(eit)=std::any();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
CT.clear();
|
CT.clear();
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <CGAL/Nef_2/geninfo.h>
|
#include <CGAL/Nef_2/geninfo.h>
|
||||||
#else
|
#else
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -55,7 +55,7 @@ class GenericLocation {
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
public:
|
public:
|
||||||
/*{\Mtypes}*/
|
/*{\Mtypes}*/
|
||||||
|
|
@ -89,7 +89,7 @@ public:
|
||||||
return geninfo<Node>::const_access(value);
|
return geninfo<Node>::const_access(value);
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
*boost::any_cast<Node>(&value);
|
*std::any_cast<Node>(&value);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
/*{\Mconversion converts |\Mvar| into a node.\\
|
/*{\Mconversion converts |\Mvar| into a node.\\
|
||||||
|
|
@ -105,7 +105,7 @@ public:
|
||||||
return geninfo<Edge>::const_access(value);
|
return geninfo<Edge>::const_access(value);
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
*boost::any_cast<Edge>(&value);
|
*std::any_cast<Edge>(&value);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
/*{\Mconversion converts |\Mvar| into an edge.\\
|
/*{\Mconversion converts |\Mvar| into an edge.\\
|
||||||
|
|
@ -159,8 +159,8 @@ public:
|
||||||
case NODE: geninfo<Node>::clear(value); break;
|
case NODE: geninfo<Node>::clear(value); break;
|
||||||
case EDGE: geninfo<Edge>::clear(value); break;
|
case EDGE: geninfo<Edge>::clear(value); break;
|
||||||
#else
|
#else
|
||||||
case NODE: value=boost::any(); break;
|
case NODE: value=std::any(); break;
|
||||||
case EDGE: value=boost::any(); break;
|
case EDGE: value=std::any(); break;
|
||||||
#endif
|
#endif
|
||||||
case NIL: break;
|
case NIL: break;
|
||||||
}
|
}
|
||||||
|
|
@ -174,14 +174,14 @@ public:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
geninfo<Node>::access(value) = geninfo<Node>::const_access(L.value);
|
geninfo<Node>::access(value) = geninfo<Node>::const_access(L.value);
|
||||||
#else
|
#else
|
||||||
*boost_any_cast<Node>(&value) = boost::any_cast<Node>(L.value);
|
*boost_any_cast<Node>(&value) = std::any_cast<Node>(L.value);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case EDGE:
|
case EDGE:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
geninfo<Edge>::access(value) = geninfo<Edge>::const_access(L.value);
|
geninfo<Edge>::access(value) = geninfo<Edge>::const_access(L.value);
|
||||||
#else
|
#else
|
||||||
*boost::any_cast<Edge>(&value) = boost::any_cast<Edge>(L.value);
|
*std::any_cast<Edge>(&value) = std::any_cast<Edge>(L.value);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case NIL: break;
|
case NIL: break;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
#define CGAL_DEPRECATED_HEADER "<CGAL/Nef_2/geninfo.h>"
|
#define CGAL_DEPRECATED_HEADER "<CGAL/Nef_2/geninfo.h>"
|
||||||
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
|
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
|
||||||
"Something like boost::any or boost::variant should be used instead."
|
"Something like std::any or boost::variant should be used instead."
|
||||||
#include <CGAL/Installation/internal/deprecation_warning.h>
|
#include <CGAL/Installation/internal/deprecation_warning.h>
|
||||||
|
|
||||||
#include <CGAL/config.h>
|
#include <CGAL/config.h>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
#include <CGAL/Nef_2/debug.h>
|
#include <CGAL/Nef_2/debug.h>
|
||||||
|
|
||||||
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -42,7 +42,7 @@ class Halfedge_base
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
typedef typename Refs::Mark Mark;
|
typedef typename Refs::Mark Mark;
|
||||||
typedef typename Refs::Vector_3 Vector_3;
|
typedef typename Refs::Vector_3 Vector_3;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
#include <CGAL/Nef_2/debug.h>
|
#include <CGAL/Nef_2/debug.h>
|
||||||
|
|
||||||
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -39,7 +39,7 @@ class SFace_base {
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
typedef typename Refs::Mark Mark;
|
typedef typename Refs::Mark Mark;
|
||||||
typedef typename Refs::Vertex_handle Vertex_handle;
|
typedef typename Refs::Vertex_handle Vertex_handle;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
#include <CGAL/Nef_2/debug.h>
|
#include <CGAL/Nef_2/debug.h>
|
||||||
|
|
||||||
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -40,7 +40,7 @@ class SHalfedge_base {
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
typedef typename Refs::Mark Mark;
|
typedef typename Refs::Mark Mark;
|
||||||
typedef typename Refs::Sphere_circle Sphere_circle;
|
typedef typename Refs::Sphere_circle Sphere_circle;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <CGAL/Nef_2/geninfo.h>
|
#include <CGAL/Nef_2/geninfo.h>
|
||||||
#else
|
#else
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
#include <CGAL/Nef_2/Segment_overlay_traits.h>
|
#include <CGAL/Nef_2/Segment_overlay_traits.h>
|
||||||
#include <CGAL/Nef_3/SNC_decorator.h>
|
#include <CGAL/Nef_3/SNC_decorator.h>
|
||||||
|
|
@ -413,7 +413,7 @@ protected:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
Edge_of[geninfo<unsigned>::access(info(e_min->twin()->source()->twin()->source()))];
|
Edge_of[geninfo<unsigned>::access(info(e_min->twin()->source()->twin()->source()))];
|
||||||
#else
|
#else
|
||||||
Edge_of[ boost::any_cast<unsigned>(info(e_min->twin()->source()->twin()->source())) ];
|
Edge_of[ std::any_cast<unsigned>(info(e_min->twin()->source()->twin()->source())) ];
|
||||||
#endif
|
#endif
|
||||||
CGAL_assertion( e_below != SHalfedge_handle() );
|
CGAL_assertion( e_below != SHalfedge_handle() );
|
||||||
CGAL_NEF_TRACEN(" edge below " << debug(e_below));
|
CGAL_NEF_TRACEN(" edge below " << debug(e_below));
|
||||||
|
|
@ -652,7 +652,7 @@ create_facet_objects(const Plane_3& plane_supporting_facet,
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
Edge_of[geninfo<unsigned>::access(info(l->incident_sface()->center_vertex()))];
|
Edge_of[geninfo<unsigned>::access(info(l->incident_sface()->center_vertex()))];
|
||||||
#else
|
#else
|
||||||
Edge_of[ boost::any_cast<unsigned>(info(l->incident_sface()->center_vertex())) ];
|
Edge_of[ std::any_cast<unsigned>(info(l->incident_sface()->center_vertex())) ];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CGAL_assertion( e_below != SHalfedge_handle() );
|
CGAL_assertion( e_below != SHalfedge_handle() );
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <CGAL/Nef_2/geninfo.h>
|
#include <CGAL/Nef_2/geninfo.h>
|
||||||
#else
|
#else
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
#include <CGAL/Nef_S2/Sphere_geometry.h>
|
#include <CGAL/Nef_S2/Sphere_geometry.h>
|
||||||
#include <CGAL/Nef_S2/SM_decorator.h>
|
#include <CGAL/Nef_S2/SM_decorator.h>
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
#include <CGAL/Nef_2/debug.h>
|
#include <CGAL/Nef_2/debug.h>
|
||||||
|
|
||||||
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -118,7 +118,7 @@ public:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SNC_const_decorator() : sncp_(0) {}
|
SNC_const_decorator() : sncp_(0) {}
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
#include <CGAL/Nef_2/debug.h>
|
#include <CGAL/Nef_2/debug.h>
|
||||||
|
|
||||||
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -157,7 +157,7 @@ class SNC_decorator : public SNC_const_decorator<Map> {
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SNC_decorator() : Base(), sncp_() {}
|
SNC_decorator() : Base(), sncp_() {}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@
|
||||||
#include <CGAL/Nef_2/debug.h>
|
#include <CGAL/Nef_2/debug.h>
|
||||||
|
|
||||||
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <boost/mpl/has_xxx.hpp>
|
#include <boost/mpl/has_xxx.hpp>
|
||||||
|
|
@ -963,7 +963,7 @@ public:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using Base::visit_shell_objects;
|
using Base::visit_shell_objects;
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
#include <CGAL/Nef_2/debug.h>
|
#include <CGAL/Nef_2/debug.h>
|
||||||
|
|
||||||
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -41,7 +41,7 @@ class Vertex_base {
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
typedef typename Refs::Mark Mark;
|
typedef typename Refs::Mark Mark;
|
||||||
typedef typename Refs::Point_3 Point_3;
|
typedef typename Refs::Point_3 Point_3;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
#define CGAL_NEF_DEBUG 67
|
#define CGAL_NEF_DEBUG 67
|
||||||
#include <CGAL/Nef_2/debug.h>
|
#include <CGAL/Nef_2/debug.h>
|
||||||
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -75,7 +75,7 @@ typedef size_t Size_type;
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
#include <CGAL/Unique_hash_map.h>
|
#include <CGAL/Unique_hash_map.h>
|
||||||
#include <CGAL/IO/Verbose_ostream.h>
|
#include <CGAL/IO/Verbose_ostream.h>
|
||||||
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -84,7 +84,7 @@ typedef typename Sphere_kernel::Aff_transformation_3 Aff_transformation_3;
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
typedef typename Map::SVertex SVertex;
|
typedef typename Map::SVertex SVertex;
|
||||||
typedef typename Map::SVertex_handle SVertex_handle;
|
typedef typename Map::SVertex_handle SVertex_handle;
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifndef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -45,7 +45,7 @@ public:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
typedef typename Refs::Mark Mark;
|
typedef typename Refs::Mark Mark;
|
||||||
typedef typename Refs::Sphere_point Sphere_point;
|
typedef typename Refs::Sphere_point Sphere_point;
|
||||||
|
|
@ -127,7 +127,7 @@ public:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
typedef typename Refs::Mark Mark;
|
typedef typename Refs::Mark Mark;
|
||||||
typedef typename Refs::Sphere_circle Sphere_circle;
|
typedef typename Refs::Sphere_circle Sphere_circle;
|
||||||
|
|
@ -228,7 +228,7 @@ public:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
typedef typename Refs::Mark Mark;
|
typedef typename Refs::Mark Mark;
|
||||||
typedef typename Refs::Sphere_circle Sphere_circle;
|
typedef typename Refs::Sphere_circle Sphere_circle;
|
||||||
|
|
@ -306,7 +306,7 @@ public:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
typedef void* GenPtr;
|
typedef void* GenPtr;
|
||||||
#else
|
#else
|
||||||
typedef boost::any GenPtr;
|
typedef std::any GenPtr;
|
||||||
#endif
|
#endif
|
||||||
typedef typename Refs::Mark Mark;
|
typedef typename Refs::Mark Mark;
|
||||||
typedef typename Refs::Object_handle Object_handle;
|
typedef typename Refs::Object_handle Object_handle;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <CGAL/Nef_2/geninfo.h>
|
#include <CGAL/Nef_2/geninfo.h>
|
||||||
#else
|
#else
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
#include <CGAL/Nef_S2/Sphere_geometry.h>
|
#include <CGAL/Nef_S2/Sphere_geometry.h>
|
||||||
#include <CGAL/Nef_S2/SM_decorator.h>
|
#include <CGAL/Nef_S2/SM_decorator.h>
|
||||||
|
|
@ -106,7 +106,7 @@ struct SMO_from_segs {
|
||||||
return geninfo<Halfedge_handle>::access(G.info(v));
|
return geninfo<Halfedge_handle>::access(G.info(v));
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
boost::any_cast<Halfedge_handle>( G.info(v) );
|
std::any_cast<Halfedge_handle>( G.info(v) );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -122,7 +122,7 @@ struct SMO_from_segs {
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
geninfo<Halfedge_handle>::clear(G.info(v));
|
geninfo<Halfedge_handle>::clear(G.info(v));
|
||||||
#else
|
#else
|
||||||
G.info(v)=boost::any();
|
G.info(v)=std::any();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -141,7 +141,7 @@ struct SMO_from_segs {
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
geninfo<Halfedge_handle>::clear(G.info(v));
|
geninfo<Halfedge_handle>::clear(G.info(v));
|
||||||
#else
|
#else
|
||||||
G.info(v)=boost::any();
|
G.info(v)=std::any();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -564,7 +564,7 @@ public:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
geninfo<vertex_info>::clear(info(v));
|
geninfo<vertex_info>::clear(info(v));
|
||||||
#else
|
#else
|
||||||
info(v)=boost::any();
|
info(v)=std::any();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -574,7 +574,7 @@ public:
|
||||||
return geninfo<vertex_info>::access(info(v));
|
return geninfo<vertex_info>::access(info(v));
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
*boost::any_cast<vertex_info>(&info(v));
|
*std::any_cast<vertex_info>(&info(v));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -618,8 +618,8 @@ public:
|
||||||
geninfo<edge_info>::clear(info(e));
|
geninfo<edge_info>::clear(info(e));
|
||||||
geninfo<edge_info>::clear(info(e->twin()));
|
geninfo<edge_info>::clear(info(e->twin()));
|
||||||
#else
|
#else
|
||||||
info(e)=boost::any();
|
info(e)=std::any();
|
||||||
info(e->twin())=boost::any();
|
info(e->twin())=std::any();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -629,7 +629,7 @@ public:
|
||||||
return geninfo<edge_info>::access(info(e));
|
return geninfo<edge_info>::access(info(e));
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
*boost::any_cast<edge_info>(&info(e));
|
*std::any_cast<edge_info>(&info(e));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -671,7 +671,7 @@ public:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
geninfo<face_info>::clear(info(f));
|
geninfo<face_info>::clear(info(f));
|
||||||
#else
|
#else
|
||||||
info(f)=boost::any();
|
info(f)=std::any();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -681,7 +681,7 @@ public:
|
||||||
return geninfo<face_info>::access(info(f));
|
return geninfo<face_info>::access(info(f));
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
*boost::any_cast<face_info>(&info(f));
|
*std::any_cast<face_info>(&info(f));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <CGAL/Nef_2/geninfo.h>
|
#include <CGAL/Nef_2/geninfo.h>
|
||||||
#else
|
#else
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
#include <CGAL/Nef_2/Object_handle.h>
|
#include <CGAL/Nef_2/Object_handle.h>
|
||||||
#include <CGAL/Nef_S2/SM_decorator_traits.h>
|
#include <CGAL/Nef_S2/SM_decorator_traits.h>
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
#include <CGAL/Nef_2/geninfo.h>
|
#include <CGAL/Nef_2/geninfo.h>
|
||||||
#else
|
#else
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#endif
|
#endif
|
||||||
#include <CGAL/Nef_S2/SM_decorator.h>
|
#include <CGAL/Nef_S2/SM_decorator.h>
|
||||||
#include <CGAL/Nef_S2/SM_const_decorator.h>
|
#include <CGAL/Nef_S2/SM_const_decorator.h>
|
||||||
|
|
@ -213,7 +213,7 @@ public:
|
||||||
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
#ifdef CGAL_I_DO_WANT_TO_USE_GENINFO
|
||||||
geninfo<vertex_info>::clear(info(v));
|
geninfo<vertex_info>::clear(info(v));
|
||||||
#else
|
#else
|
||||||
info(v)=boost::any();
|
info(v)=std::any();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -223,7 +223,7 @@ public:
|
||||||
return geninfo<vertex_info>::access(info(v));
|
return geninfo<vertex_info>::access(info(v));
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
*boost::any_cast<vertex_info>(&info(v));
|
*std::any_cast<vertex_info>(&info(v));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -258,8 +258,8 @@ public:
|
||||||
geninfo<edge_info>::clear(info(e));
|
geninfo<edge_info>::clear(info(e));
|
||||||
geninfo<edge_info>::clear(info(e->twin()));
|
geninfo<edge_info>::clear(info(e->twin()));
|
||||||
#else
|
#else
|
||||||
info(e)=boost::any();
|
info(e)=std::any();
|
||||||
info(e->twin())=boost::any();
|
info(e->twin())=std::any();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -269,7 +269,7 @@ public:
|
||||||
return geninfo<edge_info>::access(info(e));
|
return geninfo<edge_info>::access(info(e));
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
*boost::any_cast<edge_info>(&info(e));
|
*std::any_cast<edge_info>(&info(e));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -288,7 +288,7 @@ public:
|
||||||
return geninfo<edge_info>::const_access(info(e));
|
return geninfo<edge_info>::const_access(info(e));
|
||||||
#else
|
#else
|
||||||
return
|
return
|
||||||
*boost::any_cast<edge_info>(&info(e));
|
*std::any_cast<edge_info>(&info(e));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
const Mark& incident_mark(SHalfedge_const_handle e) const
|
const Mark& incident_mark(SHalfedge_const_handle e) const
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
#include <tbb/blocked_range.h>
|
#include <tbb/blocked_range.h>
|
||||||
#endif // CGAL_LINKED_WITH_TBB
|
#endif // CGAL_LINKED_WITH_TBB
|
||||||
|
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
|
|
||||||
#include <unordered_set>
|
#include <unordered_set>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
@ -1818,10 +1818,10 @@ struct Bounded_error_preprocessing
|
||||||
#ifdef CGAL_HAUSDORFF_DEBUG
|
#ifdef CGAL_HAUSDORFF_DEBUG
|
||||||
using Timer = CGAL::Real_timer;
|
using Timer = CGAL::Real_timer;
|
||||||
#endif
|
#endif
|
||||||
std::vector<boost::any>& tm_wrappers;
|
std::vector<std::any>& tm_wrappers;
|
||||||
|
|
||||||
// Constructor.
|
// Constructor.
|
||||||
Bounded_error_preprocessing(std::vector<boost::any>& tm_wrappers)
|
Bounded_error_preprocessing(std::vector<std::any>& tm_wrappers)
|
||||||
: tm_wrappers(tm_wrappers)
|
: tm_wrappers(tm_wrappers)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|
@ -1830,8 +1830,8 @@ struct Bounded_error_preprocessing
|
||||||
: tm_wrappers(s.tm_wrappers)
|
: tm_wrappers(s.tm_wrappers)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
bool is_tm1_wrapper(const boost::any& operand) const { return operand.type() == typeid(TM1Wrapper); }
|
bool is_tm1_wrapper(const std::any& operand) const { return operand.type() == typeid(TM1Wrapper); }
|
||||||
bool is_tm2_wrapper(const boost::any& operand) const { return operand.type() == typeid(TM2Wrapper); }
|
bool is_tm2_wrapper(const std::any& operand) const { return operand.type() == typeid(TM2Wrapper); }
|
||||||
|
|
||||||
// TODO: make AABB tree build parallel!
|
// TODO: make AABB tree build parallel!
|
||||||
void operator()(const tbb::blocked_range<std::size_t>& range)
|
void operator()(const tbb::blocked_range<std::size_t>& range)
|
||||||
|
|
@ -1849,12 +1849,12 @@ struct Bounded_error_preprocessing
|
||||||
auto& tm_wrapper = tm_wrappers[i];
|
auto& tm_wrapper = tm_wrappers[i];
|
||||||
if(is_tm1_wrapper(tm_wrapper))
|
if(is_tm1_wrapper(tm_wrapper))
|
||||||
{
|
{
|
||||||
TM1Wrapper& object = boost::any_cast<TM1Wrapper&>(tm_wrapper);
|
TM1Wrapper& object = std::any_cast<TM1Wrapper&>(tm_wrapper);
|
||||||
object.build_tree();
|
object.build_tree();
|
||||||
}
|
}
|
||||||
else if(is_tm2_wrapper(tm_wrapper))
|
else if(is_tm2_wrapper(tm_wrapper))
|
||||||
{
|
{
|
||||||
TM2Wrapper& object = boost::any_cast<TM2Wrapper&>(tm_wrapper);
|
TM2Wrapper& object = std::any_cast<TM2Wrapper&>(tm_wrapper);
|
||||||
object.build_tree();
|
object.build_tree();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -2031,7 +2031,7 @@ bounded_error_squared_one_sided_Hausdorff_distance_impl(const TriangleMesh1& tm1
|
||||||
|
|
||||||
std::vector<TMF> tm1_parts;
|
std::vector<TMF> tm1_parts;
|
||||||
std::vector<TMF_tree> tm1_trees;
|
std::vector<TMF_tree> tm1_trees;
|
||||||
std::vector<boost::any> tm_wrappers;
|
std::vector<std::any> tm_wrappers;
|
||||||
#endif // defined(CGAL_LINKED_WITH_TBB) && defined(CGAL_METIS_ENABLED)
|
#endif // defined(CGAL_LINKED_WITH_TBB) && defined(CGAL_METIS_ENABLED)
|
||||||
|
|
||||||
#ifdef CGAL_HAUSDORFF_DEBUG
|
#ifdef CGAL_HAUSDORFF_DEBUG
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
#include <CGAL/make_mesh_3.h> // for C3t3_initializer
|
#include <CGAL/make_mesh_3.h> // for C3t3_initializer
|
||||||
#include <CGAL/use.h>
|
#include <CGAL/use.h>
|
||||||
|
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
class Image_3;
|
class Image_3;
|
||||||
|
|
@ -114,7 +114,7 @@ private:
|
||||||
void tweak_criteria(Mesh_criteria&, Mesh_fnt::Domain_tag) {}
|
void tweak_criteria(Mesh_criteria&, Mesh_fnt::Domain_tag) {}
|
||||||
void tweak_criteria(Mesh_criteria&, Mesh_fnt::Polyhedral_domain_tag);
|
void tweak_criteria(Mesh_criteria&, Mesh_fnt::Polyhedral_domain_tag);
|
||||||
private:
|
private:
|
||||||
boost::any object_to_destroy;
|
std::any object_to_destroy;
|
||||||
C3t3& c3t3_;
|
C3t3& c3t3_;
|
||||||
Domain* const domain_;
|
Domain* const domain_;
|
||||||
Mesh_parameters const p_;
|
Mesh_parameters const p_;
|
||||||
|
|
@ -268,10 +268,10 @@ edge_criteria(double edge_size, Mesh_fnt::Polyhedral_domain_tag)
|
||||||
domain_->aabb_tree(),
|
domain_->aabb_tree(),
|
||||||
*domain_);
|
*domain_);
|
||||||
// The sizing field object, as well as the `patch_ids_vector` are
|
// The sizing field object, as well as the `patch_ids_vector` are
|
||||||
// allocated on the heap, and the following `boost::any` object,
|
// allocated on the heap, and the following `std::any` object,
|
||||||
// containing two shared pointers, is used to make the allocated
|
// containing two shared pointers, is used to make the allocated
|
||||||
// objects be destroyed at the destruction of the thread object, using
|
// objects be destroyed at the destruction of the thread object, using
|
||||||
// type erasure (`boost::any`).
|
// type erasure (`std::any`).
|
||||||
object_to_destroy =
|
object_to_destroy =
|
||||||
std::make_pair(QSharedPointer<Mesh_sizing_field>(sizing_field_ptr),
|
std::make_pair(QSharedPointer<Mesh_sizing_field>(sizing_field_ptr),
|
||||||
QSharedPointer<Patches_ids_vector>(patches_ids_vector_p));
|
QSharedPointer<Patches_ids_vector>(patches_ids_vector_p));
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ this is done with the global function `make_object()`. This
|
||||||
encapsulation mechanism requires the use of `assign` or
|
encapsulation mechanism requires the use of `assign` or
|
||||||
`object_cast` to use the functionality of the encapsulated class.
|
`object_cast` to use the functionality of the encapsulated class.
|
||||||
|
|
||||||
This class is similar in spirit to `boost::any`.
|
This class is similar in spirit to `std::any`.
|
||||||
|
|
||||||
\cgalHeading{Example}
|
\cgalHeading{Example}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ For handles and indices of vertices, halfedges, faces, etc., we provide speciali
|
||||||
The class `Object` can store an object of whatever other type.
|
The class `Object` can store an object of whatever other type.
|
||||||
It can be used by a function to return objects of different types.
|
It can be used by a function to return objects of different types.
|
||||||
A mechanism to extract the stored object based on its type is also provided.
|
A mechanism to extract the stored object based on its type is also provided.
|
||||||
This class is similar to `boost::any`.
|
This class is similar to `std::any`.
|
||||||
|
|
||||||
\section stl_uncertainty Uncertainty Management
|
\section stl_uncertainty Uncertainty Management
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,20 +29,20 @@
|
||||||
|
|
||||||
#include <boost/variant.hpp>
|
#include <boost/variant.hpp>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <boost/any.hpp>
|
#include <any>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
class Object
|
class Object
|
||||||
{
|
{
|
||||||
std::shared_ptr<boost::any> obj;
|
std::shared_ptr<std::any> obj;
|
||||||
|
|
||||||
// returns an any pointer from a variant
|
// returns an any pointer from a variant
|
||||||
struct Any_from_variant : public boost::static_visitor<boost::any*> {
|
struct Any_from_variant : public boost::static_visitor<std::any*> {
|
||||||
template<typename T>
|
template<typename T>
|
||||||
boost::any* operator()(const T& t) const {
|
std::any* operator()(const T& t) const {
|
||||||
return new boost::any(t);
|
return new std::any(t);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -61,7 +61,7 @@ class Object
|
||||||
Object() : obj() { }
|
Object() : obj() { }
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
Object(T && t, private_tag) : obj(new boost::any(std::forward<T>(t))) { }
|
Object(T && t, private_tag) : obj(new std::any(std::forward<T>(t))) { }
|
||||||
|
|
||||||
// implicit constructor from optionals containing variants
|
// implicit constructor from optionals containing variants
|
||||||
template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
|
template<BOOST_VARIANT_ENUM_PARAMS(typename T)>
|
||||||
|
|
@ -76,7 +76,7 @@ class Object
|
||||||
template <class T>
|
template <class T>
|
||||||
bool assign(T &t) const
|
bool assign(T &t) const
|
||||||
{
|
{
|
||||||
const T* res = boost::any_cast<T>(obj.get());
|
const T* res = std::any_cast<T>(obj.get());
|
||||||
if (!res) return false;
|
if (!res) return false;
|
||||||
t = *res;
|
t = *res;
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -105,7 +105,7 @@ class Object
|
||||||
template <class T>
|
template <class T>
|
||||||
bool is() const
|
bool is() const
|
||||||
{
|
{
|
||||||
return obj && boost::any_cast<T>(obj.get());
|
return obj && std::any_cast<T>(obj.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::type_info & type() const
|
const std::type_info & type() const
|
||||||
|
|
@ -159,14 +159,14 @@ template <class T>
|
||||||
inline
|
inline
|
||||||
const T * object_cast(const Object * o)
|
const T * object_cast(const Object * o)
|
||||||
{
|
{
|
||||||
return boost::any_cast<T>((o->obj).get());
|
return std::any_cast<T>((o->obj).get());
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
inline
|
inline
|
||||||
T object_cast(const Object & o)
|
T object_cast(const Object & o)
|
||||||
{
|
{
|
||||||
const T * result = boost::any_cast<T>((o.obj).get());
|
const T * result = std::any_cast<T>((o.obj).get());
|
||||||
if (!result)
|
if (!result)
|
||||||
throw Bad_object_cast();
|
throw Bad_object_cast();
|
||||||
return *result;
|
return *result;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue