diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h index 4a619bef618..8dcbcd70bf8 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_dcel_base.h @@ -916,7 +916,7 @@ protected: typedef typename Allocator_traits::template rebind_alloc Outer_ccb_allocator; typedef typename Allocator_traits::template rebind_alloc Inner_ccb_allocator; typedef typename Allocator_traits::template rebind_alloc Iso_vert_allocator; -#else +#else // not CGAL_CXX11 // Vertex allocator. typedef typename Allocator::template rebind Vertex_alloc_rebind; typedef typename Vertex_alloc_rebind::other Vertex_allocator; @@ -941,7 +941,7 @@ protected: typedef typename Allocator::template rebind Iso_vert_alloc_rebind; typedef typename Iso_vert_alloc_rebind::other Iso_vert_allocator; -#endif +#endif // not CGAL_CXX11 public: typedef typename Halfedge_list::size_type Size; @@ -1091,7 +1091,7 @@ public: Vertex* v = vertex_alloc.allocate(1); #ifdef CGAL_CXX11 std::allocator_traits::construct(vertex_alloc,v); -#else +#else vertex_alloc.construct(v, Vertex()); #endif vertices.push_back(*v); @@ -1120,7 +1120,7 @@ public: std::allocator_traits::construct(face_alloc, f); #else face_alloc.construct(f, Face()); -#endif +#endif faces.push_back (*f); return(f); } @@ -1133,7 +1133,7 @@ public: std::allocator_traits::construct(out_ccb_alloc, oc); #else out_ccb_alloc.construct(oc, Outer_ccb()); -#endif +#endif out_ccbs.push_back(*oc); return (oc); } @@ -1146,7 +1146,7 @@ public: std::allocator_traits::construct(in_ccb_alloc, ic); #else in_ccb_alloc.construct(ic, Inner_ccb()); -#endif +#endif in_ccbs.push_back(*ic); return (ic); } diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h index b2ec980a0bd..7d51cc94b18 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_on_surface_2.h @@ -1557,7 +1557,7 @@ protected: { Point_2* p_pt = m_points_alloc.allocate(1); #ifdef CGAL_CXX11 - std::allocator_traits::construct(m_points_alloc, p_pt, pt); + std::allocator_traits::construct(m_points_alloc, p_pt, pt); #else m_points_alloc.construct(p_pt, pt); #endif @@ -1570,7 +1570,7 @@ protected: Point_2* p_pt = &pt; #ifdef CGAL_CXX11 std::allocator_traits::destroy(m_points_alloc, p_pt); -#else +#else m_points_alloc.destroy(p_pt); #endif m_points_alloc.deallocate(p_pt, 1); @@ -1582,7 +1582,7 @@ protected: X_monotone_curve_2* p_cv = m_curves_alloc.allocate(1); #ifdef CGAL_CXX11 std::allocator_traits::construct(m_curves_alloc, p_cv, cv); -#else +#else m_curves_alloc.construct(p_cv, cv); #endif return (p_cv); diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h index 0d285c9d8d4..5b1c8ac572a 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h @@ -67,10 +67,9 @@ namespace CGAL { #ifdef CGAL_CXX11 typedef std::allocator_traits Allocator_traits; typedef typename Allocator_traits::template rebind_alloc Dart_allocator; -#else +#else // not CGAL_CXX11 typedef typename Alloc_::template rebind::other Dart_allocator; -#endif - +#endif // not CGAL_CXX11 typedef Compact_container Dart_container; typedef typename Dart_container::iterator Dart_handle; diff --git a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h index 42a87cd5afe..3ffbdec6657 100644 --- a/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h +++ b/Combinatorial_map/include/CGAL/internal/Combinatorial_map_utility.h @@ -439,7 +439,7 @@ namespace CGAL typedef typename Allocator_traits::template rebind_alloc Attr_allocator; #else typedef typename CMap::Alloc::template rebind::other Attr_allocator; -#endif +#endif typedef typename CMap::template Container_for_attributes::iterator iterator_type; @@ -455,7 +455,7 @@ namespace CGAL #ifdef CGAL_CXX11 typedef std::allocator_traits Allocator_traits; typedef typename Allocator_traits::template rebind_alloc Attr_allocator; -#else +#else typedef typename CMap::Alloc::template rebind::other Attr_allocator; #endif typedef typename CMap::template Container_for_attributes:: diff --git a/Envelope_2/include/CGAL/Envelope_diagram_1.h b/Envelope_2/include/CGAL/Envelope_diagram_1.h index 0445e8c74fd..1e93358ff62 100644 --- a/Envelope_2/include/CGAL/Envelope_diagram_1.h +++ b/Envelope_2/include/CGAL/Envelope_diagram_1.h @@ -281,11 +281,11 @@ private: #ifdef CGAL_CXX11 typedef std::allocator_traits Allocator_traits; typedef typename Allocator_traits::template rebind_alloc Vertex_allocator; -#else +#else typedef typename Allocator::template rebind Vertex_alloc_rebind; typedef typename Vertex_alloc_rebind::other Vertex_allocator; #endif - + // Halfedge allocator. #ifdef CGAL_CXX11 typedef typename Allocator_traits::template rebind_alloc Edge_allocator; diff --git a/Generalized_map/include/CGAL/Generalized_map_storages.h b/Generalized_map/include/CGAL/Generalized_map_storages.h index e2c44bb8a39..5028e242f28 100644 --- a/Generalized_map/include/CGAL/Generalized_map_storages.h +++ b/Generalized_map/include/CGAL/Generalized_map_storages.h @@ -64,10 +64,10 @@ namespace CGAL { #ifdef CGAL_CXX11 typedef std::allocator_traits Allocator_traits; typedef typename Allocator_traits::template rebind_alloc Dart_allocator; -#else +#else typedef typename Alloc_::template rebind::other Dart_allocator; #endif - + typedef Compact_container Dart_container; typedef typename Dart_container::iterator Dart_handle; diff --git a/HalfedgeDS/include/CGAL/HalfedgeDS_list.h b/HalfedgeDS/include/CGAL/HalfedgeDS_list.h index a337e69bf85..a70dd2553cf 100644 --- a/HalfedgeDS/include/CGAL/HalfedgeDS_list.h +++ b/HalfedgeDS/include/CGAL/HalfedgeDS_list.h @@ -121,7 +121,7 @@ public: typedef typename Allocator_traits::template rebind_alloc Vertex_allocator; typedef typename Allocator_traits::template rebind_alloc Halfedge_allocator; typedef typename Allocator_traits::template rebind_alloc Face_allocator; -#else +#else // CGAL_CXX11 typedef typename Allocator::template rebind< Vertex> Vertex_alloc_rebind; typedef typename Vertex_alloc_rebind::other Vertex_allocator; typedef typename Allocator::template rebind< Halfedge> @@ -129,8 +129,8 @@ public: typedef typename Halfedge_alloc_rebind::other Halfedge_allocator; typedef typename Allocator::template rebind< Face> Face_alloc_rebind; typedef typename Face_alloc_rebind::other Face_allocator; -#endif - +#endif // not CGAL_CXX11 + typedef In_place_list Vertex_list; typedef typename Vertex_list::iterator Vertex_handle; typedef typename Vertex_list::const_iterator Vertex_const_handle; @@ -252,35 +252,35 @@ public: #ifdef CGAL_CXX11 typedef std::allocator_traits Allocator_traits; typedef typename Allocator_traits::template rebind_alloc Edge_allocator; -#else +#else typedef typename Allocator::template rebind< Halfedge_pair> Edge_alloc_rebind; typedef typename Edge_alloc_rebind::other Edge_allocator; #endif - + protected: // Changed from static to local variable Vertex_allocator vertex_allocator; Edge_allocator edge_allocator; // allocates pairs of halfedges Face_allocator face_allocator; - template - void destroy(A& a, const T& t) - { + template + void destroy(A& a, const T& t) + { #ifdef CGAL_CXX11 - std::allocator_traits::destroy(a,t); + std::allocator_traits::destroy(a,t); #else - a.destroy(t); + a.destroy(t); #endif - } - + } + Vertex* get_vertex_node( const Vertex& t) { Vertex* p = vertex_allocator.allocate(1); #ifdef CGAL_CXX11 std::allocator_traits::construct(vertex_allocator, p,t); #else vertex_allocator.construct(p, t); -#endif +#endif return p; } void put_vertex_node( Vertex* p) { @@ -293,7 +293,7 @@ protected: Halfedge_pair* hpair = edge_allocator.allocate(1); #ifdef CGAL_CXX11 std::allocator_traits::construct(edge_allocator, hpair, h, g); -#else +#else edge_allocator.construct(hpair, Halfedge_pair( h, g)); #endif Halfedge* h2 = &(hpair->first); @@ -324,7 +324,7 @@ protected: #endif return p; } - + void put_face_node( Face* p) { destroy(face_allocator, p); face_allocator.deallocate( p, 1); diff --git a/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h b/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h index 4b8fcb69114..4ba4261741a 100644 --- a/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h +++ b/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h @@ -71,7 +71,7 @@ public: typedef typename Allocator_traits::template rebind_alloc Vertex_allocator; typedef typename Allocator_traits::template rebind_alloc Halfedge_allocator; typedef typename Allocator_traits::template rebind_alloc Face_allocator; -#else +#else // not CGAL_CXX11 typedef typename Allocator::template rebind< Vertex> Vertex_alloc_rebind; typedef typename Vertex_alloc_rebind::other Vertex_allocator; typedef typename Allocator::template rebind< Halfedge> @@ -79,7 +79,7 @@ public: typedef typename Halfedge_alloc_rebind::other Halfedge_allocator; typedef typename Allocator::template rebind< Face> Face_alloc_rebind; typedef typename Face_alloc_rebind::other Face_allocator; -#endif +#endif // not CGAL_CXX11 #ifdef CGAL__HALFEDGEDS_USE_INTERNAL_VECTOR typedef internal::vector Vertex_vector; diff --git a/Hash_map/include/CGAL/Tools/chained_map.h b/Hash_map/include/CGAL/Tools/chained_map.h index 4be01a751c0..ae0c38ae093 100644 --- a/Hash_map/include/CGAL/Tools/chained_map.h +++ b/Hash_map/include/CGAL/Tools/chained_map.h @@ -65,13 +65,13 @@ class chained_map std::size_t old_index; #ifdef CGAL_CXX11 - typedef std::allocator_traits Allocator_traits; - typedef typename Allocator_traits::template rebind_alloc > allocator_type; -#else + typedef std::allocator_traits Allocator_traits; + typedef typename Allocator_traits::template rebind_alloc > allocator_type; +#else typedef typename Allocator::template rebind >::other allocator_type; #endif - - allocator_type alloc; + + allocator_type alloc; public: T& xdef() { return STOP.i; } @@ -89,16 +89,16 @@ private: inline void insert(std::size_t x, T y); - void destroy(chained_map_elem* item) - { + void destroy(chained_map_elem* item) + { #ifdef CGAL_CXX11 - typedef std::allocator_traits Allocator_type_traits; - Allocator_type_traits::destroy(alloc,item); + typedef std::allocator_traits Allocator_type_traits; + Allocator_type_traits::destroy(alloc,item); #else - alloc.destroy(item); -#endif - } - + alloc.destroy(item); +#endif + } + public: typedef chained_map_elem* chained_map_item; typedef chained_map_item item; @@ -164,11 +164,11 @@ void chained_map::init_table(std::size_t t) #ifdef CGAL_CXX11 typedef std::allocator_traits Allocator_traits; std::allocator_traits::construct(alloc,table + i); -#else +#else alloc.construct(table + i, chained_map_elem()); #endif } - + free = table + t; table_end = table + t + t/2; @@ -327,7 +327,7 @@ chained_map& chained_map::operator=(const chained_ma for (chained_map_item item = table ; item != table_end ; ++item) destroy(item); - + alloc.deallocate(table, table_end - table); init_table(D.table_size); diff --git a/Kernel_d/include/CGAL/Kernel_d/Vector__.h b/Kernel_d/include/CGAL/Kernel_d/Vector__.h index c7aa7be706f..c13960b106c 100644 --- a/Kernel_d/include/CGAL/Kernel_d/Vector__.h +++ b/Kernel_d/include/CGAL/Kernel_d/Vector__.h @@ -122,7 +122,7 @@ protected: while (p >= vi) { #ifdef CGAL_CXX11 std::allocator_traits::destroy(allocator(),p); -#else +#else allocator().destroy(p); #endif p--; diff --git a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h index df46396fa48..886e809cb50 100644 --- a/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/CMap_linear_cell_complex_storages.h @@ -78,10 +78,10 @@ namespace CGAL { #ifdef CGAL_CXX11 typedef std::allocator_traits Allocator_traits; typedef typename Allocator_traits::template rebind_alloc Dart_allocator; -#else +#else typedef typename Alloc_::template rebind::other Dart_allocator; #endif - + typedef Compact_container Dart_container; typedef typename Dart_container::iterator Dart_handle; diff --git a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h index f068ef96937..75662848582 100644 --- a/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h +++ b/Linear_cell_complex/include/CGAL/GMap_linear_cell_complex_storages.h @@ -74,10 +74,10 @@ namespace CGAL { #ifdef CGAL_CXX11 typedef std::allocator_traits Allocator_traits; typedef typename Allocator_traits::template rebind_alloc Dart_allocator; -#else +#else typedef typename Alloc_::template rebind::other Dart_allocator; #endif - + typedef Compact_container Dart_container; typedef typename Dart_container::iterator Dart_handle; @@ -93,14 +93,14 @@ namespace CGAL { #ifdef CGAL_CXX11 template struct Container_for_attributes : - public Compact_container::template rebind_alloc > + public Compact_container::template rebind_alloc > {}; #else template struct Container_for_attributes : public Compact_container::other> {}; -#endif +#endif /// Typedef for attributes typedef typename internal::template Get_attributes_tuple::type Attributes; diff --git a/STL_Extension/include/CGAL/Compact_container.h b/STL_Extension/include/CGAL/Compact_container.h index 5eff8956d8a..3bdd35100b0 100644 --- a/STL_Extension/include/CGAL/Compact_container.h +++ b/STL_Extension/include/CGAL/Compact_container.h @@ -267,7 +267,7 @@ public: typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; #endif - + typedef internal::CC_iterator iterator; typedef internal::CC_iterator const_iterator; typedef std::reverse_iterator reverse_iterator; diff --git a/STL_Extension/include/CGAL/Concurrent_compact_container.h b/STL_Extension/include/CGAL/Concurrent_compact_container.h index 388590b2a54..22bd96ceca6 100644 --- a/STL_Extension/include/CGAL/Concurrent_compact_container.h +++ b/STL_Extension/include/CGAL/Concurrent_compact_container.h @@ -191,7 +191,7 @@ public: typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; #endif - + typedef CCC_internal::CCC_iterator iterator; typedef CCC_internal::CCC_iterator const_iterator; typedef std::reverse_iterator reverse_iterator; @@ -440,7 +440,7 @@ private: #else m_alloc.destroy(&*x); #endif - + /* WE DON'T DO THAT BECAUSE OF THE ERASE COUNTER #ifndef CGAL_NO_ASSERTIONS std::memset(&*x, 0, sizeof(T)); diff --git a/STL_Extension/include/CGAL/Handle_for.h b/STL_Extension/include/CGAL/Handle_for.h index c898a404385..9382ae57e53 100644 --- a/STL_Extension/include/CGAL/Handle_for.h +++ b/STL_Extension/include/CGAL/Handle_for.h @@ -59,9 +59,9 @@ class Handle_for typedef typename Alloc_traits::template rebind_traits::pointer pointer; #else typedef typename Alloc_::template rebind::other Allocator; - typedef typename Allocator::pointer pointer; + typedef typename Allocator::pointer pointer; #endif - + static Allocator allocator; pointer ptr_; diff --git a/STL_Extension/include/CGAL/Handle_with_policy.h b/STL_Extension/include/CGAL/Handle_with_policy.h index b04cf6a9f89..2d8edc5e588 100644 --- a/STL_Extension/include/CGAL/Handle_with_policy.h +++ b/STL_Extension/include/CGAL/Handle_with_policy.h @@ -253,11 +253,11 @@ class Reference_counted_hierarchy : public Reference_counted_hierarchy_base { #ifdef CGAL_CXX11 typedef std::allocator_traits Allocator_traits; typedef typename Allocator_traits::template rebind_alloc Char_allocator; -#else +#else typedef typename Allocator_::template rebind< char> Char_alloc_rebind; typedef typename Char_alloc_rebind::other Char_allocator; #endif - + static Char_allocator alloc; public: diff --git a/STL_Extension/include/CGAL/In_place_list.h b/STL_Extension/include/CGAL/In_place_list.h index c80da58a214..c5fc2e42ecc 100644 --- a/STL_Extension/include/CGAL/In_place_list.h +++ b/STL_Extension/include/CGAL/In_place_list.h @@ -252,10 +252,10 @@ public: typedef typename Allocator::size_type size_type; typedef typename Allocator::difference_type difference_type; #endif - + typedef value_type& reference; typedef const value_type& const_reference; - + typedef internal::In_place_list_iterator iterator; typedef internal::In_place_list_const_iterator const_iterator; @@ -295,12 +295,12 @@ protected: } void put_node( pointer p) { #ifdef CGAL_USE_ALLOCATOR_CONSTRUCT_DESTROY -#ifdef CGAL_CXX11 +# ifdef CGAL_CXX11 std::allocator_traits::destroy(allocator, p); -#else +# else allocator.destroy( p); -#endif -#else +# endif +#else // not CGAL_USE_ALLOCATOR_CONSTRUCT_DESTROY p->~value_type(); #endif allocator.deallocate( p, 1); diff --git a/STL_Extension/include/CGAL/Multiset.h b/STL_Extension/include/CGAL/Multiset.h index 640f1bb9ff6..f1e0aa52dba 100644 --- a/STL_Extension/include/CGAL/Multiset.h +++ b/STL_Extension/include/CGAL/Multiset.h @@ -239,11 +239,11 @@ protected: #ifdef CGAL_CXX11 typedef std::allocator_traits Allocator_traits; typedef typename Allocator_traits::template rebind_alloc Node_allocator; -#else +#else typedef typename Allocator::template rebind Node_alloc_rebind; typedef typename Node_alloc_rebind::other Node_allocator; #endif - + public: // Forward decleration: diff --git a/STL_Extension/include/CGAL/algorithm.h b/STL_Extension/include/CGAL/algorithm.h index bd1f2f3af55..bebcd41bc72 100644 --- a/STL_Extension/include/CGAL/algorithm.h +++ b/STL_Extension/include/CGAL/algorithm.h @@ -403,7 +403,7 @@ random_shuffle(RandomAccessIterator begin, RandomAccessIterator end) } } // namespace cpp98 - + namespace internal { namespace algorithm { diff --git a/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h b/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h index 626402b92aa..1b903c92ebf 100644 --- a/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h +++ b/Surface_sweep_2/include/CGAL/No_intersection_surface_sweep_2.h @@ -180,7 +180,7 @@ public: typedef typename Allocator::template rebind Subcurve_alloc_rebind; typedef typename Subcurve_alloc_rebind::other Subcurve_alloc; #endif - + protected: /*! \struct * An auxiliary functor for comparing event pointers. diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h index 2c00ecc52d3..209e6e4be1d 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/No_intersection_surface_sweep_2_impl.h @@ -142,9 +142,9 @@ void No_intersection_surface_sweep_2::deallocate_event(Event* event) // Perfrom the actual deallocation. #ifdef CGAL_CXX11 - std::allocator_traits::destroy(m_eventAlloc, event); + std::allocator_traits::destroy(m_eventAlloc, event); #else - m_eventAlloc.destroy(event); + m_eventAlloc.destroy(event); #endif 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. #ifdef CGAL_CXX11 - std::allocator_traits::construct(m_subCurveAlloc, m_subCurves + index, m_masterSubcurve ); + std::allocator_traits::construct(m_subCurveAlloc, m_subCurves + index, m_masterSubcurve ); #else m_subCurveAlloc.construct(m_subCurves + index, m_masterSubcurve); -#endif +#endif (m_subCurves + index)->set_hint(this->m_statusLine.end()); (m_subCurves + index)->init(curve); @@ -615,9 +615,9 @@ No_intersection_surface_sweep_2::_allocate_event(const Point_2& pt, // Allocate the event. Event* e = m_eventAlloc.allocate(1); #ifdef CGAL_CXX11 - std::allocator_traits::construct(m_eventAlloc, e, m_masterEvent); + std::allocator_traits::construct(m_eventAlloc, e, m_masterEvent); #else - m_eventAlloc.construct(e, m_masterEvent); + m_eventAlloc.construct(e, m_masterEvent); #endif 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); #ifdef CGAL_CXX11 - std::allocator_traits::construct(m_eventAlloc, e, m_masterEvent); + std::allocator_traits::construct(m_eventAlloc, e, m_masterEvent); #else - m_eventAlloc.construct(e, m_masterEvent); + m_eventAlloc.construct(e, m_masterEvent); #endif e->init_at_open_boundary(type, ps_x, ps_y);