cosmetic changes

This commit is contained in:
Laurent Rineau 2018-04-17 16:42:25 +02:00
parent 00ebc78c1d
commit 095c27e2be
21 changed files with 82 additions and 83 deletions

View File

@ -916,7 +916,7 @@ protected:
typedef typename Allocator_traits::template rebind_alloc<Outer_ccb> Outer_ccb_allocator; typedef typename Allocator_traits::template rebind_alloc<Outer_ccb> Outer_ccb_allocator;
typedef typename Allocator_traits::template rebind_alloc<Inner_ccb> Inner_ccb_allocator; typedef typename Allocator_traits::template rebind_alloc<Inner_ccb> Inner_ccb_allocator;
typedef typename Allocator_traits::template rebind_alloc<Isolated_vertex> Iso_vert_allocator; typedef typename Allocator_traits::template rebind_alloc<Isolated_vertex> Iso_vert_allocator;
#else #else // not CGAL_CXX11
// Vertex allocator. // Vertex allocator.
typedef typename Allocator::template rebind<Vertex> Vertex_alloc_rebind; typedef typename Allocator::template rebind<Vertex> Vertex_alloc_rebind;
typedef typename Vertex_alloc_rebind::other Vertex_allocator; typedef typename Vertex_alloc_rebind::other Vertex_allocator;
@ -941,7 +941,7 @@ protected:
typedef typename Allocator::template rebind<Isolated_vertex> typedef typename Allocator::template rebind<Isolated_vertex>
Iso_vert_alloc_rebind; Iso_vert_alloc_rebind;
typedef typename Iso_vert_alloc_rebind::other Iso_vert_allocator; typedef typename Iso_vert_alloc_rebind::other Iso_vert_allocator;
#endif #endif // not CGAL_CXX11
public: public:
typedef typename Halfedge_list::size_type Size; typedef typename Halfedge_list::size_type Size;
@ -1091,7 +1091,7 @@ public:
Vertex* v = vertex_alloc.allocate(1); Vertex* v = vertex_alloc.allocate(1);
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
std::allocator_traits<Vertex_allocator>::construct(vertex_alloc,v); std::allocator_traits<Vertex_allocator>::construct(vertex_alloc,v);
#else #else
vertex_alloc.construct(v, Vertex()); vertex_alloc.construct(v, Vertex());
#endif #endif
vertices.push_back(*v); vertices.push_back(*v);
@ -1120,7 +1120,7 @@ public:
std::allocator_traits<Face_allocator>::construct(face_alloc, f); std::allocator_traits<Face_allocator>::construct(face_alloc, f);
#else #else
face_alloc.construct(f, Face()); face_alloc.construct(f, Face());
#endif #endif
faces.push_back (*f); faces.push_back (*f);
return(f); return(f);
} }
@ -1133,7 +1133,7 @@ public:
std::allocator_traits<Outer_ccb_allocator>::construct(out_ccb_alloc, oc); std::allocator_traits<Outer_ccb_allocator>::construct(out_ccb_alloc, oc);
#else #else
out_ccb_alloc.construct(oc, Outer_ccb()); out_ccb_alloc.construct(oc, Outer_ccb());
#endif #endif
out_ccbs.push_back(*oc); out_ccbs.push_back(*oc);
return (oc); return (oc);
} }
@ -1146,7 +1146,7 @@ public:
std::allocator_traits<Inner_ccb_allocator>::construct(in_ccb_alloc, ic); std::allocator_traits<Inner_ccb_allocator>::construct(in_ccb_alloc, ic);
#else #else
in_ccb_alloc.construct(ic, Inner_ccb()); in_ccb_alloc.construct(ic, Inner_ccb());
#endif #endif
in_ccbs.push_back(*ic); in_ccbs.push_back(*ic);
return (ic); return (ic);
} }

View File

