Merge pull request #3781 from sloriot/CGAL-update_for_cpp14

Update for cpp14
This commit is contained in:
Laurent Rineau 2019-04-08 15:59:28 +02:00
commit 04bef2b071
687 changed files with 2534 additions and 12139 deletions

View File

@ -64,7 +64,7 @@ void surface_mesh_cache_bbox(const char* fname)
t.start(); t.start();
Bbox_pmap bb = tmesh.add_property_map<face_descriptor,Bbox_3>("f:bbox",Bbox_3()).first; Bbox_pmap bb = tmesh.add_property_map<face_descriptor,Bbox_3>("f:bbox",Bbox_3()).first;
BOOST_FOREACH(face_descriptor fd, faces(tmesh)){ for(face_descriptor fd : faces(tmesh)){
put(bb, fd, bbox(fd,tmesh)); put(bb, fd, bbox(fd,tmesh));
} }
Traits traits(bb); Traits traits(bb);

View File

@ -51,7 +51,7 @@ int main(int argc, char* argv[])
double d = CGAL::Polygon_mesh_processing::is_outward_oriented(mesh)?-1:1; double d = CGAL::Polygon_mesh_processing::is_outward_oriented(mesh)?-1:1;
BOOST_FOREACH(face_descriptor fd, faces(mesh)){ for(face_descriptor fd : faces(mesh)){
halfedge_descriptor hd = halfedge(fd,mesh); halfedge_descriptor hd = halfedge(fd,mesh);
Point p = CGAL::centroid(mesh.point(source(hd,mesh)), Point p = CGAL::centroid(mesh.point(source(hd,mesh)),
mesh.point(target(hd,mesh)), mesh.point(target(hd,mesh)),

View File

@ -60,41 +60,10 @@ template <class Primitive>
struct AABB_traits_base<Primitive,true>{ struct AABB_traits_base<Primitive,true>{
typename Primitive::Shared_data m_primitive_data; typename Primitive::Shared_data m_primitive_data;
#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
template <typename ... T> template <typename ... T>
void set_shared_data(T&& ... t){ void set_shared_data(T&& ... t){
m_primitive_data=Primitive::construct_shared_data(std::forward<T>(t)...); m_primitive_data=Primitive::construct_shared_data(std::forward<T>(t)...);
} }
#else
void set_shared_data(){
m_primitive_data=Primitive::construct_shared_data();
}
template <class T1>
void set_shared_data(T1& t1){
m_primitive_data=Primitive::construct_shared_data(t1);
}
template <class T1,class T2>
void set_shared_data(T1& t1, T2& t2){
m_primitive_data=Primitive::construct_shared_data(t1,t2);
}
template <class T1,class T2,class T3>
void set_shared_data(T1& t1,T2& t2,T3& t3){
m_primitive_data=Primitive::construct_shared_data(t1,t2,t3);
}
template <class T1,class T2,class T3,class T4>
void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4){
m_primitive_data=Primitive::construct_shared_data(t1,t2,t3,t4);
}
template <class T1,class T2,class T3,class T4,class T5>
void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4,T5& t5){
m_primitive_data=Primitive::construct_shared_data(t1,t2,t3,t4,t5);
}
#endif
const typename Primitive::Shared_data& shared_data() const {return m_primitive_data;} const typename Primitive::Shared_data& shared_data() const {return m_primitive_data;}
}; };
@ -396,20 +365,6 @@ public:
public: public:
Intersection(const AABB_traits<GeomTraits,AABBPrimitive,BboxMap>& traits) Intersection(const AABB_traits<GeomTraits,AABBPrimitive,BboxMap>& traits)
:m_traits(traits) {} :m_traits(traits) {}
#if CGAL_INTERSECTION_VERSION < 2
template<typename Query>
boost::optional<typename AT::Object_and_primitive_id>
operator()(const Query& query, const typename AT::Primitive& primitive) const
{
typedef boost::optional<Object_and_primitive_id> Intersection;
CGAL::Object object = GeomTraits().intersect_3_object()(internal::Primitive_helper<AT>::get_datum(primitive,m_traits),query);
if ( object.empty() )
return Intersection();
else
return Intersection(Object_and_primitive_id(object,primitive.id()));
}
#else
template<typename Query> template<typename Query>
boost::optional< typename Intersection_and_primitive_id<Query>::Type > boost::optional< typename Intersection_and_primitive_id<Query>::Type >
operator()(const Query& query, const typename AT::Primitive& primitive) const { operator()(const Query& query, const typename AT::Primitive& primitive) const {
@ -419,7 +374,6 @@ public:
return boost::none; return boost::none;
return boost::make_optional( std::make_pair(*inter_res, primitive.id()) ); return boost::make_optional( std::make_pair(*inter_res, primitive.id()) );
} }
#endif
}; };
Intersection intersection_object() const {return Intersection(*this);} Intersection intersection_object() const {return Intersection(*this);}

View File

@ -126,27 +126,10 @@ namespace CGAL {
* @param beyond past-the-end iterator * @param beyond past-the-end iterator
* *
* It is equivalent to constructing an empty tree and calling `insert(first,last,t...)`. * It is equivalent to constructing an empty tree and calling `insert(first,last,t...)`.
* For compilers that do not support variadic templates, overloads up to
* 5 template arguments are provided.
* The tree stays empty if the memory allocation is not successful. * The tree stays empty if the memory allocation is not successful.
*/ */
#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
template<typename InputIterator,typename ... T> template<typename InputIterator,typename ... T>
AABB_tree(InputIterator first, InputIterator beyond,T&& ...); AABB_tree(InputIterator first, InputIterator beyond,T&& ...);
#else
template<typename InputIterator>
AABB_tree(InputIterator first, InputIterator beyond);
template<typename InputIterator, typename T1>
AABB_tree(InputIterator first, InputIterator beyond, T1&);
template<typename InputIterator, typename T1, typename T2>
AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&);
template<typename InputIterator, typename T1, typename T2, typename T3>
AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&);
template<typename InputIterator, typename T1, typename T2, typename T3, typename T4>
AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&);
template<typename InputIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
AABB_tree(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&,T5&);
#endif
/// After one or more calls to `insert()` the internal data /// After one or more calls to `insert()` the internal data
/// structure of the tree must be reconstructed. This procedure /// structure of the tree must be reconstructed. This procedure
@ -158,26 +141,10 @@ namespace CGAL {
/// data structure. /// data structure.
/// A call to `AABBTraits::set_shared_data(t...)` /// A call to `AABBTraits::set_shared_data(t...)`
/// is made using the internally stored traits. /// is made using the internally stored traits.
/// For compilers that do not support variadic templates,
/// overloads up to 5 template arguments are provided.
#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
template<typename ... T> template<typename ... T>
void build(T&& ...); void build(T&& ...);
#ifndef DOXYGEN_RUNNING #ifndef DOXYGEN_RUNNING
void build(); void build();
#endif
#else
void build();
template<typename T1>
void build(T1& t1);
template<typename T1, typename T2>
void build(T1& t1, T2& t2);
template<typename T1, typename T2,typename T3>
void build(T1& t1, T2& t2, T3& t3);
template<typename T1, typename T2,typename T3,typename T4>
void build(T1& t1, T2& t2, T3& t3, T4& t4);
template<typename T1, typename T2,typename T3,typename T4,typename T5>
void build(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5);
#endif #endif
///@} ///@}
@ -185,25 +152,8 @@ namespace CGAL {
///@{ ///@{
/// Equivalent to calling `clear()` and then `insert(first,last,t...)`. /// Equivalent to calling `clear()` and then `insert(first,last,t...)`.
/// For compilers that do not support variadic templates, overloads up
/// to 5 template arguments are provided.
#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
template<typename ConstPrimitiveIterator,typename ... T> template<typename ConstPrimitiveIterator,typename ... T>
void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T&& ...); void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T&& ...);
#else
template<typename ConstPrimitiveIterator>
void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond);
template<typename ConstPrimitiveIterator, typename T1>
void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond, T1&);
template<typename ConstPrimitiveIterator, typename T1, typename T2>
void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&);
template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&);
template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&,T4&);
template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
void rebuild(ConstPrimitiveIterator first, ConstPrimitiveIterator beyond,T1&,T2&,T3&,T4&,T5&);
#endif
/// Add a sequence of primitives to the set of primitives of the AABB tree. /// Add a sequence of primitives to the set of primitives of the AABB tree.
@ -212,25 +162,8 @@ namespace CGAL {
/// `Primitive(%InputIterator, T...)`. If `Primitive` is a model of the concept /// `Primitive(%InputIterator, T...)`. If `Primitive` is a model of the concept
/// `AABBPrimitiveWithSharedData`, a call to `AABBTraits::set_shared_data(t...)` /// `AABBPrimitiveWithSharedData`, a call to `AABBTraits::set_shared_data(t...)`
/// is made using the internally stored traits. /// is made using the internally stored traits.
/// For compilers that do not support variadic templates,
/// overloads up to 5 template arguments are provided.
#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
template<typename InputIterator,typename ... T> template<typename InputIterator,typename ... T>
void insert(InputIterator first, InputIterator beyond,T&& ...); void insert(InputIterator first, InputIterator beyond,T&& ...);
#else
template<typename InputIterator>
void insert(InputIterator first, InputIterator beyond);
template<typename InputIterator, typename T1>
void insert(InputIterator first, InputIterator beyond,T1&);
template<typename InputIterator, typename T1, typename T2>
void insert(InputIterator first, InputIterator beyond,T1&, T2&);
template<typename InputIterator, typename T1, typename T2, typename T3>
void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&);
template<typename InputIterator, typename T1, typename T2, typename T3, typename T4>
void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&);
template<typename InputIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
void insert(InputIterator first, InputIterator beyond,T1&,T2&,T3&,T4&,T5&);
#endif
/// Adds a primitive to the set of primitives of the tree. /// Adds a primitive to the set of primitives of the tree.
inline void insert(const Primitive& p); inline void insert(const Primitive& p);
@ -274,7 +207,6 @@ namespace CGAL {
///@} ///@}
private: private:
#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
template <typename ... T> template <typename ... T>
void set_primitive_data_impl(CGAL::Boolean_tag<false>,T ... ){} void set_primitive_data_impl(CGAL::Boolean_tag<false>,T ... ){}
template <typename ... T> template <typename ... T>
@ -285,64 +217,6 @@ namespace CGAL {
void set_shared_data(T&& ...t){ void set_shared_data(T&& ...t){
set_primitive_data_impl(CGAL::Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),std::forward<T>(t)...); set_primitive_data_impl(CGAL::Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),std::forward<T>(t)...);
} }
#else
void set_primitive_data_impl(CGAL::Boolean_tag<false>){}
void set_primitive_data_impl(CGAL::Boolean_tag<true>)
{m_traits.set_shared_data();}
void set_shared_data(){
set_primitive_data_impl(CGAL::Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>());
}
template <typename T1>
void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1){}
template <typename T1>
void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1)
{m_traits.set_shared_data(t1);}
template <typename T1>
void set_shared_data(T1& t1){
set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1);
}
template <typename T1, typename T2>
void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2){}
template <typename T1, typename T2>
void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1,T2& t2)
{m_traits.set_shared_data(t1,t2);}
template <typename T1, typename T2>
void set_shared_data(const T1& t1,const T2& t2){
set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2);
}
template <typename T1, typename T2, typename T3>
void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2,T3){}
template <typename T1, typename T2, typename T3>
void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1,T2& t2,T3& t3)
{m_traits.set_shared_data(t1,t2,t3);}
template <typename T1, typename T2, typename T3>
void set_shared_data(T1& t1,T2& t2,T3& t3){
set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2,t3);
}
template <typename T1, typename T2, typename T3, typename T4>
void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2,T3,T4){}
template <typename T1, typename T2, typename T3, typename T4>
void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1,T2& t2,T3& t3,T4& t4)
{m_traits.set_shared_data(t1,t2,t3,t4);}
template <typename T1, typename T2, typename T3, typename T4>
void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4){
set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2,t3,t4);
}
template <typename T1, typename T2, typename T3, typename T4, typename T5>
void set_primitive_data_impl(CGAL::Boolean_tag<false>,T1,T2,T3,T4,T5){}
template <typename T1, typename T2, typename T3, typename T4, typename T5>
void set_primitive_data_impl(CGAL::Boolean_tag<true>,T1& t1,T2& t2,T3& t3,T4& t4,T5& t5)
{m_traits.set_shared_data(t1,t2,t3,t4,t5);}
template <typename T1, typename T2, typename T3, typename T4, typename T5>
void set_shared_data(T1& t1,T2& t2,T3& t3,T4& t4,T5& t5){
set_primitive_data_impl(Boolean_tag<internal::Has_nested_type_Shared_data<Primitive>::value>(),t1,t2,t3,t4,t5);
}
#endif
bool build_kd_tree() const; bool build_kd_tree() const;
template<typename ConstPointIterator> template<typename ConstPointIterator>
@ -410,11 +284,7 @@ public:
/// for which `do_intersect` predicates /// for which `do_intersect` predicates
/// and intersections are defined in the traits class AABBTraits. /// and intersections are defined in the traits class AABBTraits.
template <typename Query> template <typename Query>
#if CGAL_INTERSECTION_VERSION < 2 && !defined(DOXYGEN_RUNNING)
boost::optional<Object_and_primitive_id>
#else
boost::optional< typename Intersection_and_primitive_id<Query>::Type > boost::optional< typename Intersection_and_primitive_id<Query>::Type >
#endif
any_intersection(const Query& query) const; any_intersection(const Query& query) const;
@ -744,7 +614,6 @@ public:
, m_need_build(false) , m_need_build(false)
{} {}
#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_RVALUE_REFERENCE)
template<typename Tr> template<typename Tr>
template<typename ConstPrimitiveIterator, typename ... T> template<typename ConstPrimitiveIterator, typename ... T>
AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first, AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
@ -800,324 +669,6 @@ public:
set_shared_data(std::forward<T>(t)...); set_shared_data(std::forward<T>(t)...);
build(); build();
} }
#else
//=============constructor======================
template<typename Tr>
template<typename ConstPrimitiveIterator>
AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond)
: m_traits()
, m_primitives()
, m_p_root_node(NULL)
, m_p_search_tree(NULL)
, m_search_tree_constructed(false)
, m_default_search_tree_constructed(false)
, m_need_build(false)
{
// Insert each primitive into tree
insert(first, beyond);
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1>
AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1)
: m_traits()
, m_primitives()
, m_p_root_node(NULL)
, m_p_search_tree(NULL)
, m_search_tree_constructed(false)
, m_default_search_tree_constructed(false)
, m_need_build(false)
{
// Insert each primitive into tree
insert(first, beyond,t1);
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1, typename T2>
AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1,T2& t2)
: m_traits()
, m_primitives()
, m_p_root_node(NULL)
, m_p_search_tree(NULL)
, m_search_tree_constructed(false)
, m_default_search_tree_constructed(false)
, m_need_build(false)
{
// Insert each primitive into tree
insert(first, beyond,t1,t2);
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1,T2& t2,T3& t3)
: m_traits()
, m_primitives()
, m_p_root_node(NULL)
, m_p_search_tree(NULL)
, m_search_tree_constructed(false)
, m_default_search_tree_constructed(false)
, m_need_build(false)
{
// Insert each primitive into tree
insert(first, beyond,t1,t2,t3);
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1,T2& t2,T3& t3,T4& t4)
: m_traits()
, m_primitives()
, m_p_root_node(NULL)
, m_p_search_tree(NULL)
, m_search_tree_constructed(false)
, m_default_search_tree_constructed(false)
, m_need_build(false)
{
// Insert each primitive into tree
insert(first, beyond,t1,t2,t3,t4);
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
AABB_tree<Tr>::AABB_tree(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1,T2& t2,T3& t3,T4& t4,T5& t5)
: m_traits()
, m_primitives()
, m_p_root_node(NULL)
, m_p_search_tree(NULL)
, m_search_tree_constructed(false)
, m_default_search_tree_constructed(false)
, m_need_build(false)
{
// Insert each primitive into tree
insert(first, beyond,t1,t2,t3,t4,t5);
}
//=============insert======================
template<typename Tr>
template<typename ConstPrimitiveIterator>
void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond)
{
set_shared_data();
while(first != beyond)
{
m_primitives.push_back(Primitive(first));
++first;
}
m_need_build = true;
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1>
void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1)
{
set_shared_data(t1);
while(first != beyond)
{
m_primitives.push_back(Primitive(first,t1));
++first;
}
m_need_build = true;
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1, typename T2>
void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1, T2& t2)
{
set_shared_data(t1,t2);
while(first != beyond)
{
m_primitives.push_back(Primitive(first,t1,t2));
++first;
}
m_need_build = true;
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1,T2& t2,T3& t3)
{
set_shared_data(t1,t2,t3);
while(first != beyond)
{
m_primitives.push_back(Primitive(first,t1,t2,t3));
++first;
}
m_need_build = true;
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1,T2& t2,T3& t3,T4& t4)
{
set_shared_data(t1,t2,t3,t4);
while(first != beyond)
{
m_primitives.push_back(Primitive(first,t1,t2,t3,t4));
++first;
}
m_need_build = true;
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
void AABB_tree<Tr>::insert(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1,T2& t2,T3& t3,T4& t4,T5& t5)
{
set_shared_data(t1,t2,t3,t4,t5);
while(first != beyond)
{
m_primitives.push_back(Primitive(first,t1,t2,t3,t4,t5));
++first;
}
m_need_build = true;
}
//=============rebuild======================
template<typename Tr>
template<typename ConstPrimitiveIterator>
void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond)
{
// cleanup current tree and internal KD tree
clear();
// inserts primitives
insert(first, beyond);
build();
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1>
void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1)
{
// cleanup current tree and internal KD tree
clear();
// inserts primitives
insert(first, beyond,t1);
build();
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1, typename T2>
void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1, T2& t2)
{
// cleanup current tree and internal KD tree
clear();
// inserts primitives
insert(first, beyond,t1,t2);
build();
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3>
void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1,T2& t2,T3& t3)
{
// cleanup current tree and internal KD tree
clear();
// inserts primitives
insert(first, beyond,t1,t2,t3);
build();
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4>
void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1,T2& t2,T3& t3,T4& t4)
{
// cleanup current tree and internal KD tree
clear();
// inserts primitives
insert(first, beyond,t1,t2,t3,t4);
build();
}
template<typename Tr>
template<typename ConstPrimitiveIterator, typename T1, typename T2, typename T3, typename T4, typename T5>
void AABB_tree<Tr>::rebuild(ConstPrimitiveIterator first,
ConstPrimitiveIterator beyond,
T1& t1,T2& t2,T3& t3,T4& t4,T5& t5)
{
// cleanup current tree and internal KD tree
clear();
// inserts primitives
insert(first, beyond,t1,t2,t3,t4,t5);
build();
}
//overloads calling set_shared_data()
template<typename Tr>
template<typename T1>
void AABB_tree<Tr>::build(T1& t1)
{
set_shared_data(t1);
build();
}
template<typename Tr>
template<typename T1, typename T2>
void AABB_tree<Tr>::build(T1& t1, T2& t2)
{
set_shared_data(t1, t2);
build();
}
template<typename Tr>
template<typename T1, typename T2, typename T3>
void AABB_tree<Tr>::build(T1& t1, T2& t2, T3& t3)
{
set_shared_data(t1, t2, t3);
build();
}
template<typename Tr>
template<typename T1, typename T2, typename T3, typename T4>
void AABB_tree<Tr>::build(T1& t1, T2& t2, T3& t3, T4& t4)
{
set_shared_data(t1, t2, t3, t4);
build();
}
template<typename Tr>
template<typename T1, typename T2, typename T3, typename T4, typename T5>
void AABB_tree<Tr>::build(T1& t1, T2& t2, T3& t3, T4& t4, T5& t5)
{
set_shared_data(t1, t2, t3, t4, t5);
build();
}
#endif
template<typename Tr> template<typename Tr>
void AABB_tree<Tr>::insert(const Primitive& p) void AABB_tree<Tr>::insert(const Primitive& p)
@ -1291,11 +842,7 @@ public:
template <typename Tr> template <typename Tr>
template <typename Query> template <typename Query>
#if CGAL_INTERSECTION_VERSION < 2
boost::optional<typename AABB_tree<Tr>::Object_and_primitive_id>
#else
boost::optional< typename AABB_tree<Tr>::template Intersection_and_primitive_id<Query>::Type > boost::optional< typename AABB_tree<Tr>::template Intersection_and_primitive_id<Query>::Type >
#endif
AABB_tree<Tr>::any_intersection(const Query& query) const AABB_tree<Tr>::any_intersection(const Query& query) const
{ {
using namespace CGAL::internal::AABB_tree; using namespace CGAL::internal::AABB_tree;

View File

@ -65,9 +65,7 @@ namespace CGAL
m_id = rhs.m_id; m_id = rhs.m_id;
} }
#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
Decorated_point& operator=(const Decorated_point&)=default; Decorated_point& operator=(const Decorated_point&)=default;
#endif
private: private:
Id m_id; Id m_id;

View File