@ -1557,7 +1557,7 @@ protected:
{ {
Point_2* p_pt = m_points_alloc.allocate(1); Point_2* p_pt = m_points_alloc.allocate(1);
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
std::allocator_traits<Points_alloc>::construct(m_points_alloc, p_pt, pt); std::allocator_traits<Points_alloc>::construct(m_points_alloc, p_pt, pt);
#else #else
m_points_alloc.construct(p_pt, pt); m_points_alloc.construct(p_pt, pt);
#endif #endif
@ -1570,7 +1570,7 @@ protected:
Point_2* p_pt = &pt; Point_2* p_pt = &pt;
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
std::allocator_traits<Points_alloc>::destroy(m_points_alloc, p_pt); std::allocator_traits<Points_alloc>::destroy(m_points_alloc, p_pt);
#else #else
m_points_alloc.destroy(p_pt); m_points_alloc.destroy(p_pt);
#endif #endif
m_points_alloc.deallocate(p_pt, 1); m_points_alloc.deallocate(p_pt, 1);
@ -1582,7 +1582,7 @@ protected:
X_monotone_curve_2* p_cv = m_curves_alloc.allocate(1); X_monotone_curve_2* p_cv = m_curves_alloc.allocate(1);
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
std::allocator_traits<Curves_alloc>::construct(m_curves_alloc, p_cv, cv); std::allocator_traits<Curves_alloc>::construct(m_curves_alloc, p_cv, cv);
#else #else
m_curves_alloc.construct(p_cv, cv); m_curves_alloc.construct(p_cv, cv);
#endif #endif
return (p_cv); return (p_cv);

View File

@ -67,10 +67,9 @@ namespace CGAL {
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
typedef std::allocator_traits<Alloc_> Allocator_traits; typedef std::allocator_traits<Alloc_> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator; typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator;
#else #else // not CGAL_CXX11
typedef typename Alloc_::template rebind<Dart>::other Dart_allocator; typedef typename Alloc_::template rebind<Dart>::other Dart_allocator;
#endif #endif // not CGAL_CXX11
typedef Compact_container<Dart, Dart_allocator> Dart_container; typedef Compact_container<Dart, Dart_allocator> Dart_container;
typedef typename Dart_container::iterator Dart_handle; typedef typename Dart_container::iterator Dart_handle;

View File

@ -439,7 +439,7 @@ namespace CGAL
typedef typename Allocator_traits::template rebind_alloc<T> Attr_allocator; typedef typename Allocator_traits::template rebind_alloc<T> Attr_allocator;
#else #else
typedef typename CMap::Alloc::template rebind<T>::other Attr_allocator; typedef typename CMap::Alloc::template rebind<T>::other Attr_allocator;
#endif #endif
typedef typename CMap::template Container_for_attributes<T>::iterator typedef typename CMap::template Container_for_attributes<T>::iterator
iterator_type; iterator_type;
@ -455,7 +455,7 @@ namespace CGAL
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
typedef std::allocator_traits<typename CMap::Alloc> Allocator_traits; typedef std::allocator_traits<typename CMap::Alloc> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<T> Attr_allocator; typedef typename Allocator_traits::template rebind_alloc<T> Attr_allocator;
#else #else
typedef typename CMap::Alloc::template rebind<T>::other Attr_allocator; typedef typename CMap::Alloc::template rebind<T>::other Attr_allocator;
#endif #endif
typedef typename CMap::template Container_for_attributes<T>:: typedef typename CMap::template Container_for_attributes<T>::

View File

@ -281,11 +281,11 @@ private:
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
typedef std::allocator_traits<Allocator> Allocator_traits; typedef std::allocator_traits<Allocator> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Vertex> Vertex_allocator; typedef typename Allocator_traits::template rebind_alloc<Vertex> Vertex_allocator;
#else #else
typedef typename Allocator::template rebind<Vertex> Vertex_alloc_rebind; typedef typename Allocator::template rebind<Vertex> Vertex_alloc_rebind;
typedef typename Vertex_alloc_rebind::other Vertex_allocator; typedef typename Vertex_alloc_rebind::other Vertex_allocator;
#endif #endif
// Halfedge allocator. // Halfedge allocator.
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
typedef typename Allocator_traits::template rebind_alloc<Edge> Edge_allocator; typedef typename Allocator_traits::template rebind_alloc<Edge> Edge_allocator;

View File

@ -64,10 +64,10 @@ namespace CGAL {
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
typedef std::allocator_traits<Alloc_> Allocator_traits; typedef std::allocator_traits<Alloc_> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator; typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator;
#else #else
typedef typename Alloc_::template rebind<Dart>::other Dart_allocator; typedef typename Alloc_::template rebind<Dart>::other Dart_allocator;
#endif #endif
typedef Compact_container<Dart, Dart_allocator> Dart_container; typedef Compact_container<Dart, Dart_allocator> Dart_container;
typedef typename Dart_container::iterator Dart_handle; typedef typename Dart_container::iterator Dart_handle;

View File

@ -121,7 +121,7 @@ public:
typedef typename Allocator_traits::template rebind_alloc<Vertex> Vertex_allocator; typedef typename Allocator_traits::template rebind_alloc<Vertex> Vertex_allocator;
typedef typename Allocator_traits::template rebind_alloc<Halfedge> Halfedge_allocator; typedef typename Allocator_traits::template rebind_alloc<Halfedge> Halfedge_allocator;
typedef typename Allocator_traits::template rebind_alloc<Face> Face_allocator; typedef typename Allocator_traits::template rebind_alloc<Face> Face_allocator;
#else #else // CGAL_CXX11
typedef typename Allocator::template rebind< Vertex> Vertex_alloc_rebind; typedef typename Allocator::template rebind< Vertex> Vertex_alloc_rebind;
typedef typename Vertex_alloc_rebind::other Vertex_allocator; typedef typename Vertex_alloc_rebind::other Vertex_allocator;
typedef typename Allocator::template rebind< Halfedge> typedef typename Allocator::template rebind< Halfedge>
@ -129,8 +129,8 @@ public:
typedef typename Halfedge_alloc_rebind::other Halfedge_allocator; typedef typename Halfedge_alloc_rebind::other Halfedge_allocator;
typedef typename Allocator::template rebind< Face> Face_alloc_rebind; typedef typename Allocator::template rebind< Face> Face_alloc_rebind;
typedef typename Face_alloc_rebind::other Face_allocator; typedef typename Face_alloc_rebind::other Face_allocator;
#endif #endif // not CGAL_CXX11
typedef In_place_list<Vertex,false,Vertex_allocator> Vertex_list; typedef In_place_list<Vertex,false,Vertex_allocator> Vertex_list;
typedef typename Vertex_list::iterator Vertex_handle; typedef typename Vertex_list::iterator Vertex_handle;
typedef typename Vertex_list::const_iterator Vertex_const_handle; typedef typename Vertex_list::const_iterator Vertex_const_handle;
@ -252,35 +252,35 @@ public:
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
typedef std::allocator_traits<Allocator> Allocator_traits; typedef std::allocator_traits<Allocator> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Halfedge_pair> Edge_allocator; typedef typename Allocator_traits::template rebind_alloc<Halfedge_pair> Edge_allocator;
#else #else
typedef typename Allocator::template rebind< Halfedge_pair> typedef typename Allocator::template rebind< Halfedge_pair>
Edge_alloc_rebind; Edge_alloc_rebind;
typedef typename Edge_alloc_rebind::other Edge_allocator; typedef typename Edge_alloc_rebind::other Edge_allocator;
#endif #endif
protected: protected:
// Changed from static to local variable // Changed from static to local variable
Vertex_allocator vertex_allocator; Vertex_allocator vertex_allocator;
Edge_allocator edge_allocator; // allocates pairs of halfedges Edge_allocator edge_allocator; // allocates pairs of halfedges
Face_allocator face_allocator; Face_allocator face_allocator;
template <typename A, typename T> template <typename A, typename T>
void destroy(A& a, const T& t) void destroy(A& a, const T& t)
{ {
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
std::allocator_traits<A>::destroy(a,t); std::allocator_traits<A>::destroy(a,t);
#else #else
a.destroy(t); a.destroy(t);
#endif #endif
} }
Vertex* get_vertex_node( const Vertex& t) { Vertex* get_vertex_node( const Vertex& t) {
Vertex* p = vertex_allocator.allocate(1); Vertex* p = vertex_allocator.allocate(1);
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
std::allocator_traits<Vertex_allocator>::construct(vertex_allocator, p,t); std::allocator_traits<Vertex_allocator>::construct(vertex_allocator, p,t);
#else #else
vertex_allocator.construct(p, t); vertex_allocator.construct(p, t);
#endif #endif
return p; return p;
} }
void put_vertex_node( Vertex* p) { void put_vertex_node( Vertex* p) {
@ -293,7 +293,7 @@ protected:
Halfedge_pair* hpair = edge_allocator.allocate(1); Halfedge_pair* hpair = edge_allocator.allocate(1);
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
std::allocator_traits<Edge_allocator>::construct(edge_allocator, hpair, h, g); std::allocator_traits<Edge_allocator>::construct(edge_allocator, hpair, h, g);
#else #else
edge_allocator.construct(hpair, Halfedge_pair( h, g)); edge_allocator.construct(hpair, Halfedge_pair( h, g));
#endif #endif
Halfedge* h2 = &(hpair->first); Halfedge* h2 = &(hpair->first);
@ -324,7 +324,7 @@ protected:
#endif #endif
return p; return p;
} }
void put_face_node( Face* p) { void put_face_node( Face* p) {
destroy(face_allocator, p); destroy(face_allocator, p);
face_allocator.deallocate( p, 1); face_allocator.deallocate( p, 1);

View File

@ -71,7 +71,7 @@ public:
typedef typename Allocator_traits::template rebind_alloc<Vertex> Vertex_allocator; typedef typename Allocator_traits::template rebind_alloc<Vertex> Vertex_allocator;
typedef typename Allocator_traits::template rebind_alloc<Halfedge> Halfedge_allocator; typedef typename Allocator_traits::template rebind_alloc<Halfedge> Halfedge_allocator;
typedef typename Allocator_traits::template rebind_alloc<Face> Face_allocator; typedef typename Allocator_traits::template rebind_alloc<Face> Face_allocator;
#else #else // not CGAL_CXX11
typedef typename Allocator::template rebind< Vertex> Vertex_alloc_rebind; typedef typename Allocator::template rebind< Vertex> Vertex_alloc_rebind;
typedef typename Vertex_alloc_rebind::other Vertex_allocator; typedef typename Vertex_alloc_rebind::other Vertex_allocator;
typedef typename Allocator::template rebind< Halfedge> typedef typename Allocator::template rebind< Halfedge>
@ -79,7 +79,7 @@ public:
typedef typename Halfedge_alloc_rebind::other Halfedge_allocator; typedef typename Halfedge_alloc_rebind::other Halfedge_allocator;
typedef typename Allocator::template rebind< Face> Face_alloc_rebind; typedef typename Allocator::template rebind< Face> Face_alloc_rebind;
typedef typename Face_alloc_rebind::other Face_allocator; typedef typename Face_alloc_rebind::other Face_allocator;
#endif #endif // not CGAL_CXX11
#ifdef CGAL__HALFEDGEDS_USE_INTERNAL_VECTOR #ifdef CGAL__HALFEDGEDS_USE_INTERNAL_VECTOR
typedef internal::vector<Vertex, Vertex_allocator> Vertex_vector; typedef internal::vector<Vertex, Vertex_allocator> Vertex_vector;

View File

@ -65,13 +65,13 @@ class chained_map
std::size_t old_index; std::size_t old_index;
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
typedef std::allocator_traits<Allocator> Allocator_traits; typedef std::allocator_traits<Allocator> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<chained_map_elem<T> > allocator_type; typedef typename Allocator_traits::template rebind_alloc<chained_map_elem<T> > allocator_type;
#else #else
typedef typename Allocator::template rebind<chained_map_elem<T> >::other allocator_type; typedef typename Allocator::template rebind<chained_map_elem<T> >::other allocator_type;
#endif #endif
allocator_type alloc; allocator_type alloc;
public: public:
T& xdef() { return STOP.i; } T& xdef() { return STOP.i; }
@ -89,16 +89,16 @@ private:
inline void insert(std::size_t x, T y); inline void insert(std::size_t x, T y);
void destroy(chained_map_elem<T>* item) void destroy(chained_map_elem<T>* item)
{ {
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
typedef std::allocator_traits<allocator_type> Allocator_type_traits; typedef std::allocator_traits<allocator_type> Allocator_type_traits;
Allocator_type_traits::destroy(alloc,item); Allocator_type_traits::destroy(alloc,item);
#else #else
alloc.destroy(item); alloc.destroy(item);
#endif #endif
} }
public: public:
typedef chained_map_elem<T>* chained_map_item; typedef chained_map_elem<T>* chained_map_item;
typedef chained_map_item item; typedef chained_map_item item;
@ -164,11 +164,11 @@ void chained_map<T, Allocator>::init_table(std::size_t t)
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
typedef std::allocator_traits<Allocator> Allocator_traits; typedef std::allocator_traits<Allocator> Allocator_traits;
std::allocator_traits<allocator_type>::construct(alloc,table + i); std::allocator_traits<allocator_type>::construct(alloc,table + i);
#else #else
alloc.construct(table + i, chained_map_elem<T>()); alloc.construct(table + i, chained_map_elem<T>());
#endif #endif
} }
free = table + t; free = table + t;
table_end = table + t + t/2; table_end = table + t + t/2;
@ -327,7 +327,7 @@ chained_map<T, Allocator>& chained_map<T, Allocator>::operator=(const chained_ma
for (chained_map_item item = table ; item != table_end ; ++item) for (chained_map_item item = table ; item != table_end ; ++item)
destroy(item); destroy(item);
alloc.deallocate(table, table_end - table); alloc.deallocate(table, table_end - table);
init_table(D.table_size); init_table(D.table_size);

View File

@ -122,7 +122,7 @@ protected:
while (p >= vi) { while (p >= vi) {
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
std::allocator_traits<allocator_type>::destroy(allocator(),p); std::allocator_traits<allocator_type>::destroy(allocator(),p);
#else #else
allocator().destroy(p); allocator().destroy(p);
#endif #endif
p--; p--;

View File

@ -78,10 +78,10 @@ namespace CGAL {
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
typedef std::allocator_traits<Alloc_> Allocator_traits; typedef std::allocator_traits<Alloc_> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator; typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator;
#else #else
typedef typename Alloc_::template rebind<Dart>::other Dart_allocator; typedef typename Alloc_::template rebind<Dart>::other Dart_allocator;
#endif #endif
typedef Compact_container<Dart, Dart_allocator> Dart_container; typedef Compact_container<Dart, Dart_allocator> Dart_container;
typedef typename Dart_container::iterator Dart_handle; typedef typename Dart_container::iterator Dart_handle;

View File

@ -74,10 +74,10 @@ namespace CGAL {
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
typedef std::allocator_traits<Alloc_> Allocator_traits; typedef std::allocator_traits<Alloc_> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator; typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator;
#else #else
typedef typename Alloc_::template rebind<Dart>::other Dart_allocator; typedef typename Alloc_::template rebind<Dart>::other Dart_allocator;
#endif #endif
typedef Compact_container<Dart, Dart_allocator> Dart_container; typedef Compact_container<Dart, Dart_allocator> Dart_container;
typedef typename Dart_container::iterator Dart_handle; typedef typename Dart_container::iterator Dart_handle;
@ -93,14 +93,14 @@ namespace CGAL {
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
template <typename T> template <typename T>
struct Container_for_attributes : struct Container_for_attributes :
public Compact_container<T, typename std::allocator_traits<Alloc_>::template rebind_alloc<T> > public Compact_container<T, typename std::allocator_traits<Alloc_>::template rebind_alloc<T> >
{}; {};
#else #else
template <typename T> template <typename T>
struct Container_for_attributes : struct Container_for_attributes :
public Compact_container<T, typename Alloc_::template rebind<T>::other> public Compact_container<T, typename Alloc_::template rebind<T>::other>
{}; {};
#endif #endif
/// Typedef for attributes /// Typedef for attributes
typedef typename internal::template Get_attributes_tuple<Dart_wrapper>::type typedef typename internal::template Get_attributes_tuple<Dart_wrapper>::type
Attributes; Attributes;

View File

@ -267,7 +267,7 @@ public:
typedef typename Allocator::size_type size_type; typedef typename Allocator::size_type size_type;
typedef typename Allocator::difference_type difference_type; typedef typename Allocator::difference_type difference_type;
#endif #endif
typedef internal::CC_iterator<Self, false> iterator; typedef internal::CC_iterator<Self, false> iterator;
typedef internal::CC_iterator<Self, true> const_iterator; typedef internal::CC_iterator<Self, true> const_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator;

View File

@ -191,7 +191,7 @@ public:
typedef typename Allocator::size_type size_type; typedef typename Allocator::size_type size_type;
typedef typename Allocator::difference_type difference_type; typedef typename Allocator::difference_type difference_type;
#endif #endif
typedef CCC_internal::CCC_iterator<Self, false> iterator; typedef CCC_internal::CCC_iterator<Self, false> iterator;
typedef CCC_internal::CCC_iterator<Self, true> const_iterator; typedef CCC_internal::CCC_iterator<Self, true> const_iterator;
typedef std::reverse_iterator<iterator> reverse_iterator; typedef std::reverse_iterator<iterator> reverse_iterator;
@ -440,7 +440,7 @@ private:
#else #else
m_alloc.destroy(&*x); m_alloc.destroy(&*x);
#endif #endif
/* WE DON'T DO THAT BECAUSE OF THE ERASE COUNTER /* WE DON'T DO THAT BECAUSE OF THE ERASE COUNTER
#ifndef CGAL_NO_ASSERTIONS #ifndef CGAL_NO_ASSERTIONS
std::memset(&*x, 0, sizeof(T)); std::memset(&*x, 0, sizeof(T));

View File

@ -59,9 +59,9 @@ class Handle_for
typedef typename Alloc_traits::template rebind_traits<RefCounted>::pointer pointer; typedef typename Alloc_traits::template rebind_traits<RefCounted>::pointer pointer;
#else #else
typedef typename Alloc_::template rebind<RefCounted>::other Allocator; typedef typename Alloc_::template rebind<RefCounted>::other Allocator;
typedef typename Allocator::pointer pointer; typedef typename Allocator::pointer pointer;
#endif #endif
static Allocator allocator; static Allocator allocator;
pointer ptr_; pointer ptr_;

View File

@ -253,11 +253,11 @@ class Reference_counted_hierarchy : public Reference_counted_hierarchy_base {
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
typedef std::allocator_traits<Allocator_> Allocator_traits; typedef std::allocator_traits<Allocator_> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<char> Char_allocator; typedef typename Allocator_traits::template rebind_alloc<char> Char_allocator;
#else #else
typedef typename Allocator_::template rebind< char> Char_alloc_rebind; typedef typename Allocator_::template rebind< char> Char_alloc_rebind;
typedef typename Char_alloc_rebind::other Char_allocator; typedef typename Char_alloc_rebind::other Char_allocator;
#endif #endif
static Char_allocator alloc; static Char_allocator alloc;
public: public:

View File

@ -252,10 +252,10 @@ public:
typedef typename Allocator::size_type size_type; typedef typename Allocator::size_type size_type;
typedef typename Allocator::difference_type difference_type; typedef typename Allocator::difference_type difference_type;
#endif #endif
typedef value_type& reference; typedef value_type& reference;
typedef const value_type& const_reference; typedef const value_type& const_reference;
typedef internal::In_place_list_iterator<T, Alloc> iterator; typedef internal::In_place_list_iterator<T, Alloc> iterator;
typedef internal::In_place_list_const_iterator<T, Alloc> const_iterator; typedef internal::In_place_list_const_iterator<T, Alloc> const_iterator;
@ -295,12 +295,12 @@ protected:
} }
void put_node( pointer p) { void put_node( pointer p) {
#ifdef CGAL_USE_ALLOCATOR_CONSTRUCT_DESTROY #ifdef CGAL_USE_ALLOCATOR_CONSTRUCT_DESTROY
#ifdef CGAL_CXX11 # ifdef CGAL_CXX11
std::allocator_traits<Allocator>::destroy(allocator, p); std::allocator_traits<Allocator>::destroy(allocator, p);
#else # else
allocator.destroy( p); allocator.destroy( p);
#endif # endif
#else #else // not CGAL_USE_ALLOCATOR_CONSTRUCT_DESTROY
p->~value_type(); p->~value_type();
#endif #endif
allocator.deallocate( p, 1); allocator.deallocate( p, 1);

View File

@ -239,11 +239,11 @@ protected:
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
typedef std::allocator_traits<Allocator> Allocator_traits; typedef std::allocator_traits<Allocator> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Node> Node_allocator; typedef typename Allocator_traits::template rebind_alloc<Node> Node_allocator;
#else #else
typedef typename Allocator::template rebind <Node> Node_alloc_rebind; typedef typename Allocator::template rebind <Node> Node_alloc_rebind;
typedef typename Node_alloc_rebind::other Node_allocator; typedef typename Node_alloc_rebind::other Node_allocator;
#endif #endif
public: public:
// Forward decleration: // Forward decleration:

View File

@ -403,7 +403,7 @@ random_shuffle(RandomAccessIterator begin, RandomAccessIterator end)
} }
} // namespace cpp98 } // namespace cpp98
namespace internal { namespace internal {
namespace algorithm { namespace algorithm {

View File

@ -180,7 +180,7 @@ public:
typedef typename Allocator::template rebind<Subcurve> Subcurve_alloc_rebind; typedef typename Allocator::template rebind<Subcurve> Subcurve_alloc_rebind;
typedef typename Subcurve_alloc_rebind::other Subcurve_alloc; typedef typename Subcurve_alloc_rebind::other Subcurve_alloc;
#endif #endif
protected: protected:
/*! \struct /*! \struct
* An auxiliary functor for comparing event pointers. * An auxiliary functor for comparing event pointers.

View File

@ -142,9 +142,9 @@ void No_intersection_surface_sweep_2<Vis>::deallocate_event(Event* event)
// Perfrom the actual deallocation. // Perfrom the actual deallocation.
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
std::allocator_traits<Event_alloc>::destroy(m_eventAlloc, event); std::allocator_traits<Event_alloc>::destroy(m_eventAlloc, event);
#else #else
m_eventAlloc.destroy(event); m_eventAlloc.destroy(event);
#endif #endif
m_eventAlloc.deallocate(event, 1); m_eventAlloc.deallocate(event, 1);
} }
@ -271,10 +271,10 @@ _init_curve(const X_monotone_curve_2& curve, unsigned int index)
{ {
// Construct and initialize a subcurve object. // Construct and initialize a subcurve object.
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
std::allocator_traits<Subcurve_alloc>::construct(m_subCurveAlloc, m_subCurves + index, m_masterSubcurve ); std::allocator_traits<Subcurve_alloc>::construct(m_subCurveAlloc, m_subCurves + index, m_masterSubcurve );
#else #else
m_subCurveAlloc.construct(m_subCurves + index, m_masterSubcurve); m_subCurveAlloc.construct(m_subCurves + index, m_masterSubcurve);
#endif #endif
(m_subCurves + index)->set_hint(this->m_statusLine.end()); (m_subCurves + index)->set_hint(this->m_statusLine.end());
(m_subCurves + index)->init(curve); (m_subCurves + index)->init(curve);
@ -615,9 +615,9 @@ No_intersection_surface_sweep_2<Vis>::_allocate_event(const Point_2& pt,
// Allocate the event. // Allocate the event.
Event* e = m_eventAlloc.allocate(1); Event* e = m_eventAlloc.allocate(1);
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
std::allocator_traits<Event_alloc>::construct(m_eventAlloc, e, m_masterEvent); std::allocator_traits<Event_alloc>::construct(m_eventAlloc, e, m_masterEvent);
#else #else
m_eventAlloc.construct(e, m_masterEvent); m_eventAlloc.construct(e, m_masterEvent);
#endif #endif
e->init(pt, type, ps_x, ps_y); e->init(pt, type, ps_x, ps_y);
@ -639,9 +639,9 @@ _allocate_event_at_open_boundary(Attribute type,
{ {
Event* e = m_eventAlloc.allocate(1); Event* e = m_eventAlloc.allocate(1);
#ifdef CGAL_CXX11 #ifdef CGAL_CXX11
std::allocator_traits<Event_alloc>::construct(m_eventAlloc, e, m_masterEvent); std::allocator_traits<Event_alloc>::construct(m_eventAlloc, e, m_masterEvent);
#else #else
m_eventAlloc.construct(e, m_masterEvent); m_eventAlloc.construct(e, m_masterEvent);
#endif #endif
e->init_at_open_boundary(type, ps_x, ps_y); e->init_at_open_boundary(type, ps_x, ps_y);