@ -78,11 +78,7 @@ class First_intersection_traits
public: public:
typedef typedef
#if CGAL_INTERSECTION_VERSION < 2
boost::optional<Object_and_primitive_id>
#else
boost::optional< typename AABBTraits::template Intersection_and_primitive_id<Query>::Type > boost::optional< typename AABBTraits::template Intersection_and_primitive_id<Query>::Type >
#endif
Result; Result;
public: public:
First_intersection_traits(const AABBTraits& traits) First_intersection_traits(const AABBTraits& traits)
@ -137,11 +133,7 @@ public:
void intersection(const Query& query, const Primitive& primitive) void intersection(const Query& query, const Primitive& primitive)
{ {
#if CGAL_INTERSECTION_VERSION < 2
boost::optional<Object_and_primitive_id>
#else
boost::optional< typename AABBTraits::template Intersection_and_primitive_id<Query>::Type > boost::optional< typename AABBTraits::template Intersection_and_primitive_id<Query>::Type >
#endif
intersection = m_traits.intersection_object()(query, primitive); intersection = m_traits.intersection_object()(query, primitive);
if(intersection) if(intersection)

View File

@ -104,17 +104,9 @@ void test_all_intersection_query_types(Tree& tree)
tree.all_intersected_primitives(segment,std::back_inserter(primitives)); tree.all_intersected_primitives(segment,std::back_inserter(primitives));
// any_intersection // any_intersection
#if CGAL_INTERSECTION_VERSION < 2
typedef typename Tree::Object_and_primitive_id Object_and_primitive_id;
boost::optional<Object_and_primitive_id> optional_object_and_primitive;
optional_object_and_primitive = tree.any_intersection(ray);
optional_object_and_primitive = tree.any_intersection(line);
optional_object_and_primitive = tree.any_intersection(segment);
#else
boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Ray>::Type > r = tree.any_intersection(ray); boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Ray>::Type > r = tree.any_intersection(ray);
boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Line>::Type > l = tree.any_intersection(line); boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Line>::Type > l = tree.any_intersection(line);
boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Segment>::Type > s = tree.any_intersection(segment); boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Segment>::Type > s = tree.any_intersection(segment);
#endif
// any_intersected_primitive // any_intersected_primitive
boost::optional<typename Primitive::Id> optional_primitive; boost::optional<typename Primitive::Id> optional_primitive;
@ -123,19 +115,12 @@ void test_all_intersection_query_types(Tree& tree)
optional_primitive = tree.any_intersected_primitive(segment); optional_primitive = tree.any_intersected_primitive(segment);
// all_intersections // all_intersections
#if CGAL_INTERSECTION_VERSION < 2
std::list<Object_and_primitive_id> intersections;
tree.all_intersections(ray,std::back_inserter(intersections));
tree.all_intersections(line,std::back_inserter(intersections));
tree.all_intersections(segment,std::back_inserter(intersections));
#else
std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Ray>::Type > > intersections_r; std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Ray>::Type > > intersections_r;
std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Line>::Type > > intersections_l; std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Line>::Type > > intersections_l;
std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Segment>::Type > > intersections_s; std::list< boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Segment>::Type > > intersections_s;
tree.all_intersections(ray,std::back_inserter(intersections_r)); tree.all_intersections(ray,std::back_inserter(intersections_r));
tree.all_intersections(line,std::back_inserter(intersections_l)); tree.all_intersections(line,std::back_inserter(intersections_l));
tree.all_intersections(segment,std::back_inserter(intersections_s)); tree.all_intersections(segment,std::back_inserter(intersections_s));
#endif
} }
@ -404,13 +389,8 @@ public:
Polyhedron_primitive_iterator it = Pr_generator().begin(p); Polyhedron_primitive_iterator it = Pr_generator().begin(p);
for ( ; it != Pr_generator().end(p) ; ++it ) for ( ; it != Pr_generator().end(p) ; ++it )
{ {
#if CGAL_INTERSECTION_VERSION < 2
Intersection_result
intersection = Traits().intersection_object()(query, Pr(it,p));
#else
boost::optional< typename Traits::template Intersection_and_primitive_id<Query>::Type > boost::optional< typename Traits::template Intersection_and_primitive_id<Query>::Type >
intersection = m_traits.intersection_object()(query, Pr(it,p)); intersection = m_traits.intersection_object()(query, Pr(it,p));
#endif
if ( intersection ) if ( intersection )
*out++ = *intersection; *out++ = *intersection;
} }
@ -717,11 +697,7 @@ private:
const Naive_implementation& naive) const const Naive_implementation& naive) const
{ {
typedef typedef
#if CGAL_INTERSECTION_VERSION < 2
Object_and_primitive_id
#else
typename Tree::AABB_traits::template Intersection_and_primitive_id<Query>::Type typename Tree::AABB_traits::template Intersection_and_primitive_id<Query>::Type
#endif
Obj_type; Obj_type;
typedef typedef
@ -759,11 +735,7 @@ private:
} }
// Any intersection test (do not count time here) // Any intersection test (do not count time here)
#if CGAL_INTERSECTION_VERSION < 2
boost::optional<Object_and_primitive_id>
#else
boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Query>::Type > boost::optional< typename Tree::AABB_traits::template Intersection_and_primitive_id<Query>::Type >
#endif
intersection = tree.any_intersection(query); intersection = tree.any_intersection(query);
// Check: verify we do get the result by naive method // Check: verify we do get the result by naive method

View File

@ -1,5 +1,3 @@
#define CGAL_INTERSECTION_VERSION 2
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <algorithm> #include <algorithm>
@ -40,11 +38,7 @@ struct FilterP {
template<typename ForwardIterator, typename Tree> template<typename ForwardIterator, typename Tree>
std::size_t intersect(ForwardIterator b, ForwardIterator e, const Tree& tree, long& counter) { std::size_t intersect(ForwardIterator b, ForwardIterator e, const Tree& tree, long& counter) {
typedef typedef
#if CGAL_INTERSECTION_VERSION < 2
typename Tree::Object_and_primitive_id
#else
typename Tree::AABB_traits::template Intersection_and_primitive_id<typename ForwardIterator::value_type>::Type typename Tree::AABB_traits::template Intersection_and_primitive_id<typename ForwardIterator::value_type>::Type
#endif
Obj_type; Obj_type;
std::vector<Obj_type> v; std::vector<Obj_type> v;
@ -84,7 +78,7 @@ boost::tuple<std::size_t, std::size_t, std::size_t, long> test(const char* name)
std::vector<Point> points; std::vector<Point> points;
points.reserve(elements * 2); points.reserve(elements * 2);
CGAL::cpp11::copy_n(g, elements * 2, std::back_inserter(points)); std::copy_n(g, elements * 2, std::back_inserter(points));
// generate a bunch of happy random primitives // generate a bunch of happy random primitives
std::vector<Line> lines; std::vector<Line> lines;

View File

@ -24,8 +24,6 @@
// //
//****************************************************************************** //******************************************************************************
#define CGAL_INTERSECTION_VERSION 1
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>

View File

@ -24,8 +24,6 @@
// //
//****************************************************************************** //******************************************************************************
#define CGAL_INTERSECTION_VERSION 2
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>

View File

@ -109,8 +109,8 @@ int main()
const double r = max_extent / 2; const double r = max_extent / 2;
// Generate NB_RAYS*2 points that lie on a sphere of radius r, centered around bbox_center // Generate NB_RAYS*2 points that lie on a sphere of radius r, centered around bbox_center
CGAL::Random rand = CGAL::Random(23); // fix the seed to yield the same results each run CGAL::Random rand = CGAL::Random(23); // fix the seed to yield the same results each run
CGAL::cpp11::copy_n(CGAL::Random_points_on_sphere_3<Point>(r, rand), NB_RAYS, std::back_inserter(v1)); std::copy_n(CGAL::Random_points_on_sphere_3<Point>(r, rand), NB_RAYS, std::back_inserter(v1));
CGAL::cpp11::copy_n(CGAL::Random_points_on_sphere_3<Point>(r, rand), NB_RAYS, std::back_inserter(v2)); std::copy_n(CGAL::Random_points_on_sphere_3<Point>(r, rand), NB_RAYS, std::back_inserter(v2));
for(std::vector<Point>::iterator it = v1.begin(); it != v1.end(); ++it) { for(std::vector<Point>::iterator it = v1.begin(); it != v1.end(); ++it) {
*it = *it + bbox_center; *it = *it + bbox_center;

View File

@ -2,7 +2,6 @@
#include <iostream> #include <iostream>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Advancing_front_surface_reconstruction.h> #include <CGAL/Advancing_front_surface_reconstruction.h>
#include <boost/foreach.hpp>
struct Perimeter { struct Perimeter {
@ -64,15 +63,15 @@ int main(int argc, char* argv[])
reconstruction.run(); reconstruction.run();
std::cout << reconstruction.number_of_outliers() << " outliers:\n" << std::endl; std::cout << reconstruction.number_of_outliers() << " outliers:\n" << std::endl;
BOOST_FOREACH(const Point_3& p, reconstruction.outliers()){ for(const Point_3& p : reconstruction.outliers()){
std::cout << p << std::endl; std::cout << p << std::endl;
} }
std::cout << "Boundaries:" << std::endl ; std::cout << "Boundaries:" << std::endl ;
BOOST_FOREACH(const Vertex_on_boundary_range & vobr, reconstruction.boundaries()){ for(const Vertex_on_boundary_range& vobr : reconstruction.boundaries()){
std::cout << "boundary\n"; std::cout << "boundary\n";
// As we use BOOST_FOREACH we do not use the type Boundary_range // As we use range-base loop we do not use the type Boundary_range
BOOST_FOREACH(Vertex_handle v, vobr){ for(Vertex_handle v : vobr){
std::cout << v->point() << std::endl; std::cout << v->point() << std::endl;
} }
} }

View File

@ -9,7 +9,7 @@
typedef CGAL::Simple_cartesian<double> K; typedef CGAL::Simple_cartesian<double> K;
typedef K::Point_3 Point_3; typedef K::Point_3 Point_3;
typedef CGAL::cpp11::array<std::size_t,3> Facet; typedef std::array<std::size_t,3> Facet;
namespace std { namespace std {
std::ostream& std::ostream&

View File

@ -37,7 +37,7 @@ typedef CGAL::Triangulation_data_structure_3<LVb,LCb> Tds;
typedef CGAL::Delaunay_triangulation_3<Kernel,Tds> Triangulation_3; typedef CGAL::Delaunay_triangulation_3<Kernel,Tds> Triangulation_3;
typedef Triangulation_3::Vertex_handle Vertex_handle; typedef Triangulation_3::Vertex_handle Vertex_handle;
typedef CGAL::cpp11::array<std::size_t,3> Facet; typedef std::array<std::size_t,3> Facet;
// Functor to init the advancing front algorithm with indexed points // Functor to init the advancing front algorithm with indexed points

View File

@ -7,7 +7,7 @@
#include <CGAL/array.h> #include <CGAL/array.h>
#include <CGAL/disable_warnings.h> #include <CGAL/disable_warnings.h>
typedef CGAL::cpp11::array<std::size_t,3> Facet; typedef std::array<std::size_t,3> Facet;
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point_3; typedef Kernel::Point_3 Point_3;

View File

@ -2488,7 +2488,7 @@ namespace CGAL {
\tparam PointInputIterator must be an input iterator with 3D points as value type. This point type must \tparam PointInputIterator must be an input iterator with 3D points as value type. This point type must
be convertible to `Exact_predicates_inexact_constructions_kernel::Point_3` with the `Cartesian_converter`. be convertible to `Exact_predicates_inexact_constructions_kernel::Point_3` with the `Cartesian_converter`.
\tparam IndicesOutputIterator must be an output iterator to which \tparam IndicesOutputIterator must be an output iterator to which
`CGAL::cpp11::array<std::size_t, 3>` can be assigned. `std::array<std::size_t, 3>` can be assigned.
\param b iterator on the first point of the sequence \param b iterator on the first point of the sequence
\param e past the end iterator of the point sequence \param e past the end iterator of the point sequence
@ -2540,7 +2540,7 @@ namespace CGAL {
\tparam PointInputIterator must be an input iterator with 3D points as value type. This point type must \tparam PointInputIterator must be an input iterator with 3D points as value type. This point type must
be convertible to `Exact_predicates_inexact_constructions_kernel::Point_3` with the `Cartesian_converter`. be convertible to `Exact_predicates_inexact_constructions_kernel::Point_3` with the `Cartesian_converter`.
\tparam IndicesOutputIterator must be an output iterator to which \tparam IndicesOutputIterator must be an output iterator to which
`CGAL::cpp11::array<std::size_t, 3>` can be assigned. `std::array<std::size_t, 3>` can be assigned.
\tparam Priority must be a functor with `double operator()(AdvancingFront,Cell_handle,int)` returning the \tparam Priority must be a functor with `double operator()(AdvancingFront,Cell_handle,int)` returning the
priority of the facet `(Cell_handle,int)`. priority of the facet `(Cell_handle,int)`.

View File

@ -9,7 +9,7 @@
typedef CGAL::Simple_cartesian<double> K; typedef CGAL::Simple_cartesian<double> K;
typedef CGAL::cpp11::array<std::size_t,3> Facet; typedef std::array<std::size_t,3> Facet;
namespace std { namespace std {
std::ostream& std::ostream&

View File

@ -8,7 +8,7 @@
typedef CGAL::Simple_cartesian<double> K; typedef CGAL::Simple_cartesian<double> K;
typedef K::Point_3 Point_3; typedef K::Point_3 Point_3;
typedef CGAL::cpp11::array<std::size_t,3> Facet; typedef std::array<std::size_t,3> Facet;
namespace std { namespace std {
std::ostream& std::ostream&

View File

@ -12,7 +12,7 @@ typedef K::Point_3 Point_3;
typedef CGAL::Polyhedron_3<K> Polyhedron; typedef CGAL::Polyhedron_3<K> Polyhedron;
typedef CGAL::cpp11::array<std::size_t,3> Facet; typedef std::array<std::size_t,3> Facet;
namespace std { namespace std {
std::ostream& std::ostream&

View File

@ -23,7 +23,7 @@ public:
/*! /*!
*/ */
typedef CGAL::cpp11::array<AlgebraicKernel_d_1::Bound, 4> result_type; typedef std::array<AlgebraicKernel_d_1::Bound, 4> result_type;
/// @} /// @}
@ -31,7 +31,7 @@ typedef CGAL::cpp11::array<AlgebraicKernel_d_1::Bound, 4> result_type;
/// @{ /// @{
/*! /*!
The returned `CGAL::cpp11::array` \f$ [xl,xu,yl,yu]\f$ represents an open isolating box \f$ B=(xl,xu)\times(yl,yu)\f$ The returned `std::array` \f$ [xl,xu,yl,yu]\f$ represents an open isolating box \f$ B=(xl,xu)\times(yl,yu)\f$
for \f$ a\f$ with respect to \f$ f\f$. for \f$ a\f$ with respect to \f$ f\f$.
\pre \f$ f(a)\neq0\f$ \pre \f$ f(a)\neq0\f$
\post \f$ a \in B\f$. \post \f$ a \in B\f$.
@ -42,7 +42,7 @@ result_type
operator()( AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Polynomial_2 f); operator()( AlgebraicKernel_d_2::Algebraic_real_2 a, AlgebraicKernel_d_2::Polynomial_2 f);
/*! /*!
The returned `CGAL::cpp11::array` \f$ [xl,xu,yl,yu]\f$ represents an open isolating box \f$ B=(xl,xu)\times(yl,yu)\f$ The returned `std::array` \f$ [xl,xu,yl,yu]\f$ represents an open isolating box \f$ B=(xl,xu)\times(yl,yu)\f$
for \f$ a\f$ with respect to the common solutions of \f$ f\f$ and \f$ g\f$. for \f$ a\f$ with respect to the common solutions of \f$ f\f$ and \f$ g\f$.
It is not necessary that \f$ a\f$ is a common solution of \f$ f\f$ and \f$ g\f$. It is not necessary that \f$ a\f$ is a common solution of \f$ f\f$ and \f$ g\f$.
\post \f$ a \in B\f$. \post \f$ a \in B\f$.

View File

@ -736,7 +736,7 @@ public:
public: public:
typedef CGAL::cpp11::array<Bound,4> result_type; typedef std::array<Bound,4> result_type;
Isolate_2(const Algebraic_kernel_d_2* kernel) Isolate_2(const Algebraic_kernel_d_2* kernel)
: _m_kernel(kernel) {} : _m_kernel(kernel) {}

View File

@ -476,9 +476,7 @@ private:
log_C_eps_ = n.log_C_eps_; log_C_eps_ = n.log_C_eps_;
} }
#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
Self& operator= (const Self&) = delete; Self& operator= (const Self&) = delete;
#endif
}; // struct Bitstream_descartes_E08_node }; // struct Bitstream_descartes_E08_node

View File

@ -567,9 +567,7 @@ private:
log_C_eps_ = n.log_C_eps_; log_C_eps_ = n.log_C_eps_;
} }
#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
Self& operator= (const Self&)=delete; Self& operator= (const Self&)=delete;
#endif
}; // struct Bitstream_descartes_rndl_node }; // struct Bitstream_descartes_rndl_node

View File

@ -62,7 +62,7 @@ struct Interval_evaluate_1 : public CGAL::cpp98::binary_function
} }
result_type operator()(const Polynomial_1& p, result_type operator()(const Polynomial_1& p,
const CGAL::cpp11::array< Bound, 2 >& b) const { const std::array< Bound, 2 >& b) const {
typename CT::Cast cast; typename CT::Cast cast;
@ -79,7 +79,7 @@ struct Interval_evaluate_1 : public CGAL::cpp98::binary_function
Coefficient_const_iterator_range range = Coefficient_const_iterator_range range =
typename PT_1::Construct_coefficient_const_iterator_range()(p); typename PT_1::Construct_coefficient_const_iterator_range()(p);
Coefficient_const_iterator it = CGAL::cpp11::prev(range.second); Coefficient_const_iterator it = std::prev(range.second);
Coercion_interval res(cast(*it)); Coercion_interval res(cast(*it));

View File

@ -41,7 +41,7 @@ namespace internal {
template<typename Polynomial_2, typename Bound> template<typename Polynomial_2, typename Bound>
struct Interval_evaluate_2 : public CGAL::cpp98::binary_function struct Interval_evaluate_2 : public CGAL::cpp98::binary_function
<Polynomial_2,CGAL::cpp11::array<Bound,4>, <Polynomial_2,std::array<Bound,4>,
std::pair<typename CGAL::Coercion_traits<typename CGAL::Polynomial_traits_d<Polynomial_2>::Innermost_coefficient_type,Bound>::Type, std::pair<typename CGAL::Coercion_traits<typename CGAL::Polynomial_traits_d<Polynomial_2>::Innermost_coefficient_type,Bound>::Type,
typename CGAL::Coercion_traits<typename CGAL::Polynomial_traits_d<Polynomial_2>::Innermost_coefficient_type,Bound>::Type> > { typename CGAL::Coercion_traits<typename CGAL::Polynomial_traits_d<Polynomial_2>::Innermost_coefficient_type,Bound>::Type> > {
@ -58,7 +58,7 @@ public:
typedef std::pair< Coercion_type, Coercion_type > result_type; typedef std::pair< Coercion_type, Coercion_type > result_type;
result_type operator()(const Polynomial_2& p, result_type operator()(const Polynomial_2& p,
const CGAL::cpp11::array< Bound, 4 >& b) const { const std::array< Bound, 4 >& b) const {
typename CT::Cast cast; typename CT::Cast cast;
@ -87,7 +87,7 @@ public:
Coefficient_const_iterator_range range = Coefficient_const_iterator_range range =
typename PT_2::Construct_coefficient_const_iterator_range()(p); typename PT_2::Construct_coefficient_const_iterator_range()(p);
Coefficient_const_iterator it = CGAL::cpp11::prev(range.second); Coefficient_const_iterator it = std::prev(range.second);
Interval_result_type initial_pair = interval_evaluate_1(*it,x_pair); Interval_result_type initial_pair = interval_evaluate_1(*it,x_pair);
Coercion_interval res(initial_pair.first,initial_pair.second); Coercion_interval res(initial_pair.first,initial_pair.second);

View File

@ -48,7 +48,7 @@ void test_algebraic_kernel_2(const AlgebraicKernel_2& ak_2) {
typedef typename AK_2::Coefficient Coefficient; typedef typename AK_2::Coefficient Coefficient;
typedef typename AK_2::Bound Bound; typedef typename AK_2::Bound Bound;
typedef std::pair<Bound,Bound> BInterval; typedef std::pair<Bound,Bound> BInterval;
typedef CGAL::cpp11::array<Bound, 4> BArray; typedef std::array<Bound, 4> BArray;
typedef typename AK_2::Polynomial_1 Polynomial_1; typedef typename AK_2::Polynomial_1 Polynomial_1;
typedef typename AK_2::Polynomial_2 Polynomial_2; typedef typename AK_2::Polynomial_2 Polynomial_2;
typedef typename AK_2::Algebraic_real_1 Algebraic_real_1; typedef typename AK_2::Algebraic_real_1 Algebraic_real_1;

View File

@ -107,7 +107,7 @@ bool file_input(OutputIterator out)
int n; int n;
is >> n; is >> n;
std::cout << "Reading " << n << " points from file" << std::endl; std::cout << "Reading " << n << " points from file" << std::endl;
CGAL::cpp11::copy_n(std::istream_iterator<Point>(is), n, out); std::copy_n(std::istream_iterator<Point>(is), n, out);
return true; return true;
} }

View File

@ -50,7 +50,7 @@ bool file_input(OutputIterator out)
int n; int n;
is >> n; is >> n;
std::cout << "Reading " << n << " points from file" << std::endl; std::cout << "Reading " << n << " points from file" << std::endl;
CGAL::cpp11::copy_n(std::istream_iterator<Point>(is), n, out); std::copy_n(std::istream_iterator<Point>(is), n, out);
return true; return true;
} }

View File

@ -52,7 +52,7 @@ bool file_input(OutputIterator out)
int n; int n;
is >> n; is >> n;
std::cout << "Reading " << n << " points from file" << std::endl; std::cout << "Reading " << n << " points from file" << std::endl;
CGAL::cpp11::copy_n(std::istream_iterator<Point>(is), n, out); std::copy_n(std::istream_iterator<Point>(is), n, out);
return true; return true;
} }

View File

@ -97,7 +97,7 @@ file_input(OutputIterator out)
int n; int n;
is >> n; is >> n;
std::cout << "Reading " << n << " points from file" << std::endl; std::cout << "Reading " << n << " points from file" << std::endl;
CGAL::cpp11::copy_n(std::istream_iterator<Point>(is), n, out); std::copy_n(std::istream_iterator<Point>(is), n, out);
return true; return true;
} }

View File

@ -10,7 +10,6 @@
#include <boost/unordered_set.hpp> #include <boost/unordered_set.hpp>
#include <boost/unordered_map.hpp> #include <boost/unordered_map.hpp>
#include <boost/foreach.hpp>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Gt; typedef CGAL::Exact_predicates_inexact_constructions_kernel Gt;
@ -73,7 +72,7 @@ int main()
as.get_alpha_shape_facets(std::back_inserter( regular_facets ), Alpha_shape_3::REGULAR ); as.get_alpha_shape_facets(std::back_inserter( regular_facets ), Alpha_shape_3::REGULAR );
std::vector<Alpha_shape_3::Facet> filtered_regular_facets; std::vector<Alpha_shape_3::Facet> filtered_regular_facets;
BOOST_FOREACH(Alpha_shape_3::Facet f, regular_facets) for(Alpha_shape_3::Facet f : regular_facets)
{ {
if ( marked_cells.count(f.first)==1 ) if ( marked_cells.count(f.first)==1 )
filtered_regular_facets.push_back(f); filtered_regular_facets.push_back(f);
@ -90,7 +89,7 @@ int main()
boost::unordered_map< Alpha_shape_3::Vertex_handle, std::size_t> vids; boost::unordered_map< Alpha_shape_3::Vertex_handle, std::size_t> vids;
points.clear(); points.clear();
BOOST_FOREACH(Alpha_shape_3::Facet f, filtered_regular_facets) for(Alpha_shape_3::Facet f : filtered_regular_facets)
{ {
for (int i=1;i<4; ++i) for (int i=1;i<4; ++i)
{ {
@ -104,7 +103,7 @@ int main()
std::ofstream output("out.off"); std::ofstream output("out.off");
output << "OFF\n " << points.size() << " " << filtered_regular_facets.size() << " 0\n"; output << "OFF\n " << points.size() << " " << filtered_regular_facets.size() << " 0\n";
std::copy(points.begin(), points.end(), std::ostream_iterator<Point>(output, "\n")); std::copy(points.begin(), points.end(), std::ostream_iterator<Point>(output, "\n"));
BOOST_FOREACH(const Alpha_shape_3::Facet& f, filtered_regular_facets) for(const Alpha_shape_3::Facet& f : filtered_regular_facets)
{ {
output << 3; output << 3;

View File

@ -979,8 +979,8 @@ public:
template<class OutputIterator> template<class OutputIterator>
OutputIterator filtration(OutputIterator it) const OutputIterator filtration(OutputIterator it) const
{ {
Dispatch_or_drop_output_iterator<cpp11::tuple<CGAL::Object>, cpp11::tuple<OutputIterator> > out(it); Dispatch_or_drop_output_iterator<std::tuple<CGAL::Object>, std::tuple<OutputIterator> > out(it);
return cpp11::template get<0>( filtration_with_alpha_values(out) ); return std::template get<0>( filtration_with_alpha_values(out) );
} }
private: private:

View File

@ -208,82 +208,6 @@ public:
// defining a type that inherits from the template we need to alias. However, // defining a type that inherits from the template we need to alias. However,
// the non-C++11 code requires the (re)definition of all constructors of the // the non-C++11 code requires the (re)definition of all constructors of the
// derived class. // derived class.
#if defined(CGAL_CFG_NO_CPP0X_TEMPLATE_ALIASES)
// Type definition for the construction surface-sweep visitor.
template <typename Evt, typename Crv>
struct Construction_helper :
public Arr_bounded_planar_construction_helper<Gt2, Arr, Evt, Crv>
{
typedef Arr_bounded_planar_construction_helper<Gt2, Arr, Evt, Crv>
Base;
Construction_helper(Arr* arr) : Base(arr) {}
};
// Type definition for the no-intersection construction surface-sweep visitor.
template <typename Evt, typename Crv>
struct No_intersection_construction_helper :
public Arr_bounded_planar_construction_helper<Gt2, Arr, Evt, Crv>
{
typedef Arr_bounded_planar_construction_helper<Gt2, Arr, Evt, Crv>
Base;
No_intersection_construction_helper(Arr* arr) : Base(arr) {}
};
// Type definition for the insertion surface-sweep visitor.
typedef Arr_insertion_traits_2<Gt2, Arr> I_traits;
template <typename Evt, typename Crv>
struct Insertion_helper :
public Arr_bounded_planar_insertion_helper<I_traits, Arr, Evt, Crv>
{
typedef Arr_bounded_planar_insertion_helper<I_traits, Arr, Evt, Crv>
Base;
Insertion_helper(Arr* arr) : Base(arr) {}
};
// Type definition for the no-intersection insertion surface-sweep visitor.
typedef Arr_basic_insertion_traits_2<Gt2, Arr> Nxi_traits;
template <typename Evt, typename Crv>
struct No_intersection_insertion_helper :
public Arr_bounded_planar_insertion_helper<Nxi_traits, Arr, Evt, Crv>
{
typedef Arr_bounded_planar_insertion_helper<Nxi_traits, Arr, Evt, Crv>
Base;
No_intersection_insertion_helper(Arr* arr) : Base(arr) {}
};
// Type definition for the batched point-location surface-sweep visitor.
typedef Arr_batched_point_location_traits_2<Arr> Bpl_traits;
template <typename Evt, typename Crv>
struct Batched_point_location_helper :
public Arr_bounded_planar_batched_pl_helper<Bpl_traits, Arr, Evt, Crv>
{
typedef Arr_bounded_planar_batched_pl_helper<Bpl_traits, Arr, Evt, Crv>
Base;
Batched_point_location_helper(const Arr* arr) : Base(arr) {}
};
// Type definition for the vertical decomposition sweep-line visitor.
typedef Arr_batched_point_location_traits_2<Arr> Vd_traits;
template <typename Evt, typename Crv>
struct Vertical_decomposition_helper :
public Arr_bounded_planar_vert_decomp_helper<Vd_traits, Arr, Evt, Crv>
{
typedef Arr_bounded_planar_vert_decomp_helper<Vd_traits, Arr, Evt, Crv>
Base;
Vertical_decomposition_helper(const Arr* arr) : Base(arr) {}
};
// Type definition for the overlay surface-sweep visitor.
template <typename Gt, typename Evt, typename Crv,
typename ArrA, typename ArrB>
struct Overlay_helper :
public Arr_bounded_planar_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>
{
typedef Arr_bounded_planar_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>
Base;
Overlay_helper(const ArrA* arr_a, const ArrB* arr_b) : Base(arr_a, arr_b) {}
};
#else
// Type definition for the construction surface-sweep visitor. // Type definition for the construction surface-sweep visitor.
template <typename Evt, typename Crv> template <typename Evt, typename Crv>
using Construction_helper = using Construction_helper =
@ -323,7 +247,6 @@ public:
typename ArrA, typename ArrB> typename ArrA, typename ArrB>
using Overlay_helper = using Overlay_helper =
Arr_bounded_planar_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>; Arr_bounded_planar_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>;
#endif
//@} //@}
public: public:

View File

@ -109,9 +109,7 @@ public:
Point_handle (p) Point_handle (p)
{} {}
#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
_One_root_point_2& operator=(const _One_root_point_2&)=default; _One_root_point_2& operator=(const _One_root_point_2&)=default;
#endif
/*! Constructor of a point with one-root coefficients. /*! Constructor of a point with one-root coefficients.
This constructor of a point can also be used with rational coefficients This constructor of a point can also be used with rational coefficients

View File

@ -232,9 +232,7 @@ public:
Rational_function (const Self & r) Rational_function (const Self & r)
: Base(static_cast<const Base &> (r)) {} : Base(static_cast<const Base &> (r)) {}
#ifndef CGAL_CFG_NO_CPP0X_DELETED_AND_DEFAULT_FUNCTIONS
Self& operator=(const Self&)=default; Self& operator=(const Self&)=default;
#endif
CGAL::Sign sign_at(const Algebraic_real_1& x, CGAL::Sign sign_at(const Algebraic_real_1& x,
CGAL::Sign epsilon = CGAL::ZERO) const CGAL::Sign epsilon = CGAL::ZERO) const

View File

@ -321,7 +321,6 @@ public:
// the non-C++11 code requires the (re)definition of all constructors of the // the non-C++11 code requires the (re)definition of all constructors of the
// derived class. The non-C++11 code follows the commented out C++11 code. // derived class. The non-C++11 code follows the commented out C++11 code.
// When we move to C++11 we can use the more elgant code. // When we move to C++11 we can use the more elgant code.
#if defined(CGAL_CFG_NO_CPP0X_TEMPLATE_ALIASES)
// Type definition for the construction surface-sweep visitor. // Type definition for the construction surface-sweep visitor.
template <typename Evt, typename Crv> template <typename Evt, typename Crv>
struct Construction_helper : struct Construction_helper :
@ -396,47 +395,6 @@ public:
Base; Base;
Overlay_helper(const ArrA* arr_a, const ArrB* arr_b) : Base(arr_a, arr_b) {} Overlay_helper(const ArrA* arr_a, const ArrB* arr_b) : Base(arr_a, arr_b) {}
}; };
#else
// Type definition for the construction surface-sweep visitor.
template <typename Evt, typename Crv>
using Construction_helper =
Arr_spherical_construction_helper<Gt2, Arr, Evt, Crv>;
// Type definition for the no-intersection construction surface-sweep visitor.
template <typename Evt, typename Crv>
using No_intersection_construction_helper =
Arr_spherical_construction_helper<Gt2, Arr, Evt, Crv>;
// Type definition for the insertion surface-sweep visitor.
typedef Arr_insertion_traits_2<Gt2, Arr> I_traits;
template <typename Evt, typename Crv>
using Insertion_helper =
Arr_spherical_insertion_helper<I_traits, Arr, Evt, Crv>;
// Type definition for the no-intersection insertion surface-sweep visitor.
typedef Arr_basic_insertion_traits_2<Gt2, Arr> Nxi_traits;
template <typename Evt, typename Crv>
using No_intersection_insertion_helper =
Arr_spherical_insertion_helper<Nxi_traits, Arr, Evt, Crv>;
// Type definition for the batched point-location surface-sweep visitor.
typedef Arr_batched_point_location_traits_2<Arr> Bpl_traits;
template <typename Evt, typename Crv>
using Batched_point_location_helper =
Arr_spherical_batched_pl_helper<Bpl_traits, Arr, Evt, Crv>;
// Type definition for the vertical decomposition surface-sweep visitor.
typedef Arr_batched_point_location_traits_2<Arr> Vd_traits;
template <typename Evt, typename Crv>
using Vertical_decomposition_helper =
Arr_spherical_vert_decomp_helper<Vd_traits, Arr, Evt, Crv>;
// Type definition for the overlay surface-sweep visitor.
template <typename Gt, typename Evt, typename Crv,
typename ArrA, typename ArrB>
using Overlay_helper =
Arr_spherical_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>;
#endif
//@} //@}
public: public:

View File

@ -226,82 +226,6 @@ public:
// defining a type that inherits from the template we need to alias. However, // defining a type that inherits from the template we need to alias. However,
// the non-C++11 code requires the (re)definition of all constructors of the // the non-C++11 code requires the (re)definition of all constructors of the
// derived class. // derived class.
#if defined(CGAL_CFG_NO_CPP0X_TEMPLATE_ALIASES)
// Type definition for the construction surface-sweep visitor.
template <typename Evt, typename Crv>
struct Construction_helper :
public Arr_unb_planar_construction_helper<Gt2, Arr, Evt, Crv>
{
typedef Arr_unb_planar_construction_helper<Gt2, Arr, Evt, Crv>
Base;
Construction_helper(Arr* arr) : Base(arr) {}
};
// Type definition for the no-intersection construction surface-sweep visitor.
template <typename Evt, typename Crv>
struct No_intersection_construction_helper :
public Arr_unb_planar_construction_helper<Gt2, Arr, Evt, Crv>
{
typedef Arr_unb_planar_construction_helper<Gt2, Arr, Evt, Crv>
Base;
No_intersection_construction_helper(Arr* arr) : Base(arr) {}
};
// Type definition for the insertion surface-sweep visitor.
typedef Arr_insertion_traits_2<Gt2, Arr> I_traits;
template <typename Evt, typename Crv>
struct Insertion_helper :
public Arr_unb_planar_insertion_helper<I_traits, Arr, Evt, Crv>
{
typedef Arr_unb_planar_insertion_helper<I_traits, Arr, Evt, Crv>
Base;
Insertion_helper(Arr* arr) : Base(arr) {}
};
// Type definition for the no-intersection insertion surface-sweep visitor.
typedef Arr_basic_insertion_traits_2<Gt2, Arr> Nxi_traits;
template <typename Evt, typename Crv>
struct No_intersection_insertion_helper :
public Arr_unb_planar_insertion_helper<Nxi_traits, Arr, Evt, Crv>
{
typedef Arr_unb_planar_insertion_helper<Nxi_traits, Arr, Evt, Crv>
Base;
No_intersection_insertion_helper(Arr* arr) : Base(arr) {}
};
// Type definition for the batched point-location surface-sweep visitor.
typedef Arr_batched_point_location_traits_2<Arr> Bpl_traits;
template <typename Evt, typename Crv>
struct Batched_point_location_helper :
public Arr_unb_planar_batched_pl_helper<Bpl_traits, Arr, Evt, Crv>
{
typedef Arr_unb_planar_batched_pl_helper<Bpl_traits, Arr, Evt, Crv>
Base;
Batched_point_location_helper(const Arr* arr) : Base(arr) {}
};
// Type definition for the vertical decomposition surface-sweep visitor.
typedef Arr_batched_point_location_traits_2<Arr> Vd_traits;
template <typename Evt, typename Crv>
struct Vertical_decomposition_helper :
public Arr_unb_planar_vert_decomp_helper<Vd_traits, Arr, Evt, Crv>
{
typedef Arr_unb_planar_vert_decomp_helper<Vd_traits, Arr, Evt, Crv>
Base;
Vertical_decomposition_helper(const Arr* arr) : Base(arr) {}
};
// Type definition for the overlay surface-sweep visitor.
template <typename Gt, typename Evt, typename Crv,
typename ArrA, typename ArrB>
struct Overlay_helper :
public Arr_unb_planar_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>
{
typedef Arr_unb_planar_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>
Base;
Overlay_helper(const ArrA* arr_a, const ArrB* arr_b) : Base(arr_a, arr_b) {}
};
#else
// Type definition for the construction surface-sweep visitor. // Type definition for the construction surface-sweep visitor.
template <typename Evt, typename Crv> template <typename Evt, typename Crv>
using Construction_helper = using Construction_helper =
@ -341,7 +265,6 @@ public:
typename ArrA, typename ArrB> typename ArrA, typename ArrB>
using Overlay_helper = using Overlay_helper =
Arr_unb_planar_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>; Arr_unb_planar_overlay_helper<Gt, ArrA, ArrB, Arr, Evt, Crv>;
#endif
//@} //@}
public: public:

View File

@ -641,20 +641,6 @@ private:
#define QUERY_PL_TRAPEZOID_RIC_NO_GUARANTEE(obj) #define QUERY_PL_TRAPEZOID_RIC_NO_GUARANTEE(obj)
#endif #endif
#if defined(CGAL_CFG_NO_CPP0X_LAMBDAS)
#define MEASURE_NAIVE_PL(timer, op) op
#define MEASURE_SIMPLE_PL(timer, op) op
#define MEASURE_WALK_PL(timer, op) op
#define MEASURE_LM_PL(timer, op) op
#define MEASURE_LM_RANDOM_PL(timer, op) op
#define MEASURE_LM_GRID_PL(timer, op) op
#define MEASURE_LM_HALTON_PL(timer, op) op
#define MEASURE_LM_MIDDLE_EDGES_PL(timer, op) op
#define MEASURE_LM_SPECIFIED_POINTS_PL(timer, op) op
#define MEASURE_TRIANGULATION_PL(timer, op) op
#define MEASURE_TRAPEZOID_RIC_PL(timer, op) op
#define MEASURE_TRAPEZOID_RIC_NO_GUARANTEE_PL(timer, op) op
#else
#define MEASURE_NAIVE_PL(timer, op) measure<NAIVE_PL>(timer, [&](){ op; }); #define MEASURE_NAIVE_PL(timer, op) measure<NAIVE_PL>(timer, [&](){ op; });
#define MEASURE_SIMPLE_PL(timer, op) measure<SIMPLE_PL>(timer, [&](){ op; }); #define MEASURE_SIMPLE_PL(timer, op) measure<SIMPLE_PL>(timer, [&](){ op; });
#define MEASURE_WALK_PL(timer, op) measure<WALK_PL>(timer, [&](){ op; }); #define MEASURE_WALK_PL(timer, op) measure<WALK_PL>(timer, [&](){ op; });
@ -675,7 +661,6 @@ private:
measure<TRAPEZOID_RIC_PL>(timer, [&](){ op; }); measure<TRAPEZOID_RIC_PL>(timer, [&](){ op; });
#define MEASURE_TRAPEZOID_RIC_NO_GUARANTEE_PL(timer, op) \ #define MEASURE_TRAPEZOID_RIC_NO_GUARANTEE_PL(timer, op) \
measure<TRAPEZOID_RIC_NO_GUARANTEE_PL>(timer, [&](){ op; }); measure<TRAPEZOID_RIC_NO_GUARANTEE_PL>(timer, [&](){ op; });
#endif
//! Constructor. //! Constructor.
template <typename GeomTraits, typename TopolTraits> template <typename GeomTraits, typename TopolTraits>

View File

@ -19,7 +19,6 @@ int main()
#include <CGAL/Arr_rational_function_traits_2.h> //Traits #include <CGAL/Arr_rational_function_traits_2.h> //Traits
#include <CGAL/Arrangement_2.h> //Arrangement #include <CGAL/Arrangement_2.h> //Arrangement
#include <CGAL/Surface_sweep_2_algorithms.h> #include <CGAL/Surface_sweep_2_algorithms.h>
#include <boost/foreach.hpp>
typedef CGAL::CORE_arithmetic_kernel::Integer Number_type; typedef CGAL::CORE_arithmetic_kernel::Integer Number_type;
typedef CGAL::Algebraic_kernel_d_1<Number_type> AK1; typedef CGAL::Algebraic_kernel_d_1<Number_type> AK1;
@ -303,19 +302,19 @@ int main()
curves.push_back(construct_curve_2(x*x*x)); curves.push_back(construct_curve_2(x*x*x));
curves.push_back(construct_curve_2(x*x*x, x*x-2)); curves.push_back(construct_curve_2(x*x*x, x*x-2));
BOOST_FOREACH(const Curve_2& curve, curves){ for(const Curve_2& curve : curves){
assert(CGAL::degree(curve.numerator()) >= 0); assert(CGAL::degree(curve.numerator()) >= 0);
} }
CGAL::compute_subcurves(curves.begin(),curves.end(), CGAL::compute_subcurves(curves.begin(),curves.end(),
std::back_inserter(xcurves),false,traits); std::back_inserter(xcurves),false,traits);
BOOST_FOREACH(const X_monotone_curve_2& xcurve, xcurves) { for(const X_monotone_curve_2& xcurve : xcurves) {
assert(CGAL::degree(xcurve.numerator()) >= 0); assert(CGAL::degree(xcurve.numerator()) >= 0);
} }
CGAL::compute_intersection_points(curves.begin(),curves.end(), CGAL::compute_intersection_points(curves.begin(),curves.end(),
std::back_inserter(points), false, std::back_inserter(points), false,
traits); traits);
BOOST_FOREACH(const Point_2& point, points) { for(const Point_2& point : points) {
assert(CGAL::degree(point.numerator()) >= 0); assert(CGAL::degree(point.numerator()) >= 0);
} }
} }
@ -333,18 +332,18 @@ int main()
curves.push_back(construct_curve_2(x*x*x, x*x-2)); curves.push_back(construct_curve_2(x*x*x, x*x-2));
traits.cleanup_cache(); traits.cleanup_cache();
BOOST_FOREACH(const Curve_2& curve, curves){ for(const Curve_2& curve : curves){
assert(CGAL::degree(curve.numerator()) >= 0); assert(CGAL::degree(curve.numerator()) >= 0);
} }
CGAL::compute_subcurves(curves.begin(), curves.end(), CGAL::compute_subcurves(curves.begin(), curves.end(),
std::back_inserter(xcurves), false, traits); std::back_inserter(xcurves), false, traits);
BOOST_FOREACH(const X_monotone_curve_2& xcurve, xcurves) { for(const X_monotone_curve_2& xcurve : xcurves) {
assert(CGAL::degree(xcurve.numerator()) >= 0); assert(CGAL::degree(xcurve.numerator()) >= 0);
} }
CGAL::compute_intersection_points(curves.begin(), curves.end(), CGAL::compute_intersection_points(curves.begin(), curves.end(),
std::back_inserter(points), false, std::back_inserter(points), false,
traits); traits);
BOOST_FOREACH(const Point_2& point, points) { for(const Point_2& point : points) {
assert(CGAL::degree(point.numerator()) >= 0); assert(CGAL::degree(point.numerator()) >= 0);
} }

View File

@ -85,7 +85,7 @@ bool test_one_file(std::ifstream& in_file, bool /* verbose */)
std::cout.flush(); std::cout.flush();
CGAL::insert_non_intersecting_curves(arr, xcurves.begin(), xcurves.end()); CGAL::insert_non_intersecting_curves(arr, xcurves.begin(), xcurves.end());
std::cout << "inserted" << std::endl; std::cout << "inserted" << std::endl;
BOOST_FOREACH(Halfedge_handle hh, arr.halfedge_handles()) for(Halfedge_handle hh : arr.halfedge_handles())
halfedges.push_back(hh); halfedges.push_back(hh);
#endif #endif
@ -108,7 +108,7 @@ bool test_one_file(std::ifstream& in_file, bool /* verbose */)
{ {
std::cout << "Faces:" << std::endl; std::cout << "Faces:" << std::endl;
BOOST_FOREACH(Arrangement_2::Face_handle fh, arr.face_handles()) for(Arrangement_2::Face_handle fh : arr.face_handles())
{ {
std::cout << " Face: " std::cout << " Face: "
<< &(fh) << &(fh)

View File

@ -22,7 +22,7 @@ struct Linear_cell_complex_bgl_min_items
typedef CGAL::Tag_true Darts_with_id; typedef CGAL::Tag_true Darts_with_id;
typedef CGAL::Cell_attribute_with_point_and_id<LCC> Vertex_attrib; typedef CGAL::Cell_attribute_with_point_and_id<LCC> Vertex_attrib;
typedef CGAL::Cell_attribute_with_id<LCC> Face_attrib; typedef CGAL::Cell_attribute_with_id<LCC> Face_attrib;
typedef CGAL::cpp11::tuple<Vertex_attrib, void, Face_attrib> Attributes; typedef std::tuple<Vertex_attrib, void, Face_attrib> Attributes;
}; };
}; };

View File

@ -2,7 +2,6 @@
#include <CGAL/Iterator_range.h> #include <CGAL/Iterator_range.h>
#include <CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h> #include <CGAL/boost/graph/graph_traits_Linear_cell_complex_for_combinatorial_map.h>
#include <boost/foreach.hpp>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
@ -37,17 +36,10 @@ void fct(const LCC& lcc)
{ {
vertex_range vr(vertices(lcc)); vertex_range vr(vertices(lcc));
#ifndef CGAL_CFG_NO_CPP0X_RANGE_BASED_FOR
std::cout << "new for loop" << std::endl; std::cout << "new for loop" << std::endl;
for(vertex_descriptor vd : vr){ for(vertex_descriptor vd : vr){
std::cout << vd->point() << std::endl; std::cout << vd->point() << std::endl;
} }
#endif
std::cout << "BOOST_FOREACH" << std::endl;
BOOST_FOREACH(vertex_descriptor vd, vr){
std::cout << vd->point() << std::endl;
}
std::cout << "boost::tie + std::for_each" << std::endl; std::cout << "boost::tie + std::for_each" << std::endl;
vertex_iterator vb, ve; vertex_iterator vb, ve;

View File

@ -13,7 +13,6 @@
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <boost/foreach.hpp>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
@ -31,8 +30,8 @@ int main(int argc, char** argv )
std::vector<vertex_descriptor> V; std::vector<vertex_descriptor> V;
std::ifstream in((argc>1)?argv[1]:"in.off"); std::ifstream in((argc>1)?argv[1]:"in.off");
CGAL::read_off(in, mesh); CGAL::read_off(in, mesh);
BOOST_FOREACH(vertex_descriptor vd, vertices(mesh)){ for(vertex_descriptor vd : vertices(mesh)){
BOOST_FOREACH(halfedge_descriptor hd, CGAL::halfedges_around_target(vd,mesh)){ for(halfedge_descriptor hd : CGAL::halfedges_around_target(vd,mesh)){
if(! CGAL::is_border(edge(hd,mesh),mesh)){ if(! CGAL::is_border(edge(hd,mesh),mesh)){
CGAL::Euler::flip_edge(hd,mesh); CGAL::Euler::flip_edge(hd,mesh);
CGAL::write_off((argc>2)?argv[2]:"out.off", mesh); CGAL::write_off((argc>2)?argv[2]:"out.off", mesh);

View File

@ -2,7 +2,6 @@
#include <CGAL/Polyhedron_3.h> #include <CGAL/Polyhedron_3.h>
#include <CGAL/Iterator_range.h> #include <CGAL/Iterator_range.h>
#include <boost/foreach.hpp>
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
@ -36,18 +35,11 @@ void fct(const Polyhedron& p)
{ {
vertex_range vr(vertices(p)); vertex_range vr(vertices(p));
#ifndef CGAL_CFG_NO_CPP0X_RANGE_BASED_FOR
std::cout << "new for loop" << std::endl; std::cout << "new for loop" << std::endl;
for(vertex_descriptor vd : vr){ for(vertex_descriptor vd : vr){
std::cout << vd->point() << std::endl; std::cout << vd->point() << std::endl;
} }
#endif
std::cout << "BOOST_FOREACH" << std::endl;
BOOST_FOREACH(vertex_descriptor vd, vr){
std::cout << vd->point() << std::endl;
}
std::cout << "boost::tie + std::for_each" << std::endl; std::cout << "boost::tie + std::for_each" << std::endl;
vertex_iterator vb, ve; vertex_iterator vb, ve;

View File

@ -5,7 +5,6 @@
#include <fstream> #include <fstream>
#include <boost/graph/connected_components.hpp> #include <boost/graph/connected_components.hpp>
#include <boost/foreach.hpp>
typedef CGAL::Simple_cartesian<double> Kernel; typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point; typedef Kernel::Point_3 Point;
@ -24,7 +23,7 @@ int main(int argc, char* argv[])
int num = connected_components(sm, ccmap); int num = connected_components(sm, ccmap);
std::cout << num << " connected components" << std::endl; std::cout << num << " connected components" << std::endl;
BOOST_FOREACH(vertex_descriptor v, vertices(sm)){ for(vertex_descriptor v : vertices(sm)){
std::cout << v << " is in component " << ccmap[v] << std::endl; std::cout << v << " is in component " << ccmap[v] << std::endl;
} }

View File

@ -5,7 +5,6 @@
#include <fstream> #include <fstream>
#include <boost/graph/prim_minimum_spanning_tree.hpp> #include <boost/graph/prim_minimum_spanning_tree.hpp>
#include <boost/foreach.hpp>
typedef CGAL::Simple_cartesian<double> Kernel; typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point; typedef Kernel::Point_3 Point;
@ -36,14 +35,14 @@ int main(int argc, char* argv[])
" coord Coordinate {\n" " coord Coordinate {\n"
" point [ \n"; " point [ \n";
BOOST_FOREACH(vertex_descriptor vd, vertices(P)){ for(vertex_descriptor vd : vertices(P)){
std::cout << " " << P.point(vd) << "\n"; std::cout << " " << P.point(vd) << "\n";
} }
std::cout << " ]\n" std::cout << " ]\n"
" }\n" " }\n"
" coordIndex [\n"; " coordIndex [\n";
BOOST_FOREACH(vertex_descriptor vd, vertices(P)){ for(vertex_descriptor vd : vertices(P)){
if(predecessor[vd]!=vd){ if(predecessor[vd]!=vd){
std::cout << " " << std::size_t(vd) << ", " << std::size_t(predecessor[vd]) << ", -1\n"; std::cout << " " << std::size_t(vd) << ", " << std::size_t(predecessor[vd]) << ", -1\n";
} }

View File

@ -11,7 +11,6 @@
#include <fstream> #include <fstream>
#include <vector> #include <vector>
#include <boost/foreach.hpp>
typedef CGAL::Simple_cartesian<double> Kernel; typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point; typedef Kernel::Point_3 Point;
@ -72,43 +71,43 @@ int main(int argc, char* argv[])
std::cout << "opposite of seam halfedge in seam mesh: " << opposite(bhd, mesh) << std::endl; std::cout << "opposite of seam halfedge in seam mesh: " << opposite(bhd, mesh) << std::endl;
std::cout << "vertices on one of the seams" << std::endl; std::cout << "vertices on one of the seams" << std::endl;
BOOST_FOREACH(halfedge_descriptor hd, for(halfedge_descriptor hd :
halfedges_around_face(opposite(bhd, mesh), mesh)){ halfedges_around_face(opposite(bhd, mesh), mesh)){
std::cout << target(hd.tmhd, sm) << " "; std::cout << target(hd.tmhd, sm) << " ";
} }
std::cout << std::endl; std::cout << std::endl;
std::cout << "vertices around " << target(smhd , sm) << " in (base) mesh" << std::endl; std::cout << "vertices around " << target(smhd , sm) << " in (base) mesh" << std::endl;
BOOST_FOREACH(SM_halfedge_descriptor hd, halfedges_around_target(smhd, sm)){ for(SM_halfedge_descriptor hd : halfedges_around_target(smhd, sm)){
std::cout << source(hd, sm) << " "; std::cout << source(hd, sm) << " ";
} }
std::cout << std::endl; std::cout << std::endl;
std::cout << "vertices around " << target(bhd , mesh) << " in seam mesh" << std::endl; std::cout << "vertices around " << target(bhd , mesh) << " in seam mesh" << std::endl;
BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target(bhd, mesh)){ for(halfedge_descriptor hd : halfedges_around_target(bhd, mesh)){
std::cout << source(hd.tmhd, sm) << " "; std::cout << source(hd.tmhd, sm) << " ";
} }
std::cout << std::endl; std::cout << std::endl;
std::cout << "vertices around " << source(smhd , sm) << " in (base) mesh" << std::endl; std::cout << "vertices around " << source(smhd , sm) << " in (base) mesh" << std::endl;
BOOST_FOREACH(SM_halfedge_descriptor hd, for(SM_halfedge_descriptor hd :
halfedges_around_source(source(smhd, sm), sm)){ halfedges_around_source(source(smhd, sm), sm)){
std::cout << target(hd, sm) << " "; std::cout << target(hd, sm) << " ";
} }
std::cout << std::endl; std::cout << std::endl;
std::cout << "vertices around " << source(bhd , mesh) << " in seam mesh" << std::endl; std::cout << "vertices around " << source(bhd , mesh) << " in seam mesh" << std::endl;
BOOST_FOREACH(halfedge_descriptor hd, for(halfedge_descriptor hd :
halfedges_around_source(source(bhd, mesh), mesh)){ halfedges_around_source(source(bhd, mesh), mesh)){
std::cout << target(hd.tmhd, sm) << " "; std::cout << target(hd.tmhd, sm) << " ";
} }
std::cout << std::endl; std::cout << std::endl;
std::cout << "vertices around vertices in seam mesh" << std::endl; std::cout << "vertices around vertices in seam mesh" << std::endl;
BOOST_FOREACH(vertex_descriptor vd, vertices(mesh)){ for(vertex_descriptor vd : vertices(mesh)){
halfedge_descriptor hd = halfedge(vd, mesh); halfedge_descriptor hd = halfedge(vd, mesh);
std::cout << " " << vd << " has incident vertices:" << std::endl; std::cout << " " << vd << " has incident vertices:" << std::endl;
BOOST_FOREACH(halfedge_descriptor hd2, halfedges_around_target(hd, mesh)){ for(halfedge_descriptor hd2 : halfedges_around_target(hd, mesh)){
std::cout << " " << hd2; std::cout << " " << hd2;
} }
std::cout << std::endl; std::cout << std::endl;
@ -118,19 +117,19 @@ int main(int argc, char* argv[])
std::cout << "the (base) mesh has: " << num_halfedges(sm) << " halfedges" << std::endl; std::cout << "the (base) mesh has: " << num_halfedges(sm) << " halfedges" << std::endl;
std::cout << "the seam mesh has: " << num_halfedges(mesh) << " halfedges" << std::endl; std::cout << "the seam mesh has: " << num_halfedges(mesh) << " halfedges" << std::endl;
std::cout << "halfedges in (base) mesh" << std::endl; std::cout << "halfedges in (base) mesh" << std::endl;
BOOST_FOREACH(SM_halfedge_descriptor hd, halfedges(sm)){ for(SM_halfedge_descriptor hd : halfedges(sm)){
std::cout << hd << " "; std::cout << hd << " ";
} }
std::cout << std::endl; std::cout << std::endl;
std::cout << "halfedges in seam mesh" << std::endl; std::cout << "halfedges in seam mesh" << std::endl;
BOOST_FOREACH(halfedge_descriptor hd, halfedges(mesh)){ for(halfedge_descriptor hd : halfedges(mesh)){
std::cout << hd << " "; std::cout << hd << " ";
} }
std::cout << std::endl; std::cout << std::endl;
std::cout << "faces of the base and seam meshes" << std::endl; std::cout << "faces of the base and seam meshes" << std::endl;
BOOST_FOREACH(face_descriptor fd, faces(mesh)){ for(face_descriptor fd : faces(mesh)){
std::cout << fd << " "; std::cout << fd << " ";
} }
std::cout << std::endl; std::cout << std::endl;

View File

@ -8,7 +8,6 @@
#include <boost/graph/filtered_graph.hpp> #include <boost/graph/filtered_graph.hpp>
#include <boost/graph/connected_components.hpp> #include <boost/graph/connected_components.hpp>
#include <boost/foreach.hpp>
typedef CGAL::Simple_cartesian<double> Kernel; typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point; typedef Kernel::Point_3 Point;
@ -52,19 +51,19 @@ int main(int argc, char* argv[])
std::cout << "dual has " << num_vertices(dual) << " vertices" << std::endl; std::cout << "dual has " << num_vertices(dual) << " vertices" << std::endl;
std::cout << "The vertices of dual are faces in primal"<< std::endl; std::cout << "The vertices of dual are faces in primal"<< std::endl;
BOOST_FOREACH(boost::graph_traits<Dual>::vertex_descriptor dvd , vertices(dual)) { for(boost::graph_traits<Dual>::vertex_descriptor dvd : vertices(dual)) {
std::cout << dvd << std::endl; std::cout << dvd << std::endl;
} }
std::cout << "The edges in primal and dual with source and target" << std::endl; std::cout << "The edges in primal and dual with source and target" << std::endl;
BOOST_FOREACH(edge_descriptor e , edges(dual)) { for(edge_descriptor e : edges(dual)) {
std::cout << e << " in primal: " << source(e,primal) << " -- " << target(e,primal) << " " std::cout << e << " in primal: " << source(e,primal) << " -- " << target(e,primal) << " "
<< " in dual : " << source(e,finite_dual) << " -- " << target(e,finite_dual) << std::endl; << " in dual : " << source(e,finite_dual) << " -- " << target(e,finite_dual) << std::endl;
} }
std::cout << "edges of the finite dual graph" << std::endl; std::cout << "edges of the finite dual graph" << std::endl;
BOOST_FOREACH(boost::graph_traits<FiniteDual>::edge_descriptor e , edges(finite_dual)) { for(boost::graph_traits<FiniteDual>::edge_descriptor e : CGAL::make_range(edges(finite_dual))) {
std::cout << e << " " << source(e,primal) << " " << source(e,finite_dual) << std::endl; std::cout << e << " " << source(e,primal) << " " << source(e,finite_dual) << std::endl;
} }
@ -74,7 +73,7 @@ int main(int argc, char* argv[])
int num = connected_components(finite_dual, fccmap); int num = connected_components(finite_dual, fccmap);
std::cout << "The graph has " << num << " connected components (face connectivity)" << std::endl; std::cout << "The graph has " << num << " connected components (face connectivity)" << std::endl;
BOOST_FOREACH(face_descriptor f , faces(primal)) { for(face_descriptor f : faces(primal)) {
std::cout << f << " in connected component " << fccmap[f] << std::endl; std::cout << f << " in connected component " << fccmap[f] << std::endl;
} }
@ -83,7 +82,7 @@ int main(int argc, char* argv[])
num = connected_components(primal, vccmap); num = connected_components(primal, vccmap);
std::cout << "The graph has " << num << " connected components (edge connectvity)" << std::endl; std::cout << "The graph has " << num << " connected components (edge connectvity)" << std::endl;
BOOST_FOREACH(vertex_descriptor v , vertices(primal)) { for(vertex_descriptor v : vertices(primal)) {
std::cout << v << " in connected component " << vccmap[v] << std::endl; std::cout << v << " in connected component " << vccmap[v] << std::endl;
} }
return 0; return 0;

View File

@ -6,7 +6,6 @@
#include <fstream> #include <fstream>
#include <boost/graph/connected_components.hpp> #include <boost/graph/connected_components.hpp>
#include <boost/foreach.hpp>
typedef CGAL::Simple_cartesian<double> Kernel; typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point; typedef Kernel::Point_3 Point;

View File

@ -5,7 +5,6 @@
#include <CGAL/boost/graph/iterator.h> #include <CGAL/boost/graph/iterator.h>
#include <boost/graph/filtered_graph.hpp> #include <boost/graph/filtered_graph.hpp>
#include <boost/foreach.hpp>
typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic; typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic;
@ -104,7 +103,7 @@ main(int,char*[])
Ppmap ppmap = get(boost::vertex_point, t); Ppmap ppmap = get(boost::vertex_point, t);
BOOST_FOREACH(vertex_descriptor vd, vertices_around_target(*vertices(t).first, t)){ for(vertex_descriptor vd : vertices_around_target(*vertices(t).first, t)){
std::cout << ppmap[vd] << std::endl; std::cout << ppmap[vd] << std::endl;
} }

View File

@ -785,7 +785,7 @@ void fill_hole(typename boost::graph_traits<Graph>::halfedge_descriptor h,
typedef typename Traits::halfedge_descriptor halfedge_descriptor; typedef typename Traits::halfedge_descriptor halfedge_descriptor;
face_descriptor f = add_face(g); face_descriptor f = add_face(g);
BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(h,g)){ for(halfedge_descriptor hd : halfedges_around_face(h,g)){
set_face(hd, f,g); set_face(hd, f,g);
} }
set_halfedge(f,h,g); set_halfedge(f,h,g);

View File

@ -28,11 +28,9 @@
#include <CGAL/boost/graph/helpers.h> #include <CGAL/boost/graph/helpers.h>
#include <CGAL/Dynamic_property_map.h> #include <CGAL/Dynamic_property_map.h>
#include <CGAL/assertions.h> #include <CGAL/assertions.h>
#include <boost/foreach.hpp>
#include <boost/unordered_set.hpp> #include <boost/unordered_set.hpp>
#include <boost/graph/graph_traits.hpp> #include <boost/graph/graph_traits.hpp>
#include <CGAL/boost/iterator/transform_iterator.hpp> #include <CGAL/boost/iterator/transform_iterator.hpp>
#include <boost/foreach.hpp>
#include <boost/iterator/filter_iterator.hpp> #include <boost/iterator/filter_iterator.hpp>
#include <boost/dynamic_bitset.hpp> #include <boost/dynamic_bitset.hpp>
#include <boost/range/has_range_iterator.hpp> #include <boost/range/has_range_iterator.hpp>
@ -286,12 +284,12 @@ struct Face_filtered_graph
selected_faces.reset(); selected_faces.reset();
selected_vertices.reset(); selected_vertices.reset();
selected_halfedges.reset(); selected_halfedges.reset();
BOOST_FOREACH(face_descriptor fd, faces(_graph) ) for(face_descriptor fd : faces(_graph) )
{ {
if(get(face_patch_index_map, fd) == face_patch_id) if(get(face_patch_index_map, fd) == face_patch_id)
{ {
selected_faces.set(get(fimap, fd)); selected_faces.set(get(fimap, fd));
BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(halfedge(fd, _graph), _graph)) for(halfedge_descriptor hd : halfedges_around_face(halfedge(fd, _graph), _graph))
{ {
selected_halfedges.set(get(himap, hd)); selected_halfedges.set(get(himap, hd));
selected_halfedges.set(get(himap, opposite(hd, _graph))); selected_halfedges.set(get(himap, opposite(hd, _graph)));
@ -325,12 +323,12 @@ struct Face_filtered_graph
boost::unordered_set<Patch_index> pids(boost::begin(selected_face_patch_indices), boost::unordered_set<Patch_index> pids(boost::begin(selected_face_patch_indices),
boost::end(selected_face_patch_indices)); boost::end(selected_face_patch_indices));
BOOST_FOREACH(face_descriptor fd, faces(_graph) ) for(face_descriptor fd : faces(_graph) )
{ {
if(pids.count(get(face_patch_index_map, fd)) != 0) if(pids.count(get(face_patch_index_map, fd)) != 0)
{ {
selected_faces.set(get(fimap, fd)); selected_faces.set(get(fimap, fd));
BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(halfedge(fd, _graph), _graph)) for(halfedge_descriptor hd : halfedges_around_face(halfedge(fd, _graph), _graph))
{ {
selected_halfedges.set(get(himap, hd)); selected_halfedges.set(get(himap, hd));
selected_halfedges.set(get(himap, opposite(hd, _graph))); selected_halfedges.set(get(himap, opposite(hd, _graph)));
@ -353,10 +351,10 @@ struct Face_filtered_graph
selected_faces.reset(); selected_faces.reset();
selected_vertices.reset(); selected_vertices.reset();
selected_halfedges.reset(); selected_halfedges.reset();
BOOST_FOREACH(face_descriptor fd, selection) for(face_descriptor fd : selection)
{ {
selected_faces.set(get(fimap, fd)); selected_faces.set(get(fimap, fd));
BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_face(halfedge(fd, _graph), _graph)) for(halfedge_descriptor hd : halfedges_around_face(halfedge(fd, _graph), _graph))
{ {
selected_halfedges.set(get(himap, hd)); selected_halfedges.set(get(himap, hd));
selected_halfedges.set(get(himap, opposite(hd, _graph))); selected_halfedges.set(get(himap, opposite(hd, _graph)));
@ -467,7 +465,7 @@ struct Face_filtered_graph
/// there is at most one connected set of selected faces. /// there is at most one connected set of selected faces.
bool is_selection_valid() bool is_selection_valid()
{ {
BOOST_FOREACH(vertex_descriptor vd, vertices(*this) ) for(vertex_descriptor vd : vertices(*this) )
{ {
face_descriptor first_selected = boost::graph_traits<Graph>::null_face(); face_descriptor first_selected = boost::graph_traits<Graph>::null_face();
bool first_unselected_found(false), bool first_unselected_found(false),

View File

@ -29,7 +29,6 @@
#include <CGAL/circulator.h> #include <CGAL/circulator.h>
#include <CGAL/Unique_hash_map.h> #include <CGAL/Unique_hash_map.h>
#include <boost/foreach.hpp>
#include <boost/iterator/iterator_facade.hpp> #include <boost/iterator/iterator_facade.hpp>
#include <boost/unordered_set.hpp> #include <boost/unordered_set.hpp>

View File

@ -72,7 +72,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm,
tm_face_descriptor tm_null_face = boost::graph_traits<TargetMesh>::null_face(); tm_face_descriptor tm_null_face = boost::graph_traits<TargetMesh>::null_face();
//insert halfedges and create each vertex when encountering its halfedge //insert halfedges and create each vertex when encountering its halfedge
BOOST_FOREACH(sm_edge_descriptor sm_e, edges(sm)) for(sm_edge_descriptor sm_e : edges(sm))
{ {
tm_edge_descriptor tm_e = add_edge(tm); tm_edge_descriptor tm_e = add_edge(tm);
sm_halfedge_descriptor sm_h = halfedge(sm_e, sm), sm_h_opp = opposite(sm_h, sm); sm_halfedge_descriptor sm_h = halfedge(sm_e, sm), sm_h_opp = opposite(sm_h, sm);
@ -121,7 +121,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm,
} }
} }
//create faces and connect halfedges //create faces and connect halfedges
BOOST_FOREACH(sm_face_descriptor sm_f, faces(sm)) for(sm_face_descriptor sm_f : faces(sm))
{ {
tm_face_descriptor tm_f = add_face(tm); tm_face_descriptor tm_f = add_face(tm);
*f2f++=std::make_pair(sm_f, tm_f); *f2f++=std::make_pair(sm_f, tm_f);
@ -131,7 +131,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm,
set_halfedge(tm_f, tm_h_prev, tm); set_halfedge(tm_f, tm_h_prev, tm);
CGAL_precondition(*halfedges_around_face(sm_h_i, sm).first == sm_h_i); CGAL_precondition(*halfedges_around_face(sm_h_i, sm).first == sm_h_i);
BOOST_FOREACH(sm_halfedge_descriptor sm_h, halfedges_around_face(sm_h_i, sm)) for(sm_halfedge_descriptor sm_h : halfedges_around_face(sm_h_i, sm))
{ {
tm_halfedge_descriptor tm_h = get(hmap, sm_h); tm_halfedge_descriptor tm_h = get(hmap, sm_h);
set_next(tm_h_prev, tm_h, tm); set_next(tm_h_prev, tm_h, tm);
@ -151,7 +151,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm,
tm_halfedge_descriptor tm_h_prev = tm_h; tm_halfedge_descriptor tm_h_prev = tm_h;
CGAL_precondition(*halfedges_around_face(sm_border_halfedges[i], sm).first == sm_border_halfedges[i]); CGAL_precondition(*halfedges_around_face(sm_border_halfedges[i], sm).first == sm_border_halfedges[i]);
BOOST_FOREACH(sm_halfedge_descriptor sm_h, for(sm_halfedge_descriptor sm_h :
halfedges_around_face(next(sm_border_halfedges[i], sm), sm)) halfedges_around_face(next(sm_border_halfedges[i], sm), sm))
{ {
CGAL_assertion(next(tm_h_prev, tm) == tm_h_prev); CGAL_assertion(next(tm_h_prev, tm) == tm_h_prev);

View File

@ -22,7 +22,6 @@
#define CGAL_BOOST_GRAPH_HELPERS_H #define CGAL_BOOST_GRAPH_HELPERS_H
#include <boost/foreach.hpp>
#include <boost/range/empty.hpp> #include <boost/range/empty.hpp>
#include <CGAL/boost/graph/iterator.h> #include <CGAL/boost/graph/iterator.h>
#include <CGAL/boost/graph/properties.h> #include <CGAL/boost/graph/properties.h>
@ -104,7 +103,7 @@ template <typename FaceGraph>
bool is_closed(const FaceGraph& g) bool is_closed(const FaceGraph& g)
{ {
typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
BOOST_FOREACH(halfedge_descriptor hd, halfedges(g)){ for(halfedge_descriptor hd : halfedges(g)){
if(is_border(hd,g)){ if(is_border(hd,g)){
return false; return false;
} }
@ -131,7 +130,7 @@ template <typename FaceGraph>
{ {
typedef typename boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
BOOST_FOREACH(vertex_descriptor vd, vertices(g)){ for(vertex_descriptor vd : vertices(g)){
halfedge_descriptor hd = halfedge(vd,g); halfedge_descriptor hd = halfedge(vd,g);
if((hd == boost::graph_traits<FaceGraph>::null_halfedge()) || if((hd == boost::graph_traits<FaceGraph>::null_halfedge()) ||
(! is_bivalent(hd,g))){ (! is_bivalent(hd,g))){
@ -161,7 +160,7 @@ template <typename FaceGraph>
{ {
typedef typename boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor; typedef typename boost::graph_traits<FaceGraph>::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits<FaceGraph>::halfedge_descriptor halfedge_descriptor;
BOOST_FOREACH(vertex_descriptor vd, vertices(g)){ for(vertex_descriptor vd : vertices(g)){
halfedge_descriptor hd = halfedge(vd,g); halfedge_descriptor hd = halfedge(vd,g);
if((hd == boost::graph_traits<FaceGraph>::null_halfedge()) || if((hd == boost::graph_traits<FaceGraph>::null_halfedge()) ||
(! is_trivalent(halfedge(hd,g),g))){ (! is_trivalent(halfedge(hd,g),g))){
@ -207,7 +206,7 @@ template <typename FaceGraph>
bool is_triangle_mesh(const FaceGraph& g) bool is_triangle_mesh(const FaceGraph& g)
{ {
typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor; typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor;
BOOST_FOREACH(face_descriptor fd, faces(g)){ for(face_descriptor fd : faces(g)){
if(! is_triangle(halfedge(fd,g),g)){ if(! is_triangle(halfedge(fd,g),g)){
return false; return false;
} }
@ -251,7 +250,7 @@ template <typename FaceGraph>
bool is_quad_mesh(const FaceGraph& g) bool is_quad_mesh(const FaceGraph& g)
{ {
typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor; typedef typename boost::graph_traits<FaceGraph>::face_descriptor face_descriptor;
BOOST_FOREACH(face_descriptor fd, faces(g)){ for(face_descriptor fd : faces(g)){
if(! is_quad(halfedge(fd,g),g)){ if(! is_quad(halfedge(fd,g),g)){
return false; return false;
} }
@ -388,7 +387,7 @@ bool is_valid_halfedge_graph(const Graph& g, bool verb = false)
// All halfedges. // All halfedges.
halfedges_size_type n = 0; halfedges_size_type n = 0;
BOOST_FOREACH(halfedge_descriptor begin, halfedges(g)) { for(halfedge_descriptor begin : halfedges(g)) {
if(!valid) if(!valid)
break; break;
verr << "halfedge " << n << std::endl; verr << "halfedge " << n << std::endl;
@ -440,7 +439,7 @@ bool is_valid_halfedge_graph(const Graph& g, bool verb = false)
// All vertices. // All vertices.
vertex_size_type v = 0; vertex_size_type v = 0;
n = 0; n = 0;
BOOST_FOREACH(vertex_descriptor vbegin, vertices(g)){ for(vertex_descriptor vbegin : vertices(g)){
if(!valid) if(!valid)
break; break;
verr << "vertex " << v << std::endl; verr << "vertex " << v << std::endl;
@ -480,7 +479,7 @@ bool is_valid_halfedge_graph(const Graph& g, bool verb = false)
// All halfedges. // All halfedges.
n = 0; n = 0;
BOOST_FOREACH(halfedge_descriptor i, halfedges(g)){ for(halfedge_descriptor i : halfedges(g)){
verr << "halfedge " << n << std::endl; verr << "halfedge " << n << std::endl;
// At least triangular facets and distinct geometry. // At least triangular facets and distinct geometry.
valid = valid && ( next(i, g) != i); valid = valid && ( next(i, g) != i);
@ -538,7 +537,7 @@ bool is_valid_face_graph(const Graph& g, bool verb = false)
faces_size_type f = 0; faces_size_type f = 0;
std::size_t n = 0; std::size_t n = 0;
halfedges_size_type nb = 0; halfedges_size_type nb = 0;
BOOST_FOREACH(face_descriptor fbegin, faces(g)){ for(face_descriptor fbegin : faces(g)){
if(!valid) if(!valid)
break; break;
verr << "face " << f << std::endl; verr << "face " << f << std::endl;
@ -571,7 +570,7 @@ bool is_valid_face_graph(const Graph& g, bool verb = false)
if ( valid && f != num_f) if ( valid && f != num_f)
verr << "counting faces failed." << std::endl; verr << "counting faces failed." << std::endl;
BOOST_FOREACH(halfedge_descriptor i, halfedges(g)){ for(halfedge_descriptor i : halfedges(g)){
//counting borders //counting borders
if ( is_border(i, g)) if ( is_border(i, g))
++nb; ++nb;
@ -619,7 +618,7 @@ bool is_valid_polygon_mesh(const Mesh& g, bool verb = false)
bool valid=is_valid_face_graph(g, verb); bool valid=is_valid_face_graph(g, verb);
//test for 2-manifoldness //test for 2-manifoldness
// Distinct facets on each side of an halfedge. // Distinct facets on each side of an halfedge.
BOOST_FOREACH(halfedge_descriptor i, halfedges(g)){ for(halfedge_descriptor i : halfedges(g)){
valid = valid && (face(i, g) != face(opposite(i, g), g)); valid = valid && (face(i, g) != face(opposite(i, g), g));
if ( ! valid) { if ( ! valid) {
verr << " both incident facets are equal." << std::endl; verr << " both incident facets are equal." << std::endl;
@ -1383,9 +1382,9 @@ void swap_vertices(
halfedge_descriptor hq=halfedge(q, g); halfedge_descriptor hq=halfedge(q, g);
halfedge_descriptor hp=halfedge(p, g); halfedge_descriptor hp=halfedge(p, g);
BOOST_FOREACH(halfedge_descriptor h, halfedges_around_target(hq, g)) for(halfedge_descriptor h : halfedges_around_target(hq, g))
set_target(h, p, g); set_target(h, p, g);
BOOST_FOREACH(halfedge_descriptor h, halfedges_around_target(hp, g)) for(halfedge_descriptor h : halfedges_around_target(hp, g))
set_target(h, q, g); set_target(h, q, g);
set_halfedge(p, hq, g); set_halfedge(p, hq, g);
set_halfedge(q, hp, g); set_halfedge(q, hp, g);

View File

@ -22,7 +22,6 @@
#define CGAL_BOOST_GRAPH_IO_H #define CGAL_BOOST_GRAPH_IO_H
#include <boost/container/flat_map.hpp> #include <boost/container/flat_map.hpp>
#include <boost/foreach.hpp>
#include <iostream> #include <iostream>
#include <algorithm> #include <algorithm>
@ -87,15 +86,15 @@ bool write_wrl(std::ostream& os,
"coord Coordinate {\n" "coord Coordinate {\n"
"point [\n"; "point [\n";
BOOST_FOREACH(vertex_descriptor v, vertices(g)){ for(vertex_descriptor v : vertices(g)){
os << get(vpm,v) << ",\n"; os << get(vpm,v) << ",\n";
reindex[v]=n++; reindex[v]=n++;
} }
os << "] #point\n" os << "] #point\n"
"} #coord Coordinate\n" "} #coord Coordinate\n"
"coordIndex [\n"; "coordIndex [\n";
BOOST_FOREACH(face_descriptor f, faces(g)){ for(face_descriptor f : faces(g)){
BOOST_FOREACH(vertex_descriptor v, vertices_around_face(halfedge(f,g),g)){ for(vertex_descriptor v : vertices_around_face(halfedge(f,g),g)){
os << reindex[v] << ","; os << reindex[v] << ",";
} }
os << "-1,\n"; os << "-1,\n";
@ -152,14 +151,14 @@ bool write_off(std::ostream& os,
os << "OFF\n" << nv << " " << nf << " 0\n"; os << "OFF\n" << nv << " " << nf << " 0\n";
boost::container::flat_map<vertex_descriptor,vertices_size_type> reindex; boost::container::flat_map<vertex_descriptor,vertices_size_type> reindex;
int n = 0; int n = 0;
BOOST_FOREACH(vertex_descriptor v, vertices(g)){ for(vertex_descriptor v : vertices(g)){
os << get(vpm,v) << '\n'; os << get(vpm,v) << '\n';
reindex[v]=n++; reindex[v]=n++;
} }
BOOST_FOREACH(face_descriptor f, faces(g)){ for(face_descriptor f : faces(g)){
os << degree(f,g); os << degree(f,g);
BOOST_FOREACH(vertex_descriptor v, vertices_around_face(halfedge(f,g),g)){ for(vertex_descriptor v : vertices_around_face(halfedge(f,g),g)){
os << " " << reindex[v]; os << " " << reindex[v];
} }
os << '\n'; os << '\n';
@ -376,16 +375,16 @@ bool write_inp(std::ostream& os,
os << "*Part, name=" << name << "\n*Node\n"; os << "*Part, name=" << name << "\n*Node\n";
boost::container::flat_map<vertex_descriptor,vertices_size_type> reindex; boost::container::flat_map<vertex_descriptor,vertices_size_type> reindex;
int n = 1; int n = 1;
BOOST_FOREACH(vertex_descriptor v, vertices(g)){ for(vertex_descriptor v : vertices(g)){
Point_3 p = get(vpm,v); Point_3 p = get(vpm,v);
os << n << ", " << p.x() << ", " << p.y() << ", " << p.z() << '\n'; os << n << ", " << p.x() << ", " << p.y() << ", " << p.z() << '\n';
reindex[v]=n++; reindex[v]=n++;
} }
n = 1; n = 1;
os << "*Element, type=" << type << std::endl; os << "*Element, type=" << type << std::endl;
BOOST_FOREACH(face_descriptor f, faces(g)){ for(face_descriptor f : faces(g)){
os << n++; os << n++;
BOOST_FOREACH(vertex_descriptor v, vertices_around_face(halfedge(f,g),g)){ for(vertex_descriptor v : vertices_around_face(halfedge(f,g),g)){
os << ", " << reindex[v]; os << ", " << reindex[v];
} }
os << '\n'; os << '\n';
@ -431,7 +430,7 @@ write_polys(std::ostream& os,
{ {
off += 3; off += 3;
offsets.push_back(off); offsets.push_back(off);
BOOST_FOREACH(vertex_descriptor v, for(vertex_descriptor v :
vertices_around_face(halfedge(*fit, mesh), mesh)) vertices_around_face(halfedge(*fit, mesh), mesh))
connectivity_table.push_back(V[v]); connectivity_table.push_back(V[v]);
} }
@ -481,7 +480,7 @@ write_polys_tag(std::ostream& os,
fit != faces(mesh).end() ; fit != faces(mesh).end() ;
++fit ) ++fit )
{ {
BOOST_FOREACH(vertex_descriptor v, for(vertex_descriptor v :
vertices_around_face(halfedge(*fit, mesh), mesh)) vertices_around_face(halfedge(*fit, mesh), mesh))
os << V[v] << " "; os << V[v] << " ";
} }

View File

@ -25,7 +25,6 @@
#include <CGAL/property_map.h> #include <CGAL/property_map.h>
#include <boost/graph/properties.hpp> #include <boost/graph/properties.hpp>
#include <boost/graph/graph_traits.hpp> #include <boost/graph/graph_traits.hpp>
#include <boost/foreach.hpp>
#include <boost/type_traits/is_const.hpp> #include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/remove_reference.hpp> #include <boost/type_traits/remove_reference.hpp>
#include <CGAL/Dynamic_property_map.h> #include <CGAL/Dynamic_property_map.h>
@ -132,7 +131,7 @@ void init_face_indices(PolygonMesh& pm,
Tag) Tag)
{ {
typename boost::property_traits<FaceIndexMap>::value_type i = 0; typename boost::property_traits<FaceIndexMap>::value_type i = 0;
BOOST_FOREACH(typename boost::graph_traits<PolygonMesh>::face_descriptor fd, for(typename boost::graph_traits<PolygonMesh>::face_descriptor fd :
faces(pm)) faces(pm))
{ {
put(fid, fd, i); put(fid, fd, i);
@ -146,7 +145,7 @@ void init_vertex_indices(PolygonMesh& pm,
Tag) Tag)
{ {
typename boost::property_traits<VertexIndexMap>::value_type i = 0; typename boost::property_traits<VertexIndexMap>::value_type i = 0;
BOOST_FOREACH(typename boost::graph_traits<PolygonMesh>::vertex_descriptor vd, for(typename boost::graph_traits<PolygonMesh>::vertex_descriptor vd :
vertices(pm)) vertices(pm))
{ {
put(vid, vd, i); put(vid, vd, i);
@ -160,7 +159,7 @@ void init_halfedge_indices(PolygonMesh& pm,
Tag) Tag)
{ {
typename boost::property_traits<HalfedgeIndexMap>::value_type i = 0; typename boost::property_traits<HalfedgeIndexMap>::value_type i = 0;
BOOST_FOREACH(typename boost::graph_traits<PolygonMesh>::halfedge_descriptor hd, for(typename boost::graph_traits<PolygonMesh>::halfedge_descriptor hd :
halfedges(pm)) halfedges(pm))
{ {
put(hid, hd, i); put(hid, hd, i);

View File

@ -22,7 +22,6 @@
#define CGAL_BOOST_GRAPH_SELECTION_H #define CGAL_BOOST_GRAPH_SELECTION_H
#include <boost/graph/graph_traits.hpp> #include <boost/graph/graph_traits.hpp>
#include <boost/foreach.hpp>
#include <CGAL/boost/graph/iterator.h> #include <CGAL/boost/graph/iterator.h>
#include <boost/unordered_set.hpp> #include <boost/unordered_set.hpp>
@ -45,10 +44,10 @@ extract_selection_boundary(
typedef typename GT::face_descriptor face_descriptor; typedef typename GT::face_descriptor face_descriptor;
typedef typename GT::halfedge_descriptor halfedge_descriptor; typedef typename GT::halfedge_descriptor halfedge_descriptor;
BOOST_FOREACH(face_descriptor fd, face_range) for(face_descriptor fd : face_range)
{ {
BOOST_FOREACH( halfedge_descriptor h, for(halfedge_descriptor h :
halfedges_around_face(halfedge(fd, fg), fg) ) halfedges_around_face(halfedge(fd, fg), fg) )
{ {
halfedge_descriptor opp_hd = opposite(h, fg); halfedge_descriptor opp_hd = opposite(h, fg);
face_descriptor opp_fd = face( opp_hd, fg ); face_descriptor opp_fd = face( opp_hd, fg );
@ -114,7 +113,7 @@ expand_face_selection(
//collect faces around the target vertex of the selection boundary halfedges //collect faces around the target vertex of the selection boundary halfedges
std::set<face_descriptor> new_selection_set; std::set<face_descriptor> new_selection_set;
BOOST_FOREACH(halfedge_descriptor hd, selection_boundary_halfedges) for(halfedge_descriptor hd : selection_boundary_halfedges)
{ {
face_descriptor fd=face(hd, fg); face_descriptor fd=face(hd, fg);
while( !get(is_selected,fd) ) while( !get(is_selected,fd) )
@ -128,7 +127,7 @@ expand_face_selection(
// extract unique selection // extract unique selection
std::vector<face_descriptor> new_selection; std::vector<face_descriptor> new_selection;
BOOST_FOREACH(face_descriptor fd, new_selection_set) for(face_descriptor fd : new_selection_set)
{ {
*out++=fd; *out++=fd;
new_selection.push_back(fd); new_selection.push_back(fd);
@ -184,7 +183,7 @@ reduce_face_selection(
//collect faces around the target vertex of the selection boundary halfedges //collect faces around the target vertex of the selection boundary halfedges
std::set<face_descriptor> elements_to_remove; std::set<face_descriptor> elements_to_remove;
BOOST_FOREACH(halfedge_descriptor hd, selection_boundary_halfedges) for(halfedge_descriptor hd : selection_boundary_halfedges)
{ {
hd = opposite(hd, fg); hd = opposite(hd, fg);
face_descriptor fd=face( hd, fg ); face_descriptor fd=face( hd, fg );
@ -197,7 +196,7 @@ reduce_face_selection(
} }
/// update is-selected attribute and output iterator /// update is-selected attribute and output iterator
BOOST_FOREACH(face_descriptor fd, elements_to_remove) for(face_descriptor fd : elements_to_remove)
{ {
*out++=fd; *out++=fd;
put( is_selected, fd, false ); put( is_selected, fd, false );
@ -205,7 +204,7 @@ reduce_face_selection(
// update the set of currently selected faces // update the set of currently selected faces
std::vector<face_descriptor> new_selection; std::vector<face_descriptor> new_selection;
BOOST_FOREACH(face_descriptor fd, current_selection) for(face_descriptor fd : current_selection)
if ( !elements_to_remove.count(fd) ) if ( !elements_to_remove.count(fd) )
new_selection.push_back(fd); new_selection.push_back(fd);
current_selection.swap(new_selection); current_selection.swap(new_selection);
@ -239,7 +238,7 @@ select_incident_faces(
//collect faces around the target vertex of the selection boundary halfedges //collect faces around the target vertex of the selection boundary halfedges
std::set<face_descriptor> selection_set; std::set<face_descriptor> selection_set;
BOOST_FOREACH(halfedge_descriptor hd, hedges) for(halfedge_descriptor hd : hedges)
{ {
halfedge_descriptor first = hd; halfedge_descriptor first = hd;
face_descriptor fd=face(hd, fg); face_descriptor fd=face(hd, fg);
@ -294,15 +293,15 @@ expand_edge_selection(
//collect adjacent edges not already selected //collect adjacent edges not already selected
std::set<edge_descriptor> new_selection_set; std::set<edge_descriptor> new_selection_set;
BOOST_FOREACH(edge_descriptor ed, current_selection) for(edge_descriptor ed : current_selection)
{ {
halfedge_descriptor hdi=halfedge(ed,fg); halfedge_descriptor hdi=halfedge(ed,fg);
BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_source( hdi, fg)) for(halfedge_descriptor hd : halfedges_around_source( hdi, fg))
{ {
edge_descriptor ned=edge(hd, fg); edge_descriptor ned=edge(hd, fg);
if (!get(is_selected, ned)) new_selection_set.insert(ned); if (!get(is_selected, ned)) new_selection_set.insert(ned);
} }
BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target( hdi, fg)) for(halfedge_descriptor hd : halfedges_around_target( hdi, fg))
{ {
edge_descriptor ned=edge(hd, fg); edge_descriptor ned=edge(hd, fg);
if (!get(is_selected, ned)) new_selection_set.insert(ned); if (!get(is_selected, ned)) new_selection_set.insert(ned);
@ -311,7 +310,7 @@ expand_edge_selection(
// extract unique selection // extract unique selection
std::vector<edge_descriptor> new_selection; std::vector<edge_descriptor> new_selection;
BOOST_FOREACH(edge_descriptor ed, new_selection_set) for(edge_descriptor ed : new_selection_set)
{ {
*out++=ed; *out++=ed;
new_selection.push_back(ed); new_selection.push_back(ed);
@ -357,10 +356,10 @@ reduce_edge_selection(
// extract the set of vertices on the border // extract the set of vertices on the border
std::set<vertex_descriptor> unique_vertex_set; std::set<vertex_descriptor> unique_vertex_set;
BOOST_FOREACH(edge_descriptor ed, selection) for(edge_descriptor ed : selection)
{ {
halfedge_descriptor hd=halfedge(ed,fg); halfedge_descriptor hd=halfedge(ed,fg);
BOOST_FOREACH(halfedge_descriptor nhd, halfedges_around_source( hd, fg)) for(halfedge_descriptor nhd : halfedges_around_source( hd, fg))
{ {
edge_descriptor ned=edge(nhd, fg); edge_descriptor ned=edge(nhd, fg);
if (!get(is_selected, ned)){ if (!get(is_selected, ned)){
@ -368,7 +367,7 @@ reduce_edge_selection(
break; break;
} }
} }
BOOST_FOREACH(halfedge_descriptor nhd, halfedges_around_target( hd, fg)) for(halfedge_descriptor nhd : halfedges_around_target( hd, fg))
{ {
edge_descriptor ned=edge(nhd, fg); edge_descriptor ned=edge(nhd, fg);
if (!get(is_selected, ned)){ if (!get(is_selected, ned)){
@ -386,8 +385,8 @@ reduce_edge_selection(
//collect incident edges selected //collect incident edges selected
std::set<edge_descriptor> edges_to_deselect; std::set<edge_descriptor> edges_to_deselect;
unique_vertex_set.clear(); unique_vertex_set.clear();
BOOST_FOREACH(vertex_descriptor vd, current_selection_border) for(vertex_descriptor vd : current_selection_border)
BOOST_FOREACH(halfedge_descriptor hd, halfedges_around_target( halfedge(vd,fg), fg)) for(halfedge_descriptor hd : halfedges_around_target( halfedge(vd,fg), fg))
{ {
edge_descriptor ed = edge(hd, fg); edge_descriptor ed = edge(hd, fg);
if (get(is_selected, ed)){ if (get(is_selected, ed)){
@ -397,7 +396,7 @@ reduce_edge_selection(
} }
// extract unique selection // extract unique selection
BOOST_FOREACH(edge_descriptor ed, edges_to_deselect) for(edge_descriptor ed : edges_to_deselect)
{ {
*out++=ed; *out++=ed;
put( is_selected, ed, false ); put( is_selected, ed, false );
@ -446,13 +445,13 @@ expand_vertex_selection(
//collect adjacent vertices not already selected //collect adjacent vertices not already selected
std::set<vertex_descriptor> new_selection_set; std::set<vertex_descriptor> new_selection_set;
BOOST_FOREACH(vertex_descriptor vd, current_selection) for(vertex_descriptor vd : current_selection)
BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,fg), fg)) for(vertex_descriptor nvd : vertices_around_target( halfedge(vd,fg), fg))
if (!get(is_selected, nvd)) new_selection_set.insert(nvd); if (!get(is_selected, nvd)) new_selection_set.insert(nvd);
// extract unique selection // extract unique selection
std::vector<vertex_descriptor> new_selection; std::vector<vertex_descriptor> new_selection;
BOOST_FOREACH(vertex_descriptor vd, new_selection_set) for(vertex_descriptor vd : new_selection_set)
{ {
*out++=vd; *out++=vd;
new_selection.push_back(vd); new_selection.push_back(vd);
@ -496,8 +495,8 @@ reduce_vertex_selection(
// collect vertices incident to a selected one // collect vertices incident to a selected one
std::set<vertex_descriptor> unique_vertex_set; std::set<vertex_descriptor> unique_vertex_set;
BOOST_FOREACH(vertex_descriptor vd, selection) for(vertex_descriptor vd : selection)
BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,fg), fg)) for(vertex_descriptor nvd : vertices_around_target( halfedge(vd,fg), fg))
if (!get(is_selected, nvd)) unique_vertex_set.insert(nvd); if (!get(is_selected, nvd)) unique_vertex_set.insert(nvd);
std::vector<vertex_descriptor> current_selection_border(unique_vertex_set.begin(), unique_vertex_set.end()); std::vector<vertex_descriptor> current_selection_border(unique_vertex_set.begin(), unique_vertex_set.end());
@ -507,13 +506,13 @@ reduce_vertex_selection(
//collect adjacent vertices selected //collect adjacent vertices selected
std::set<vertex_descriptor> vertices_to_deselect; std::set<vertex_descriptor> vertices_to_deselect;
BOOST_FOREACH(vertex_descriptor vd, current_selection_border) for(vertex_descriptor vd : current_selection_border)
BOOST_FOREACH(vertex_descriptor nvd, vertices_around_target( halfedge(vd,fg), fg)) for(vertex_descriptor nvd : vertices_around_target( halfedge(vd,fg), fg))
if (get(is_selected, nvd)) vertices_to_deselect.insert(nvd); if (get(is_selected, nvd)) vertices_to_deselect.insert(nvd);
// extract unique selection // extract unique selection
std::vector<vertex_descriptor> new_selection_border; std::vector<vertex_descriptor> new_selection_border;
BOOST_FOREACH(vertex_descriptor vd, vertices_to_deselect) for(vertex_descriptor vd : vertices_to_deselect)
{ {
*out++=vd; *out++=vd;
new_selection_border.push_back(vd); new_selection_border.push_back(vd);
@ -557,7 +556,7 @@ void expand_face_selection_for_removal(const FaceRange& faces_to_be_deleted,
boost::unordered_set<vertex_descriptor> vertices_queue; boost::unordered_set<vertex_descriptor> vertices_queue;
// collect vertices belonging to at least a triangle that will be removed // collect vertices belonging to at least a triangle that will be removed
BOOST_FOREACH(face_descriptor fd, faces_to_be_deleted) for(face_descriptor fd : faces_to_be_deleted)
{ {
halfedge_descriptor h = halfedge(fd, tm); halfedge_descriptor h = halfedge(fd, tm);
vertices_queue.insert( target(h, tm) ); vertices_queue.insert( target(h, tm) );
@ -615,7 +614,7 @@ void expand_face_selection_for_removal(const FaceRange& faces_to_be_deleted,
if (next_around_vertex==start) if (next_around_vertex==start)
break; break;
BOOST_FOREACH(halfedge_descriptor f_hd, faces_traversed) for(halfedge_descriptor f_hd : faces_traversed)
{ {
assert(target(f_hd, tm) == vd); assert(target(f_hd, tm) == vd);
put(is_selected, face(f_hd, tm), true); put(is_selected, face(f_hd, tm), true);
@ -637,9 +636,9 @@ bool is_selection_a_topological_disk(const FaceRange& face_selection,
typedef typename boost::graph_traits<PolygonMesh>::edge_descriptor edge_descriptor; typedef typename boost::graph_traits<PolygonMesh>::edge_descriptor edge_descriptor;
boost::unordered_set<vertex_descriptor> sel_vertices; boost::unordered_set<vertex_descriptor> sel_vertices;
boost::unordered_set<edge_descriptor> sel_edges; boost::unordered_set<edge_descriptor> sel_edges;
BOOST_FOREACH(face_descriptor f, face_selection) for(face_descriptor f : face_selection)
{ {
BOOST_FOREACH(halfedge_descriptor h, halfedges_around_face(halfedge(f, pm), pm)) for(halfedge_descriptor h : halfedges_around_face(halfedge(f, pm), pm))
{ {
sel_vertices.insert(target(h, pm)); sel_vertices.insert(target(h, pm));
sel_edges.insert(edge(h,pm)); sel_edges.insert(edge(h,pm));

View File

@ -26,10 +26,10 @@
#include <map> #include <map>
#include <vector> #include <vector>
#include <utility> #include <utility>
#include <boost/foreach.hpp>
#include <boost/graph/adjacency_list.hpp> #include <boost/graph/adjacency_list.hpp>
#include <CGAL/assertions.h> #include <CGAL/assertions.h>
#include <CGAL/tags.h> #include <CGAL/tags.h>
#include <CGAL/Iterator_range.h>
namespace CGAL { namespace CGAL {
@ -158,7 +158,7 @@ void duplicate_terminal_vertices(Graph& graph,
vertex_iterator b,e; vertex_iterator b,e;
boost::tie(b,e) = vertices(graph); boost::tie(b,e) = vertices(graph);
std::vector<vertex_descriptor> V(b,e); std::vector<vertex_descriptor> V(b,e);
BOOST_FOREACH(vertex_descriptor v, V) for(vertex_descriptor v : V)
{ {
typename boost::graph_traits<OrigGraph>::vertex_descriptor orig_v = graph[v]; typename boost::graph_traits<OrigGraph>::vertex_descriptor orig_v = graph[v];
typename boost::graph_traits<Graph>::degree_size_type deg = degree(v, graph); typename boost::graph_traits<Graph>::degree_size_type deg = degree(v, graph);
@ -186,12 +186,12 @@ void duplicate_terminal_vertices(Graph& graph,
// check all vertices are of degree 1 or 2 and that the source // check all vertices are of degree 1 or 2 and that the source
// and target of each edge are different vertices with different ids // and target of each edge are different vertices with different ids
CGAL_assertion_code( CGAL_assertion_code(
BOOST_FOREACH(vertex_descriptor v, vertices(graph)){ for(vertex_descriptor v : make_range(vertices(graph))){
typename boost::graph_traits<Graph>::degree_size_type typename boost::graph_traits<Graph>::degree_size_type
n = degree(v, graph); n = degree(v, graph);
CGAL_assertion( n == 0 || n == 1 || n == 2); CGAL_assertion( n == 0 || n == 1 || n == 2);
} }
BOOST_FOREACH(edge_descriptor e, edges(graph)){ for(edge_descriptor e : make_range(edges(graph))){
vertex_descriptor v = target(e, graph); vertex_descriptor v = target(e, graph);
vertex_descriptor w = source(e, graph); vertex_descriptor w = source(e, graph);
CGAL_assertion(v != w); CGAL_assertion(v != w);
@ -267,13 +267,13 @@ split_graph_into_polylines(const Graph& graph,
typename graph_traits<G_copy>::vertex_descriptor> V2vmap; typename graph_traits<G_copy>::vertex_descriptor> V2vmap;
V2vmap v2vmap; V2vmap v2vmap;
BOOST_FOREACH(Graph_vertex_descriptor v, vertices(graph)){ for(Graph_vertex_descriptor v : make_range(vertices(graph))){
vertex_descriptor vc = add_vertex(g_copy); vertex_descriptor vc = add_vertex(g_copy);
g_copy[vc] = v; g_copy[vc] = v;
v2vmap[v] = vc; v2vmap[v] = vc;
} }
BOOST_FOREACH(Graph_edge_descriptor e, edges(graph)){ for(Graph_edge_descriptor e : make_range(edges(graph))){
Graph_vertex_descriptor vs = source(e,graph); Graph_vertex_descriptor vs = source(e,graph);
Graph_vertex_descriptor vt = target(e,graph); Graph_vertex_descriptor vt = target(e,graph);
CGAL_warning_msg(vs != vt, "ignore self loops"); CGAL_warning_msg(vs != vt, "ignore self loops");
@ -294,7 +294,7 @@ split_graph_into_polylines(const Graph& graph,
G_copy_less g_copy_less(g_copy, less); G_copy_less g_copy_less(g_copy, less);
std::set<vertex_descriptor, G_copy_less> terminal(g_copy_less); std::set<vertex_descriptor, G_copy_less> terminal(g_copy_less);
BOOST_FOREACH(vertex_descriptor v, vertices(g_copy)){ for(vertex_descriptor v : make_range(vertices(g_copy))){
typename graph_traits<G_copy>::degree_size_type n = degree(v, g_copy); typename graph_traits<G_copy>::degree_size_type n = degree(v, g_copy);
if ( n == 1 ) terminal.insert(v); if ( n == 1 ) terminal.insert(v);
if ( n ==0 ){ if ( n ==0 ){

View File

@ -14,7 +14,7 @@ halfedge_descriptor find_halfedge(double x1, double y1,
typedef typename boost::graph_traits<Mesh>::halfedge_descriptor halfedge_descriptor; typedef typename boost::graph_traits<Mesh>::halfedge_descriptor halfedge_descriptor;
VPMAP vpmap = get(CGAL::vertex_point, m); VPMAP vpmap = get(CGAL::vertex_point, m);
BOOST_FOREACH(halfedge_descriptor h, halfedges(m)) for(halfedge_descriptor h : halfedges(m))
{ {
if(get(vpmap, source(h, m)) == Point(x1,y1,0) if(get(vpmap, source(h, m)) == Point(x1,y1,0)
&& get(vpmap, target(h, m)) == Point(x2,y2,0)) && get(vpmap, target(h, m)) == Point(x2,y2,0))
@ -61,7 +61,7 @@ collapse_edge_test()
bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1; bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1;
assert(ok); assert(ok);
char found = 0; char found = 0;
BOOST_FOREACH(halfedge_descriptor it, CGAL::halfedges_around_target(v1,test_mesh)) for(halfedge_descriptor it : CGAL::halfedges_around_target(v1,test_mesh))
{ {
if(it == eno if(it == eno
|| it == eno_prime){ || it == eno_prime){
@ -90,7 +90,7 @@ collapse_edge_test()
bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1; bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1;
assert(ok); assert(ok);
char found = 0; char found = 0;
BOOST_FOREACH(halfedge_descriptor it, CGAL::halfedges_around_target(v1,test_mesh)) for(halfedge_descriptor it : CGAL::halfedges_around_target(v1,test_mesh))
{ {
if(it == eno if(it == eno
|| it == eno_prime){ || it == eno_prime){
@ -118,7 +118,7 @@ collapse_edge_test()
bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1; bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1;
assert(ok); assert(ok);
char found = 0; char found = 0;
BOOST_FOREACH(halfedge_descriptor it, CGAL::halfedges_around_target(v1,test_mesh)) for(halfedge_descriptor it : CGAL::halfedges_around_target(v1,test_mesh))
{ {
if(it == eno if(it == eno
|| it == eno_prime){ || it == eno_prime){
@ -156,7 +156,7 @@ collapse_edge_test()
bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1; bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1;
assert(ok); assert(ok);
char found = 0; char found = 0;
BOOST_FOREACH(halfedge_descriptor it, CGAL::halfedges_around_target(v1,test_mesh)) for(halfedge_descriptor it : CGAL::halfedges_around_target(v1,test_mesh))
{ {
if(it == eno if(it == eno
|| it == eno_prime || it == eno_prime
@ -197,7 +197,7 @@ collapse_edge_test()
bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1; bool ok = CGAL::Euler::collapse_edge(edge(he, test_mesh), test_mesh) == v1;
assert(ok); assert(ok);
char found = 0; char found = 0;
BOOST_FOREACH(halfedge_descriptor it, CGAL::halfedges_around_target(v1,test_mesh)) for(halfedge_descriptor it : CGAL::halfedges_around_target(v1,test_mesh))
{ {
if(it == ep) if(it == ep)
++found; ++found;

View File

@ -152,7 +152,7 @@ add_vertex_and_face_to_border_test()
assert(dist == 2); assert(dist == 2);
int blength = 0; int blength = 0;
BOOST_FOREACH(halfedge_descriptor hd, CGAL::halfedges_around_face(h1,m)){ for(halfedge_descriptor hd : CGAL::halfedges_around_face(h1,m)){
CGAL_USE(hd); CGAL_USE(hd);
blength++; blength++;
} }
@ -163,7 +163,7 @@ add_vertex_and_face_to_border_test()
assert(! CGAL::is_border(res,m)); assert(! CGAL::is_border(res,m));
assert(CGAL::is_border(opposite(res,m),m)); assert(CGAL::is_border(opposite(res,m),m));
res = opposite(res,m); res = opposite(res,m);
BOOST_FOREACH(halfedge_descriptor hd, CGAL::halfedges_around_face(res,m)){ for(halfedge_descriptor hd : CGAL::halfedges_around_face(res,m)){
CGAL_USE(hd); CGAL_USE(hd);
blength--; blength--;
} }
@ -394,8 +394,8 @@ test_swap_edges()
{ {
Graph g; Graph g;
CGAL::make_tetrahedron(pt,pt,pt,pt,g); CGAL::make_tetrahedron(pt,pt,pt,pt,g);
halfedge_descriptor h1 = *CGAL::cpp11::next(boost::begin(halfedges(g)), i); halfedge_descriptor h1 = *std::next(boost::begin(halfedges(g)), i);
halfedge_descriptor h2 = *CGAL::cpp11::next(boost::begin(halfedges(g)), j); halfedge_descriptor h2 = *std::next(boost::begin(halfedges(g)), j);
CGAL::internal::swap_edges(h1, h2, g); CGAL::internal::swap_edges(h1, h2, g);
CGAL_assertion(CGAL::is_valid_polygon_mesh(g)); CGAL_assertion(CGAL::is_valid_polygon_mesh(g));
} }

View File

@ -3,7 +3,6 @@
#include <CGAL/boost/graph/copy_face_graph.h> #include <CGAL/boost/graph/copy_face_graph.h>
#include "test_Prefix.h" #include "test_Prefix.h"
#include <boost/numeric/conversion/cast.hpp> #include <boost/numeric/conversion/cast.hpp>
#include <boost/foreach.hpp>
#include <boost/unordered_set.hpp> #include <boost/unordered_set.hpp>
#include <boost/unordered_map.hpp> #include <boost/unordered_map.hpp>
#include <CGAL/use.h> #include <CGAL/use.h>
@ -279,7 +278,7 @@ template <typename Graph>
void void
test(const std::vector<Graph>& graphs) test(const std::vector<Graph>& graphs)
{ {
BOOST_FOREACH(Graph p, graphs){ for(Graph p : graphs){
test_read(p); test_read(p);
test_vertex_iterators(p); test_vertex_iterators(p);
test_out_edges(p); test_out_edges(p);

View File

@ -28,7 +28,7 @@ int main()
std::vector<face_descriptor> faces_to_remove; std::vector<face_descriptor> faces_to_remove;
int index = 0; int index = 0;
BOOST_FOREACH(face_descriptor fh, faces(sm)) for(face_descriptor fh : faces(sm))
{ {
if(index_set.count(index)==0) if(index_set.count(index)==0)
is_selected_map[fh]=false; is_selected_map[fh]=false;
@ -47,7 +47,7 @@ int main()
boost::make_assoc_property_map(is_selected_map)); boost::make_assoc_property_map(is_selected_map));
index=0; index=0;
BOOST_FOREACH(face_descriptor fh, faces(sm)) for(face_descriptor fh : faces(sm))
{ {
if (is_selected_map[fh]) if (is_selected_map[fh])
{ {

View File

@ -1,7 +1,6 @@
#include "test_Prefix.h" #include "test_Prefix.h"
#include <boost/unordered_set.hpp> #include <boost/unordered_set.hpp>
#include <boost/foreach.hpp>
template< typename G, template< typename G,
typename ForwardRange, typename ForwardRange,
@ -80,26 +79,26 @@ main()
{ {
std::vector<Polyhedron> polys = poly_data(); std::vector<Polyhedron> polys = poly_data();
BOOST_FOREACH(Polyhedron p, polys){ for(Polyhedron p : polys){
index_uniqueness_poly(p); index_uniqueness_poly(p);
} }
std::vector<LCC> lccs = lcc_data(); std::vector<LCC> lccs = lcc_data();
BOOST_FOREACH(LCC p, lccs){ for(LCC p : lccs){
index_uniqueness_lcc(p); index_uniqueness_lcc(p);
} }
#if defined(CGAL_USE_SURFACE_MESH) #if defined(CGAL_USE_SURFACE_MESH)
std::vector<SM> sms = sm_data(); std::vector<SM> sms = sm_data();
BOOST_FOREACH(SM p, sms){ for(SM p : sms){
index_uniqueness_sm(p); index_uniqueness_sm(p);
} }
#endif #endif
#if defined(CGAL_USE_OPENMESH) #if defined(CGAL_USE_OPENMESH)
std::vector<OMesh> omeshs = omesh_data(); std::vector<OMesh> omeshs = omesh_data();
BOOST_FOREACH(OMesh p, omeshs){ for(OMesh p : omeshs){
index_uniqueness_omesh(p); index_uniqueness_omesh(p);
} }
#endif #endif

View File

@ -4,7 +4,6 @@
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <boost/foreach.hpp>
typedef CGAL::Simple_cartesian<double> Kernel; typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::Point_3 Point; typedef Kernel::Point_3 Point;
@ -30,14 +29,14 @@ int main()
assert(hd != nhd); assert(hd != nhd);
assert(hd == prev(nhd,dual)); assert(hd == prev(nhd,dual));
assert(face(nhd,dual) == fd); assert(face(nhd,dual) == fd);
BOOST_FOREACH(halfedge_descriptor lhd, halfedges_around_face(hd,dual)){ for(halfedge_descriptor lhd : halfedges_around_face(hd,dual)){
assert(face(lhd,dual) == fd); assert(face(lhd,dual) == fd);
} }
vertex_descriptor vd = *vertices(dual).first; vertex_descriptor vd = *vertices(dual).first;
assert(target(halfedge(vd,dual),dual) == vd); assert(target(halfedge(vd,dual),dual) == vd);
BOOST_FOREACH(halfedge_descriptor lhd, halfedges_around_target(halfedge(vd,dual),dual)){ for(halfedge_descriptor lhd : halfedges_around_target(halfedge(vd,dual),dual)){
assert(target(lhd,dual) == vd); assert(target(lhd,dual) == vd);
} }

View File

@ -2,7 +2,6 @@
#include <CGAL/Polyhedron_3.h> #include <CGAL/Polyhedron_3.h>
#include <CGAL/boost/graph/iterator.h> #include <CGAL/boost/graph/iterator.h>
#include <boost/foreach.hpp>
#include <boost/concept/assert.hpp> #include <boost/concept/assert.hpp>
#include <CGAL/Circulator/Circulator_concepts.h> #include <CGAL/Circulator/Circulator_concepts.h>
@ -134,7 +133,7 @@ int main(int argc, char* argv[])
} }
{ {
BOOST_FOREACH(edge_descriptor ed,out_edges(target(hd,P),P)){ for(edge_descriptor ed : out_edges(target(hd,P),P)){
halfedge_descriptor hd2 = halfedge(ed,P); halfedge_descriptor hd2 = halfedge(ed,P);
std::cout << get(CGAL::vertex_point, P, target(hd2,P)) << std::endl; std::cout << get(CGAL::vertex_point, P, target(hd2,P)) << std::endl;
} }

View File

@ -2,7 +2,6 @@
#include "test_Prefix.h" #include "test_Prefix.h"
#include <boost/numeric/conversion/cast.hpp> #include <boost/numeric/conversion/cast.hpp>
#include <boost/foreach.hpp>
#include <boost/unordered_set.hpp> #include <boost/unordered_set.hpp>
#include <CGAL/use.h> #include <CGAL/use.h>
@ -262,7 +261,7 @@ template <typename Graph>
void void
test(const std::vector<Graph>& graphs) test(const std::vector<Graph>& graphs)
{ {
BOOST_FOREACH(const Graph& p, graphs){ for(const Graph& p : graphs){
test_edge_iterators(p); test_edge_iterators(p);
test_read(p); test_read(p);
test_vertex_iterators(p); test_vertex_iterators(p);

View File

@ -10,7 +10,7 @@ typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef Kernel::FT Scalar; typedef Kernel::FT Scalar;
typedef Kernel::Point_2 Point; typedef Kernel::Point_2 Point;
typedef CGAL::cpp11::array<Scalar,2> Pair; typedef std::array<Scalar,2> Pair;
using std::cout; using std::endl; using std::string; using std::cout; using std::endl; using std::string;
@ -29,7 +29,7 @@ int main()
}; };
// Compute segment coordinates for all the defined points. // Compute segment coordinates for all the defined points.
// We use a global function and return the segment coordinates stored in an array of the type CGAL::cpp11::array<FT,2>. // We use a global function and return the segment coordinates stored in an array of the type std::array<FT,2>.
cout << endl << "Computed segment coordinates: " << endl << endl; cout << endl << "Computed segment coordinates: " << endl << endl;
for(int i = 0; i < 5; ++i) { for(int i = 0; i < 5; ++i) {
const Pair pair = BC::compute_segment_coordinates_2(first_vertex, second_vertex, query_points[i], Kernel()); const Pair pair = BC::compute_segment_coordinates_2(first_vertex, second_vertex, query_points[i], Kernel());

View File

@ -30,7 +30,7 @@ int main()
// Generate a set of random points. // Generate a set of random points.
CGAL::Random_points_in_square_2<Point,Creator> point_generator(1.0); CGAL::Random_points_in_square_2<Point,Creator> point_generator(1.0);
CGAL::cpp11::copy_n(point_generator, number_of_points, std::back_inserter(points)); std::copy_n(point_generator, number_of_points, std::back_inserter(points));
// Find the convex hull of the generated set of points. // Find the convex hull of the generated set of points.
// This convex hull gives the vertices of a convex polygon that contains all the generated points. // This convex hull gives the vertices of a convex polygon that contains all the generated points.

View File

@ -217,7 +217,7 @@ private:
*/ */
template<class Traits> template<class Traits>
inline CGAL::cpp11::array<typename Traits::FT,2> compute_segment_coordinates_2(const typename Traits::Point_2 &first_vertex, const typename Traits::Point_2 &second_vertex, const typename Traits::Point_2 &query_point, const Traits &barycentric_traits = Traits()) inline std::array<typename Traits::FT,2> compute_segment_coordinates_2(const typename Traits::Point_2 &first_vertex, const typename Traits::Point_2 &second_vertex, const typename Traits::Point_2 &query_point, const Traits &barycentric_traits = Traits())
{ {
// Some predefined functions. // Some predefined functions.
typename Traits::Compute_scalar_product_2 scalar_product_2 = barycentric_traits.compute_scalar_product_2_object(); typename Traits::Compute_scalar_product_2 scalar_product_2 = barycentric_traits.compute_scalar_product_2_object();
@ -230,7 +230,7 @@ template<class Traits>
const FT opposite_scalar_product = scalar_product_2(query_point - second_vertex, first_vertex - second_vertex); const FT opposite_scalar_product = scalar_product_2(query_point - second_vertex, first_vertex - second_vertex);
const FT b_first = opposite_scalar_product / squared_distance_2(first_vertex, second_vertex); const FT b_first = opposite_scalar_product / squared_distance_2(first_vertex, second_vertex);
// Return the CGAL::cpp11::array<FT,2> type of coordinates. // Return the std::array<FT,2> type of coordinates.
return CGAL::make_array(b_first, FT(1) - b_first); return CGAL::make_array(b_first, FT(1) - b_first);
} }

View File

@ -237,7 +237,7 @@ private:
*/ */
template<class Traits> template<class Traits>
inline CGAL::cpp11::array<typename Traits::FT,3> compute_triangle_coordinates_2(const typename Traits::Point_2 &first_vertex, const typename Traits::Point_2 &second_vertex, const typename Traits::Point_2 &third_vertex, const typename Traits::Point_2 &query_point, const Traits &barycentric_traits = Traits()) inline std::array<typename Traits::FT,3> compute_triangle_coordinates_2(const typename Traits::Point_2 &first_vertex, const typename Traits::Point_2 &second_vertex, const typename Traits::Point_2 &third_vertex, const typename Traits::Point_2 &query_point, const Traits &barycentric_traits = Traits())
{ {
// Some predefined functions. // Some predefined functions.
typename Traits::Compute_area_2 area_2 = barycentric_traits.compute_area_2_object(); typename Traits::Compute_area_2 area_2 = barycentric_traits.compute_area_2_object();
@ -256,7 +256,7 @@ template<class Traits>
const FT b_first = area_second * inverted_total_area; const FT b_first = area_second * inverted_total_area;
const FT b_second = area_third * inverted_total_area; const FT b_second = area_third * inverted_total_area;
// Return the CGAL::cpp11::array<FT,3> type of coordinates. // Return the std::array<FT,3> type of coordinates.
return CGAL::make_array(b_first, b_second, FT(1) - b_first - b_second); return CGAL::make_array(b_first, b_second, FT(1) - b_first - b_second);
} }

View File

@ -1,7 +1,7 @@
// Author: Dmitry Anisimov. // Author: Dmitry Anisimov.
// We use a simple segment of length 2 and inexact data type // We use a simple segment of length 2 and inexact data type
// in order to test coordinates computed for the center point of the segment. // in order to test coordinates computed for the center point of the segment.
// We test the function compute_segment_coordinates_2() and return CGAL::cpp11::array set of coordinates. // We test the function compute_segment_coordinates_2() and return std::array set of coordinates.
// It also works with exact kernel. // It also works with exact kernel.
@ -14,7 +14,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::FT Scalar; typedef Kernel::FT Scalar;
typedef Kernel::Point_2 Point; typedef Kernel::Point_2 Point;
typedef CGAL::cpp11::array<Scalar,2> Pair; typedef std::array<Scalar,2> Pair;
using std::cout; using std::endl; using std::string; using std::cout; using std::endl; using std::string;

View File

@ -1,7 +1,7 @@
// Author: Dmitry Anisimov. // Author: Dmitry Anisimov.
// We use a simple triangle and inexact data type // We use a simple triangle and inexact data type
// in order to test coordinates computed for the center point of the triangle. // in order to test coordinates computed for the center point of the triangle.
// We test the function compute_triangle_coordinates_2() and return CGAL::cpp11::array set of coordinates. // We test the function compute_triangle_coordinates_2() and return std::array set of coordinates.
// It also works with exact kernel. // It also works with exact kernel.
@ -14,7 +14,7 @@ typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::FT Scalar; typedef Kernel::FT Scalar;
typedef Kernel::Point_2 Point; typedef Kernel::Point_2 Point;
typedef CGAL::cpp11::array<Scalar,3> Triple; typedef std::array<Scalar,3> Triple;
using std::cout; using std::endl; using std::string; using std::cout; using std::endl; using std::string;

View File

@ -946,7 +946,7 @@ bool read_bezier ( QString aFileName, Bezier_polygon_set& rSet, Bezier_region_so
if ( bezier_polygons.size() > 1 ) if ( bezier_polygons.size() > 1 )
{ {
for ( Bezier_polygon_vector::const_iterator it = CGAL::cpp11::next(bezier_polygons.begin()) for ( Bezier_polygon_vector::const_iterator it = std::next(bezier_polygons.begin())
; it != bezier_polygons.end() ; it != bezier_polygons.end()
; ++ it ; ++ it
) )

View File

@ -7,7 +7,6 @@
#include <CGAL/random_polygon_2.h> #include <CGAL/random_polygon_2.h>
#include <iostream> #include <iostream>
#include <boost/foreach.hpp>
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef Kernel::Segment_2 Segment_2; typedef Kernel::Segment_2 Segment_2;
@ -96,7 +95,7 @@ void print_polygons(std::ostream& out, const Polygon_set_2& polygon_set)
{ {
std::vector<Polygon_with_holes_2> polygons_wh(polygon_set.number_of_polygons_with_holes()); std::vector<Polygon_with_holes_2> polygons_wh(polygon_set.number_of_polygons_with_holes());
polygon_set.polygons_with_holes(&polygons_wh[0]); polygon_set.polygons_with_holes(&polygons_wh[0]);
BOOST_FOREACH(Polygon_with_holes_2& polygon_wh, polygons_wh) for(Polygon_with_holes_2& polygon_wh : polygons_wh)
{ {
print_polygon(out, polygon_wh.outer_boundary()); print_polygon(out, polygon_wh.outer_boundary());
for(Polygon_with_holes_2::Hole_const_iterator it=polygon_wh.holes_begin(); for(Polygon_with_holes_2::Hole_const_iterator it=polygon_wh.holes_begin();
@ -125,7 +124,7 @@ int main( int argc , char ** argv )
build_segments(all_segments); build_segments(all_segments);
std::ofstream out("polygons_grid.cgal"); std::ofstream out("polygons_grid.cgal");
BOOST_FOREACH(const Segment_2& s, all_segments) for(const Segment_2& s : all_segments)
{ {
out << "2 " << s.source() << " 0" out << "2 " << s.source() << " 0"
<< " " << s.target() << " 0\n"; << " " << s.target() << " 0\n";

View File

@ -147,7 +147,7 @@ bool read_bezier(char const* aFileName, Bezier_polygon_set& rSet)
if (polygons.size() > 1) { if (polygons.size() > 1) {
Bezier_polygon_vector::const_iterator it; Bezier_polygon_vector::const_iterator it;
for (it = CGAL::cpp11::next(polygons.begin()); for (it = std::next(polygons.begin());
it != polygons.end(); ++it) it != polygons.end(); ++it)
pwh.add_hole(*it); pwh.add_hole(*it);
} }

View File

@ -46,7 +46,6 @@
#include <CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h> #include <CGAL/Boolean_set_operations_2/Ccb_curve_iterator.h>
#include <CGAL/Union_find.h> #include <CGAL/Union_find.h>
#include <boost/foreach.hpp>
/*! /*!
\file Gps_on_surface_base_2.h \file Gps_on_surface_base_2.h
@ -1093,7 +1092,7 @@ protected:
// update halfedge flag according to the flag of the twin halfedge // update halfedge flag according to the flag of the twin halfedge
// or if the outer ccb of the cc was set // or if the outer ccb of the cc was set
BOOST_FOREACH(Halfedge_handle h, halfedges_that_was_on_an_outer_ccb) for(Halfedge_handle h : halfedges_that_was_on_an_outer_ccb)
{ {
if (h->flag()!=NOT_VISITED) continue; if (h->flag()!=NOT_VISITED) continue;
std::size_t face_master_id=(*uf_faces.find(face_handles[h->face()->id()]))->id(); std::size_t face_master_id=(*uf_faces.find(face_handles[h->face()->id()]))->id();
@ -1114,7 +1113,7 @@ protected:
while(something_was_updated); while(something_was_updated);
// last loop, if some tags are not set it means that they are the only ccb // last loop, if some tags are not set it means that they are the only ccb
// of the face and that they have to be the outer ccb // of the face and that they have to be the outer ccb
BOOST_FOREACH(Halfedge_handle h, halfedges_that_was_on_an_outer_ccb) for(Halfedge_handle h : halfedges_that_was_on_an_outer_ccb)
{ {
if (h->flag()!=NOT_VISITED) continue; if (h->flag()!=NOT_VISITED) continue;
std::size_t face_master_id=(*uf_faces.find(face_handles[h->face()->id()]))->id(); std::size_t face_master_id=(*uf_faces.find(face_handles[h->face()->id()]))->id();
@ -1191,9 +1190,9 @@ protected:
} }
//collect for reuse/removal all inner and outer ccbs //collect for reuse/removal all inner and outer ccbs
BOOST_FOREACH(void* ptr, (*it)->_outer_ccbs()) for(void* ptr : (*it)->_outer_ccbs())
outer_ccbs_to_remove.push_back( static_cast<typename Aos_2::Dcel::Halfedge*>(ptr)->outer_ccb() ); outer_ccbs_to_remove.push_back( static_cast<typename Aos_2::Dcel::Halfedge*>(ptr)->outer_ccb() );
BOOST_FOREACH(void* ptr, (*it)->_inner_ccbs()) for(void* ptr : (*it)->_inner_ccbs())
inner_ccbs_to_remove.push_back( static_cast<typename Aos_2::Dcel::Halfedge*>(ptr)->inner_ccb() ); inner_ccbs_to_remove.push_back( static_cast<typename Aos_2::Dcel::Halfedge*>(ptr)->inner_ccb() );
(*it)->_outer_ccbs().clear(); (*it)->_outer_ccbs().clear();
(*it)->_inner_ccbs().clear(); (*it)->_inner_ccbs().clear();
@ -1268,9 +1267,9 @@ protected:
} }
// now set the new face for all ccbs // now set the new face for all ccbs
BOOST_FOREACH(Outer_ccb_and_face& ccb_and_face, outer_ccb_and_new_face_pairs) for(Outer_ccb_and_face& ccb_and_face : outer_ccb_and_new_face_pairs)
ccb_and_face.first->set_face(ccb_and_face.second); ccb_and_face.first->set_face(ccb_and_face.second);
BOOST_FOREACH(Inner_ccb_and_face& ccb_and_face, inner_ccb_and_new_face_pairs) for(Inner_ccb_and_face& ccb_and_face : inner_ccb_and_new_face_pairs)
ccb_and_face.first->set_face(ccb_and_face.second); ccb_and_face.first->set_face(ccb_and_face.second);
//remove no longer used edges, vertices and faces //remove no longer used edges, vertices and faces

View File

@ -21,7 +21,7 @@ void print_polygons(std::ostream& out, const Polygon_set_2& polygon_set)
{ {
std::vector<Polygon_with_holes_2> polygons_wh(polygon_set.number_of_polygons_with_holes()); std::vector<Polygon_with_holes_2> polygons_wh(polygon_set.number_of_polygons_with_holes());
polygon_set.polygons_with_holes(&polygons_wh[0]); polygon_set.polygons_with_holes(&polygons_wh[0]);
BOOST_FOREACH(Polygon_with_holes_2& polygon_wh, polygons_wh) for(Polygon_with_holes_2& polygon_wh : polygons_wh)
{ {
print_polygon(out, polygon_wh.outer_boundary()); print_polygon(out, polygon_wh.outer_boundary());
for(Polygon_with_holes_2::Hole_const_iterator it=polygon_wh.holes_begin(); for(Polygon_with_holes_2::Hole_const_iterator it=polygon_wh.holes_begin();

View File

@ -24,7 +24,7 @@ int main()
CGAL::set_pretty_mode(std::cout); CGAL::set_pretty_mode(std::cout);
Cont points; Cont points;
CGAL::cpp11::copy_n(Generator(1), n, std::back_inserter(points)); std::copy_n(Generator(1), n, std::back_inserter(points));
std::cout << "Generated Point Set:\n"; std::cout << "Generated Point Set:\n";
std::copy(points.begin(), points.end(), cout_ip); std::copy(points.begin(), points.end(), cout_ip);

View File

@ -152,11 +152,11 @@ namespace CGAL {
CGAL_APPEL_ASSERT(d==2); CGAL_APPEL_ASSERT(d==2);
// write matrix M' as [ a, b; b, c ]: // write matrix M' as [ a, b; b, c ]:
const CGAL::cpp11::array<double, 3> matrix = {{ E->matrix(0, 0), // a const std::array<double, 3> matrix = {{ E->matrix(0, 0), // a
E->matrix(0, 1), // b E->matrix(0, 1), // b
E->matrix(1, 1) }}; // c E->matrix(1, 1) }}; // c
CGAL::cpp11::array<double, 4> eigenvectors; // Note: not neces. normalized. std::array<double, 4> eigenvectors; // Note: not neces. normalized.
CGAL::cpp11::array<double, 2> eigenvalues; // Note: sorted ascendent. std::array<double, 2> eigenvalues; // Note: sorted ascendent.
CGAL::Default_diagonalize_traits<double, 2>::diagonalize_selfadjoint_covariance_matrix CGAL::Default_diagonalize_traits<double, 2>::diagonalize_selfadjoint_covariance_matrix
(matrix, eigenvalues, eigenvectors); (matrix, eigenvalues, eigenvectors);
@ -191,15 +191,15 @@ namespace CGAL {
// M' = [ b d e ] // M' = [ b d e ]
// [ c e f ] // [ c e f ]
// //
const CGAL::cpp11::array<double, 6> matrix = {{ E->matrix(0, 0), // a const std::array<double, 6> matrix = {{ E->matrix(0, 0), // a
E->matrix(0, 1), // b E->matrix(0, 1), // b
E->matrix(0, 2), // c E->matrix(0, 2), // c
E->matrix(1, 1), // d E->matrix(1, 1), // d
E->matrix(1, 2), // e E->matrix(1, 2), // e
E->matrix(2, 2) }}; // f E->matrix(2, 2) }}; // f
CGAL::cpp11::array<double, 9> eigenvectors; // Note: not necessarily normalized. std::array<double, 9> eigenvectors; // Note: not necessarily normalized.
CGAL::cpp11::array<double, 3> eigenvalues; // Note: sorted ascendent. std::array<double, 3> eigenvalues; // Note: sorted ascendent.
CGAL::Default_diagonalize_traits<double, 3>::diagonalize_selfadjoint_covariance_matrix CGAL::Default_diagonalize_traits<double, 3>::diagonalize_selfadjoint_covariance_matrix
(matrix, eigenvalues, eigenvectors); (matrix, eigenvalues, eigenvectors);

View File

@ -175,7 +175,7 @@ main(int argc, char* argv[])
cerr << "random seed is " << random_seed << endl; cerr << "random seed is " << random_seed << endl;
#endif // CGAL_PCENTER_NO_OUTPUT #endif // CGAL_PCENTER_NO_OUTPUT
PCont input_points; PCont input_points;
CGAL::cpp11::copy_n(Point_generator(1, rnd), std::copy_n(Point_generator(1, rnd),
number_of_points, number_of_points,
back_inserter(input_points)); back_inserter(input_points));

View File

@ -198,7 +198,7 @@ main(int argc, char* argv[])
// generate a random cluster of size number_of_points: // generate a random cluster of size number_of_points:
PCont input_points; PCont input_points;
CGAL::cpp11::copy_n(ptgen, std::copy_n(ptgen,
number_of_points, number_of_points,
back_inserter(input_points)); back_inserter(input_points));

View File

@ -45,16 +45,8 @@
#include <cmath> #include <cmath>
#include <limits> #include <limits>
#if !defined CGAL_CFG_NO_CPP0X_ISFINITE #define CGAL_CORE_finite(x) std::isfinite(x)
#define CGAL_CORE_finite(x) std::isfinite(x) #define CGAL_CORE_ilogb(x) ilogb(x)
#define CGAL_CORE_ilogb(x) ilogb(x)
#elif defined (_MSC_VER) || defined (__MINGW32__) // add support for MinGW
#define CGAL_CORE_finite(x) _finite(x)
#define CGAL_CORE_ilogb(x) (int)_logb(x)
#else
#define CGAL_CORE_finite(x) finite(x)
#define CGAL_CORE_ilogb(x) ilogb(x)
#endif
#if defined(sun) || defined(__sun) #if defined(sun) || defined(__sun)
#include <ieeefp.h> #include <ieeefp.h>

View File

@ -479,7 +479,7 @@ Image_3::labellized_trilinear_interpolation
const int i2 = i1 + 1; const int i2 = i1 + 1;
const int j2 = j1 + 1; const int j2 = j1 + 1;
CGAL::cpp11::array<std::size_t,8> index; std::array<std::size_t,8> index;
index[0] = (i1 * dimy + j1) * dimx + k1; index[0] = (i1 * dimy + j1) * dimx + k1;
index[1] = index[0] + 1; index[1] = index[0] + 1;
index[2] = (i1 * dimy + j2) * dimx + k1; index[2] = (i1 * dimy + j2) * dimx + k1;
@ -489,7 +489,7 @@ Image_3::labellized_trilinear_interpolation
index[6] = (i2 * dimy + j2) * dimx + k1; index[6] = (i2 * dimy + j2) * dimx + k1;
index[7] = index[6] + 1; index[7] = index[6] + 1;
CGAL::cpp11::array<Image_word_type,8> labels; std::array<Image_word_type,8> labels;
labels[0] = ((Image_word_type*)image()->data)[index[0]]; labels[0] = ((Image_word_type*)image()->data)[index[0]];
int lc = 1; int lc = 1;

View File

@ -96,11 +96,11 @@ void ArrPolyIpelet::protected_run(int fn){
for (std::list<Circular_arc_2>::iterator it=arc_list.begin();it!=arc_list.end();++it) for (std::list<Circular_arc_2>::iterator it=arc_list.begin();it!=arc_list.end();++it)
input_curves.push_back( input_curves.push_back(
Curve_2( CGAL::cpp11::get<0>(*it).center(), Curve_2( std::get<0>(*it).center(),
sqrt(CGAL::to_double(CGAL::cpp11::get<0>(*it).squared_radius())), sqrt(CGAL::to_double(std::get<0>(*it).squared_radius())),
CGAL::cpp11::get<3>(*it), std::get<3>(*it),
Traits::Point_2(CGAL::cpp11::get<1>(*it).x(),CGAL::cpp11::get<1>(*it).y()), Traits::Point_2(std::get<1>(*it).x(),std::get<1>(*it).y()),
Traits::Point_2(CGAL::cpp11::get<2>(*it).x(),CGAL::cpp11::get<2>(*it).y()) Traits::Point_2(std::get<2>(*it).x(),std::get<2>(*it).y())
) )
); );

View File

@ -128,7 +128,7 @@ void generator::protected_run(int fn)
switch(fn){ switch(fn){
case 0:{//random point in a circle case 0:{//random point in a circle
CGAL::Random_points_in_disc_2<Point_2,Creator> gs( size); CGAL::Random_points_in_disc_2<Point_2,Creator> gs( size);
CGAL::cpp11::copy_n( gs, nbelements, std::back_inserter(points)); std::copy_n( gs, nbelements, std::back_inserter(points));
} }
break; break;
@ -139,7 +139,7 @@ void generator::protected_run(int fn)
case 6: case 6:
case 2://points in a square : side = case 2://points in a square : side =
{CGAL::Random_points_in_square_2<Point_2, Creator> gc (size); {CGAL::Random_points_in_square_2<Point_2, Creator> gc (size);
CGAL::cpp11::copy_n( gc, nbelements, std::back_inserter(points)); std::copy_n( gc, nbelements, std::back_inserter(points));
} }
break; break;
@ -166,7 +166,7 @@ void generator::protected_run(int fn)
typedef CGAL::Creator_uniform_2< Point_2, Segment_2> Seg_creator; typedef CGAL::Creator_uniform_2< Point_2, Segment_2> Seg_creator;
typedef CGAL::Join_input_iterator_2< P1, P2, Seg_creator> Seg_iterator; typedef CGAL::Join_input_iterator_2< P1, P2, Seg_creator> Seg_iterator;
Seg_iterator g( p1, p2); Seg_iterator g( p1, p2);
CGAL::cpp11::copy_n( g, nbelements, std::back_inserter(segments) ); std::copy_n( g, nbelements, std::back_inserter(segments) );
break; break;
}; };

View File

@ -67,7 +67,7 @@ namespace CGAL{
typedef typename CGAL::Polygon_2<Kernel> Polygon_2; typedef typename CGAL::Polygon_2<Kernel> Polygon_2;
typedef typename Kernel::Circle_2 Circle_2; typedef typename Kernel::Circle_2 Circle_2;
typedef CGAL::cpp11::tuple<Circle_2,Point_2,Point_2,CGAL::Sign> Circular_arc_2; typedef std::tuple<Circle_2,Point_2,Point_2,CGAL::Sign> Circular_arc_2;
Ipelet_base(const std::string NameS,const std::string SubLabS[],const std::string HMsgS[]) Ipelet_base(const std::string NameS,const std::string SubLabS[],const std::string HMsgS[])
@ -411,15 +411,15 @@ public:
draw_in_ipe(const Circular_arc_2& arc,bool deselect_all=false) const draw_in_ipe(const Circular_arc_2& arc,bool deselect_all=false) const
{ {
IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath; IpeSegmentSubPath* SSP_ipe = new IpeSegmentSubPath;
IpeVector ipeS=IpeVector( CGAL::to_double(CGAL::cpp11::get<1>(arc).x()), IpeVector ipeS=IpeVector( CGAL::to_double(std::get<1>(arc).x()),
CGAL::to_double(CGAL::cpp11::get<1>(arc).y()));//convert ot ipe format CGAL::to_double(std::get<1>(arc).y()));//convert ot ipe format
IpeVector ipeT=IpeVector( CGAL::to_double(CGAL::cpp11::get<2>(arc).x()), IpeVector ipeT=IpeVector( CGAL::to_double(std::get<2>(arc).x()),
CGAL::to_double(CGAL::cpp11::get<2>(arc).y()));//convert ot ipe format CGAL::to_double(std::get<2>(arc).y()));//convert ot ipe format
SSP_ipe->AppendArc(IpeMatrix(sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())),0, SSP_ipe->AppendArc(IpeMatrix(sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())),0,
0,(CGAL::cpp11::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)* 0,(std::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)*
sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())), sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())),
CGAL::to_double(CGAL::cpp11::get<0>(arc).center().x()), CGAL::to_double(std::get<0>(arc).center().x()),
CGAL::to_double(CGAL::cpp11::get<0>(arc).center().y())), CGAL::to_double(std::get<0>(arc).center().y())),
ipeS,ipeT); ipeS,ipeT);
IpePath* obj_ipe = new IpePath(_helper->Attributes()); IpePath* obj_ipe = new IpePath(_helper->Attributes());
obj_ipe->AddSubPath(SSP_ipe); obj_ipe->AddSubPath(SSP_ipe);
@ -482,17 +482,17 @@ public:
draw_in_ipe(const Circular_arc_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const draw_in_ipe(const Circular_arc_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const
{ {
std::vector<Circular_arc_2> arc_list; std::vector<Circular_arc_2> arc_list;
const Circle_2& circle=CGAL::cpp11::get<0>(object); const Circle_2& circle=std::get<0>(object);
restrict_circle_to_bbox(circle,bbox,std::back_inserter(arc_list)); restrict_circle_to_bbox(circle,bbox,std::back_inserter(arc_list));
if (arc_list.empty() && bbox.has_on_bounded_side(circle.center()) ){ if (arc_list.empty() && bbox.has_on_bounded_side(circle.center()) ){
draw_in_ipe(object,deselect_all); draw_in_ipe(object,deselect_all);
return; return;
} }
const Point_2* source=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)? const Point_2* source=(std::get<3>(object)==CGAL::COUNTERCLOCKWISE)?
&CGAL::cpp11::get<1>(object):&CGAL::cpp11::get<2>(object); &std::get<1>(object):&std::get<2>(object);
const Point_2* target=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)? const Point_2* target=(std::get<3>(object)==CGAL::COUNTERCLOCKWISE)?
&CGAL::cpp11::get<2>(object):&CGAL::cpp11::get<1>(object); &std::get<2>(object):&std::get<1>(object);
std::multimap<double,std::pair<Type_circ_arc,const Point_2*> > map_theta; std::multimap<double,std::pair<Type_circ_arc,const Point_2*> > map_theta;
typedef typename std::multimap<double,std::pair<Type_circ_arc,const Point_2*> >::iterator Map_theta_iterator; typedef typename std::multimap<double,std::pair<Type_circ_arc,const Point_2*> >::iterator Map_theta_iterator;
Map_theta_iterator s_it=map_theta.insert( Map_theta_iterator s_it=map_theta.insert(
@ -501,10 +501,10 @@ public:
std::make_pair(get_theta(*target,circle),std::make_pair(OTRG,target))); std::make_pair(get_theta(*target,circle),std::make_pair(OTRG,target)));
for (typename std::vector<Circular_arc_2>::iterator it_arc=arc_list.begin();it_arc!=arc_list.end();++it_arc){ for (typename std::vector<Circular_arc_2>::iterator it_arc=arc_list.begin();it_arc!=arc_list.end();++it_arc){
const Point_2* arc_s=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)? const Point_2* arc_s=(std::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)?
&CGAL::cpp11::get<1>(*it_arc):&CGAL::cpp11::get<2>(*it_arc); &std::get<1>(*it_arc):&std::get<2>(*it_arc);
const Point_2* arc_t=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)? const Point_2* arc_t=(std::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)?
&CGAL::cpp11::get<2>(*it_arc):&CGAL::cpp11::get<1>(*it_arc); &std::get<2>(*it_arc):&std::get<1>(*it_arc);
map_theta.insert( std::make_pair(get_theta(*arc_s,circle),std::make_pair(SRC,arc_s) ) ); map_theta.insert( std::make_pair(get_theta(*arc_s,circle),std::make_pair(SRC,arc_s) ) );
map_theta.insert( std::make_pair(get_theta(*arc_t,circle),std::make_pair(TRG,arc_t) ) ); map_theta.insert( std::make_pair(get_theta(*arc_t,circle),std::make_pair(TRG,arc_t) ) );
} }
@ -773,9 +773,9 @@ public:
Circle_2 approx_circle=conv(exact_circle); Circle_2 approx_circle=conv(exact_circle);
if (!sign_known){ if (!sign_known){
CGAL::Sign sign = (CGAL::orientation(sd,td,center)==CGAL::LEFT_TURN)?CGAL::POSITIVE:CGAL::NEGATIVE; CGAL::Sign sign = (CGAL::orientation(sd,td,center)==CGAL::LEFT_TURN)?CGAL::POSITIVE:CGAL::NEGATIVE;
return CGAL::cpp11::make_tuple(approx_circle,sd,td,sign); return std::make_tuple(approx_circle,sd,td,sign);
} }
return CGAL::cpp11::make_tuple(approx_circle,sd,td,CGAL::POSITIVE); return std::make_tuple(approx_circle,sd,td,CGAL::POSITIVE);
} }
void void

View File

@ -103,7 +103,7 @@ namespace CGAL{
typedef CGAL::Polygon_2<Kernel> Polygon_2; typedef CGAL::Polygon_2<Kernel> Polygon_2;
typedef typename Kernel::Circle_2 Circle_2; typedef typename Kernel::Circle_2 Circle_2;
typedef CGAL::cpp11::tuple<Circle_2,Point_2,Point_2,CGAL::Sign> Circular_arc_2; typedef std::tuple<Circle_2,Point_2,Point_2,CGAL::Sign> Circular_arc_2;
Ipelet_base(const std::string NameS,const std::string SubLabS[],const std::string HMsgS[]) Ipelet_base(const std::string NameS,const std::string SubLabS[],const std::string HMsgS[])
@ -422,15 +422,15 @@ public:
draw_in_ipe(const Circular_arc_2& arc,bool deselect_all=false) const draw_in_ipe(const Circular_arc_2& arc,bool deselect_all=false) const
{ {
ipe::Curve* SSP_ipe = new ipe::Curve; ipe::Curve* SSP_ipe = new ipe::Curve;
ipe::Vector ipeS=ipe::Vector( CGAL::to_double(CGAL::cpp11::get<1>(arc).x()), ipe::Vector ipeS=ipe::Vector( CGAL::to_double(std::get<1>(arc).x()),
CGAL::to_double(CGAL::cpp11::get<1>(arc).y()));//convert ot ipe format CGAL::to_double(std::get<1>(arc).y()));//convert ot ipe format
ipe::Vector ipeT=ipe::Vector( CGAL::to_double(CGAL::cpp11::get<2>(arc).x()), ipe::Vector ipeT=ipe::Vector( CGAL::to_double(std::get<2>(arc).x()),
CGAL::to_double(CGAL::cpp11::get<2>(arc).y()));//convert ot ipe format CGAL::to_double(std::get<2>(arc).y()));//convert ot ipe format
SSP_ipe->appendArc(ipe::Matrix(sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())),0, SSP_ipe->appendArc(ipe::Matrix(sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())),0,
0,(CGAL::cpp11::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)* 0,(std::get<3>(arc)==CGAL::COUNTERCLOCKWISE?1:-1)*
sqrt(CGAL::to_double(CGAL::cpp11::get<0>(arc).squared_radius())), sqrt(CGAL::to_double(std::get<0>(arc).squared_radius())),
CGAL::to_double(CGAL::cpp11::get<0>(arc).center().x()), CGAL::to_double(std::get<0>(arc).center().x()),
CGAL::to_double(CGAL::cpp11::get<0>(arc).center().y())), CGAL::to_double(std::get<0>(arc).center().y())),
ipeS,ipeT); ipeS,ipeT);
ipe::Shape shape; ipe::Shape shape;
shape.appendSubPath(SSP_ipe); shape.appendSubPath(SSP_ipe);
@ -490,17 +490,17 @@ public:
draw_in_ipe(const Circular_arc_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const draw_in_ipe(const Circular_arc_2& object,const Iso_rectangle_2& bbox,bool deselect_all=false) const
{ {
std::vector<Circular_arc_2> arc_list; std::vector<Circular_arc_2> arc_list;
const Circle_2& circle=CGAL::cpp11::get<0>(object); const Circle_2& circle=std::get<0>(object);
restrict_circle_to_bbox(circle,bbox,std::back_inserter(arc_list)); restrict_circle_to_bbox(circle,bbox,std::back_inserter(arc_list));
if (arc_list.empty() && bbox.has_on_bounded_side(circle.center()) ){ if (arc_list.empty() && bbox.has_on_bounded_side(circle.center()) ){
draw_in_ipe(object,deselect_all); draw_in_ipe(object,deselect_all);
return; return;
} }
const Point_2* source=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)? const Point_2* source=(std::get<3>(object)==CGAL::COUNTERCLOCKWISE)?
&CGAL::cpp11::get<1>(object):&CGAL::cpp11::get<2>(object); &std::get<1>(object):&std::get<2>(object);
const Point_2* target=(CGAL::cpp11::get<3>(object)==CGAL::COUNTERCLOCKWISE)? const Point_2* target=(std::get<3>(object)==CGAL::COUNTERCLOCKWISE)?
&CGAL::cpp11::get<2>(object):&CGAL::cpp11::get<1>(object); &std::get<2>(object):&std::get<1>(object);
std::multimap<double,std::pair<Type_circ_arc,const Point_2*> > map_theta; std::multimap<double,std::pair<Type_circ_arc,const Point_2*> > map_theta;
typedef typename std::multimap<double,std::pair<Type_circ_arc,const Point_2*> >::iterator Map_theta_iterator; typedef typename std::multimap<double,std::pair<Type_circ_arc,const Point_2*> >::iterator Map_theta_iterator;
Map_theta_iterator s_it=map_theta.insert( Map_theta_iterator s_it=map_theta.insert(
@ -510,10 +510,10 @@ public:
std::make_pair(get_theta(*target,circle),std::make_pair(OTRG,target))); std::make_pair(get_theta(*target,circle),std::make_pair(OTRG,target)));
for (typename std::vector<Circular_arc_2>::iterator it_arc=arc_list.begin();it_arc!=arc_list.end();++it_arc){ for (typename std::vector<Circular_arc_2>::iterator it_arc=arc_list.begin();it_arc!=arc_list.end();++it_arc){
const Point_2* arc_s=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)? const Point_2* arc_s=(std::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)?
&CGAL::cpp11::get<1>(*it_arc):&CGAL::cpp11::get<2>(*it_arc); &std::get<1>(*it_arc):&std::get<2>(*it_arc);
const Point_2* arc_t=(CGAL::cpp11::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)? const Point_2* arc_t=(std::get<3>(*it_arc)==CGAL::COUNTERCLOCKWISE)?
&CGAL::cpp11::get<2>(*it_arc):&CGAL::cpp11::get<1>(*it_arc); &std::get<2>(*it_arc):&std::get<1>(*it_arc);
map_theta.insert( std::make_pair(get_theta(*arc_s,circle),std::make_pair(SRC,arc_s) ) ); map_theta.insert( std::make_pair(get_theta(*arc_s,circle),std::make_pair(SRC,arc_s) ) );
map_theta.insert( std::make_pair(get_theta(*arc_t,circle),std::make_pair(TRG,arc_t) ) ); map_theta.insert( std::make_pair(get_theta(*arc_t,circle),std::make_pair(TRG,arc_t) ) );
} }
@ -779,9 +779,9 @@ public:
Circle_2 approx_circle=conv(exact_circle); Circle_2 approx_circle=conv(exact_circle);
if (!sign_known){ if (!sign_known){
CGAL::Sign sign = (CGAL::orientation(sd,td,center)==CGAL::LEFT_TURN)?CGAL::POSITIVE:CGAL::NEGATIVE; CGAL::Sign sign = (CGAL::orientation(sd,td,center)==CGAL::LEFT_TURN)?CGAL::POSITIVE:CGAL::NEGATIVE;
return CGAL::cpp11::make_tuple(approx_circle,sd,td,sign); return std::make_tuple(approx_circle,sd,td,sign);
} }
return CGAL::cpp11::make_tuple(approx_circle,sd,td,CGAL::POSITIVE); return std::make_tuple(approx_circle,sd,td,CGAL::POSITIVE);
} }
void void

View File

@ -143,8 +143,8 @@ struct Cartesian_base
typedef Aff_transformationC3<Kernel> Aff_transformation_3; typedef Aff_transformationC3<Kernel> Aff_transformation_3;
typedef Weighted_pointC3<Kernel> Weighted_point_3; typedef Weighted_pointC3<Kernel> Weighted_point_3;
typedef typename cpp11::array<FT_, 2>::const_iterator Cartesian_const_iterator_2; typedef typename std::array<FT_, 2>::const_iterator Cartesian_const_iterator_2;
typedef typename cpp11::array<FT_, 3>::const_iterator Cartesian_const_iterator_3; typedef typename std::array<FT_, 3>::const_iterator Cartesian_const_iterator_3;
// Undocumented stuff. // Undocumented stuff.
typedef Data_accessorC2<Kernel> Data_accessor_2; typedef Data_accessorC2<Kernel> Data_accessor_2;

View File

@ -44,7 +44,7 @@ class DirectionC2
typedef typename R_::Segment_2 Segment_2; typedef typename R_::Segment_2 Segment_2;
typedef typename R_::Direction_2 Direction_2; typedef typename R_::Direction_2 Direction_2;
typedef cpp11::array<FT, 2> Rep; typedef std::array<FT, 2> Rep;
typedef typename R_::template Handle<Rep>::type Base; typedef typename R_::template Handle<Rep>::type Base;
Base base; Base base;

View File

@ -42,7 +42,7 @@ class DirectionC3
typedef typename R_::Segment_3 Segment_3; typedef typename R_::Segment_3 Segment_3;
typedef typename R_::Direction_3 Direction_3; typedef typename R_::Direction_3 Direction_3;
typedef cpp11::array<FT, 3> Rep; typedef std::array<FT, 3> Rep;
typedef typename R_::template Handle<Rep>::type Base; typedef typename R_::template Handle<Rep>::type Base;
Base base; Base base;

View File

@ -41,7 +41,7 @@ class Iso_cuboidC3
typedef typename R_::Aff_transformation_3 Aff_transformation_3; typedef typename R_::Aff_transformation_3 Aff_transformation_3;
typedef typename R_::Construct_point_3 Construct_point_3; typedef typename R_::Construct_point_3 Construct_point_3;
typedef cpp11::array<Point_3, 2> Rep; typedef std::array<Point_3, 2> Rep;
typedef typename R_::template Handle<Rep>::type Base; typedef typename R_::template Handle<Rep>::type Base;
Base base; Base base;

View File

@ -38,7 +38,7 @@ class Iso_rectangleC2
typedef typename R_::Iso_rectangle_2 Iso_rectangle_2; typedef typename R_::Iso_rectangle_2 Iso_rectangle_2;
typedef typename R_::Construct_point_2 Construct_point_2; typedef typename R_::Construct_point_2 Construct_point_2;
typedef cpp11::array<Point_2, 2> Rep; typedef std::array<Point_2, 2> Rep;
typedef typename R_::template Handle<Rep>::type Base; typedef typename R_::template Handle<Rep>::type Base;
Base base; Base base;

View File

@ -43,7 +43,7 @@ class LineC2
typedef typename R_::Segment_2 Segment_2; typedef typename R_::Segment_2 Segment_2;
typedef typename R_::Line_2 Line_2; typedef typename R_::Line_2 Line_2;
typedef cpp11::array<FT, 3> Rep; typedef std::array<FT, 3> Rep;
typedef typename R_::template Handle<Rep>::type Base; typedef typename R_::template Handle<Rep>::type Base;
Base base; Base base;

View File

@ -49,7 +49,7 @@ class PlaneC3
typedef typename R_::Construct_point_3 Construct_point_3; typedef typename R_::Construct_point_3 Construct_point_3;
typedef typename R_::Construct_point_2 Construct_point_2; typedef typename R_::Construct_point_2 Construct_point_2;
typedef cpp11::array<FT, 4> Rep; typedef std::array<FT, 4> Rep;
typedef typename R_::template Handle<Rep>::type Base; typedef typename R_::template Handle<Rep>::type Base;
Base base; Base base;

View File

@ -37,7 +37,7 @@ class RayC2
typedef typename R_::Point_2 Point_2; typedef typename R_::Point_2 Point_2;
typedef typename R_::Ray_2 Ray_2; typedef typename R_::Ray_2 Ray_2;
typedef cpp11::array<Point_2, 2> Rep; typedef std::array<Point_2, 2> Rep;
typedef typename R_::template Handle<Rep>::type Base; typedef typename R_::template Handle<Rep>::type Base;
Base base; Base base;

View File

@ -41,7 +41,7 @@ class RayC3
typedef typename R_::Line_3 Line_3; typedef typename R_::Line_3 Line_3;
typedef typename R_::Ray_3 Ray_3; typedef typename R_::Ray_3 Ray_3;
typedef cpp11::array<Point_3, 2> Rep; typedef std::array<Point_3, 2> Rep;
typedef typename R_::template Handle<Rep>::type Base; typedef typename R_::template Handle<Rep>::type Base;
Base base; Base base;

View File

@ -36,7 +36,7 @@ class SegmentC2
typedef typename R_::Point_2 Point_2; typedef typename R_::Point_2 Point_2;
typedef typename R_::Segment_2 Segment_2; typedef typename R_::Segment_2 Segment_2;
typedef cpp11::array<Point_2, 2> Rep; typedef std::array<Point_2, 2> Rep;
typedef typename R_::template Handle<Rep>::type Base; typedef typename R_::template Handle<Rep>::type Base;
Base base; Base base;

View File

@ -40,7 +40,7 @@ class SegmentC3
typedef typename R_::Line_3 Line_3; typedef typename R_::Line_3 Line_3;
typedef typename R_::Segment_3 Segment_3; typedef typename R_::Segment_3 Segment_3;
typedef cpp11::array<Point_3, 2> Rep; typedef std::array<Point_3, 2> Rep;
typedef typename R_::template Handle<Rep>::type Base; typedef typename R_::template Handle<Rep>::type Base;
Base base; Base base;

View File

@ -42,7 +42,7 @@ class TetrahedronC3
typedef typename R_::Plane_3 Plane_3; typedef typename R_::Plane_3 Plane_3;
typedef typename R_::Tetrahedron_3 Tetrahedron_3; typedef typename R_::Tetrahedron_3 Tetrahedron_3;
typedef cpp11::array<Point_3, 4> Rep; typedef std::array<Point_3, 4> Rep;
typedef typename R_::template Handle<Rep>::type Base; typedef typename R_::template Handle<Rep>::type Base;
Base base; Base base;

Some files were not shown because too many files have changed in this diff Show More