diff --git a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h index 32a8687f698..656a25c601c 100644 --- a/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h +++ b/Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h @@ -30,6 +30,7 @@ #include #include #include +#include #include #include @@ -40,7 +41,6 @@ #include #include -#include // If defined, type casting is done statically, // reducing type-safety overhead. @@ -127,8 +127,7 @@ public: typedef typename Tr::Locate_type Locate_type; //< defines the simplex type returned from location. - typedef CGAL::cpp11::tuple - Simplex; //< defines the simplex type. + typedef std::tuple Simplex; //< defines the simplex type. typedef Cell value_type; //< defines the value type the iterator refers to. typedef Cell& reference; //< defines the reference type of the iterator. @@ -251,8 +250,7 @@ public: */ const Cell cell() const { - using CGAL::cpp11::get; - return *get<0>(_cur); + return *std::get<0>(_cur); } // gives a handle to the current cell. @@ -263,8 +261,7 @@ public: */ Cell_handle handle() { - using CGAL::cpp11::get; - return get<0>(_cur); + return std::get<0>(_cur); } // gives the previous cell. @@ -277,8 +274,7 @@ public: */ Cell_handle previous() const { - using CGAL::cpp11::get; - return get<0>(_prev); + return std::get<0>(_prev); } // provides a dereference operator. @@ -286,8 +282,7 @@ public: */ Cell* operator->() { - using CGAL::cpp11::get; - return &*get<0>(_cur); + return &*std::get<0>(_cur); } // provides an indirection operator. @@ -295,8 +290,7 @@ public: */ Cell& operator*() { - using CGAL::cpp11::get; - return *get<0>(_cur); + return *std::get<0>(_cur); } // provides a conversion operator. @@ -304,8 +298,7 @@ public: */ operator const Cell_handle() const { - using CGAL::cpp11::get; - return get<0>(_cur); + return std::get<0>(_cur); } // provides a conversion operator. @@ -320,8 +313,7 @@ public: */ bool has_next() const { - using CGAL::cpp11::get; - return get<0>(_cur) != Cell_handle(); + return std::get<0>(_cur) != Cell_handle(); } // gives the simplex through which the current cell was entered. @@ -330,16 +322,14 @@ public: */ void entry( Locate_type& lt, int& li, int& lj ) const { - using CGAL::cpp11::get; - lt = get<1>(_cur); li = get<2>(_cur); lj = get<3>(_cur); + lt = std::get<1>(_cur); li = std::get<2>(_cur); lj = std::get<3>(_cur); } // gives the simplex through which the previous cell was exited. /* \pre the current cell is not the initial cell. */ void exit( Locate_type& lt, int& li, int& lj ) const { - using CGAL::cpp11::get; - lt = get<1>(_prev); li = get<2>(_prev); lj = get<3>(_prev); + lt = std::get<1>(_prev); li = std::get<2>(_prev); lj = std::get<3>(_prev); } // gives the past-the-end iterator associated with this iterator. @@ -399,8 +389,7 @@ public: */ bool operator==( const Cell_handle& ch ) const { - using CGAL::cpp11::get; - return ch == get<0>(_cur); + return ch == std::get<0>(_cur); } // compares the current cell with `ch`. @@ -411,8 +400,7 @@ public: */ bool operator!=( const Cell_handle& ch ) const { - using CGAL::cpp11::get; - return ch != get<0>(_cur); + return ch != std::get<0>(_cur); } // \} @@ -600,7 +588,7 @@ private: //check what is the entry type of _cell_iterator if (Cell_handle(_cell_iterator) == Cell_handle()) { - //where did the segment get out from previous cell + //where did the segment std::get out from previous cell cell = _cell_iterator.previous(); _cell_iterator.exit(lt, li, lj); } diff --git a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h index 16a024c0a0b..36dbc7d2018 100644 --- a/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h +++ b/Triangulation_3/include/CGAL/internal/Triangulation_segment_traverser_3_impl.h @@ -21,7 +21,6 @@ #ifndef CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H #define CGAL_TRIANGULATION_SEGMENT_TRAVERSER_3_IMPL_H -#include namespace CGAL { @@ -91,10 +90,9 @@ Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, Vertex_hand _s_vertex = Vertex_handle(); _t_vertex = t; - using CGAL::cpp11::get; - get<0>(_cur) = _tr->locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); + std::get<0>(_cur) = _tr->locate( s, std::get<1>(_cur), std::get<2>(_cur), std::get<3>(_cur), hint ); - CGAL_triangulation_postcondition( get<0>(_cur) != Cell_handle() ); + CGAL_triangulation_postcondition( std::get<0>(_cur) != Cell_handle() ); jump_to_intersecting_cell(); } @@ -113,10 +111,9 @@ Triangulation_segment_cell_iterator_3( const Tr* tr, const Point& s, const Point _s_vertex = Vertex_handle(); _t_vertex = Vertex_handle(); - using CGAL::cpp11::get; - get<0>(_cur) = _tr->locate( s, get<1>(_cur), get<2>(_cur), get<3>(_cur), hint ); + std::get<0>(_cur) = _tr->locate( s, std::get<1>(_cur), std::get<2>(_cur), std::get<3>(_cur), hint ); - CGAL_triangulation_postcondition( get<0>(_cur) != Cell_handle() ); + CGAL_triangulation_postcondition( std::get<0>(_cur) != Cell_handle() ); jump_to_intersecting_cell(); } @@ -139,16 +136,14 @@ Triangulation_segment_cell_iterator_3::end() const { sci._target = _target; sci._s_vertex = _s_vertex; sci._t_vertex = _t_vertex; - using CGAL::cpp11::get; - get<0>(sci._cur) = Cell_handle(); + std::get<0>(sci._cur) = Cell_handle(); return sci; } template < class Tr, class Inc > inline Triangulation_segment_cell_iterator_3& Triangulation_segment_cell_iterator_3::operator++() { - using CGAL::cpp11::get; - CGAL_triangulation_precondition( get<0>(_cur) != Cell_handle() ); + CGAL_triangulation_precondition( std::get<0>(_cur) != Cell_handle() ); increment(); return *this; } @@ -166,8 +161,7 @@ inline typename Triangulation_segment_cell_iterator_3::Cell_handle Triangulation_segment_cell_iterator_3::complete() { while( has_next() ) increment(); - using CGAL::cpp11::get; - return get<0>(_prev); + return std::get<0>(_prev); } template < class Tr, class Inc > @@ -175,9 +169,8 @@ inline bool Triangulation_segment_cell_iterator_3:: operator==( const SCI& sci ) const { // To be equal, the iterators must traverse the same triangulations // and they must have the same current cell. - using CGAL::cpp11::get; return ( _tr == sci._tr && - get<0>(_cur) == get<0>(sci._cur) ); + std::get<0>(_cur) == std::get<0>(sci._cur) ); } template < class Tr, class Inc > @@ -190,8 +183,7 @@ template < class Tr, class Inc > inline bool Triangulation_segment_cell_iterator_3:: operator==( Nullptr_t CGAL_triangulation_assertion_code(n) ) const { CGAL_triangulation_assertion( n == NULL ); - using CGAL::cpp11::get; - return get<0>(_cur) == Cell_handle(); + return std::get<0>(_cur) == Cell_handle(); } template < class Tr, class Inc > @@ -205,7 +197,7 @@ void Triangulation_segment_cell_iterator_3:: jump_to_intersecting_cell() { //copy current simplex - Cell_handle ch = get<0>(_cur); + Cell_handle ch = std::get<0>(_cur); Locate_type lt; int li, lj; entry(lt, li, lj); @@ -223,25 +215,25 @@ jump_to_intersecting_cell() if (lt == Tr::VERTEX) { - get<0>(_cur) = new_ch; - //get<1>(_cur) is Locate_type and unchanged - get<2>(_cur) = new_ch->index(ch->vertex(li)); - //get<3>(_cur) is lj and unchanged - CGAL_assertion(get<0>(_cur)->vertex(get<2>(_cur)) == ch->vertex(li)); + std::get<0>(_cur) = new_ch; + //std::get<1>(_cur) is Locate_type and unchanged + std::get<2>(_cur) = new_ch->index(ch->vertex(li)); + //std::get<3>(_cur) is lj and unchanged + CGAL_assertion(std::get<0>(_cur)->vertex(std::get<2>(_cur)) == ch->vertex(li)); } else if (lt == Tr::EDGE) { - get<0>(_cur) = new_ch; - //get<1>(_cur) is Locate_type and unchanged - get<2>(_cur) = new_ch->index(ch->vertex(li)); - get<3>(_cur) = new_ch->index(ch->vertex(lj)); + std::get<0>(_cur) = new_ch; + //std::get<1>(_cur) is Locate_type and unchanged + std::get<2>(_cur) = new_ch->index(ch->vertex(li)); + std::get<3>(_cur) = new_ch->index(ch->vertex(lj)); } else { - get<0>(_cur) = new_ch; - //get<1>(_cur) is Locate_type and unchanged - get<2>(_cur) = new_ch->index(ch); - //get<3>(_cur) is lj and unchanged + std::get<0>(_cur) = new_ch; + //std::get<1>(_cur) is Locate_type and unchanged + std::get<2>(_cur) = new_ch->index(ch); + //std::get<3>(_cur) is lj and unchanged } } @@ -257,11 +249,10 @@ walk_to_next() { // Check if the target is in the current cell. int ti; - using CGAL::cpp11::get; - if( get<0>(_cur)->has_vertex( _t_vertex, ti ) ) { + if( std::get<0>(_cur)->has_vertex( _t_vertex, ti ) ) { // The target is inside the cell. - _prev = Simplex( get<0>(_cur), Tr::VERTEX, ti, -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, ti, -1 ); + std::get<0>(_cur) = Cell_handle(); return; } @@ -271,7 +262,7 @@ walk_to_next() { switch( _tr->dimension() ) { case 3: { // Infinite cells should be handled differently. - if( get<0>(_cur)->has_vertex( _tr->infinite_vertex(), inf ) ) + if( std::get<0>(_cur)->has_vertex( _tr->infinite_vertex(), inf ) ) walk_to_next_3_inf( inf ); else { @@ -281,14 +272,14 @@ walk_to_next() { _prev = p.first; _cur = p.second; - } while (get<0>(_cur) != Cell_handle()//end - && !get<0>(_cur)->has_vertex(_tr->infinite_vertex(), inf) + } while (std::get<0>(_cur) != Cell_handle()//end + && !std::get<0>(_cur)->has_vertex(_tr->infinite_vertex(), inf) && have_same_entry(backup, _cur)); } break; } case 2: { - if( get<0>(_cur)->has_vertex( _tr->infinite_vertex(), inf ) ) + if( std::get<0>(_cur)->has_vertex( _tr->infinite_vertex(), inf ) ) walk_to_next_2_inf( inf ); else walk_to_next_2(); @@ -298,7 +289,7 @@ walk_to_next() { #ifdef CGAL_TRIANGULATION_3_TRAVERSER_CHECK_INTERSECTION if(_tr->dimension() == 3) { - Cell_handle c = get<0>(_cur); + Cell_handle c = std::get<0>(_cur); if (c != Cell_handle() && !_tr->is_infinite(c)) //hard to say anything in this case { typename Tr::Segment seg(_source, _target); @@ -323,25 +314,24 @@ bool Triangulation_segment_cell_iterator_3:: have_same_entry(const Simplex& s1, const Simplex& s2) const { //type - using CGAL::cpp11::get; - if (get<1>(s1) != get<1>(s2)) + if (std::get<1>(s1) != std::get<1>(s2)) return false; - switch (get<1>(s1)) + switch (std::get<1>(s1)) { case Locate_type::VERTEX: - return get<0>(s1)->vertex(get<2>(s1)) == get<0>(s2)->vertex(get<2>(s2)); + return std::get<0>(s1)->vertex(std::get<2>(s1)) == std::get<0>(s2)->vertex(std::get<2>(s2)); case Locate_type::EDGE: { - Vertex_handle v1a = get<0>(s1)->vertex(get<2>(s1)); - Vertex_handle v1b = get<0>(s1)->vertex(get<3>(s1)); - Vertex_handle v2a = get<0>(s2)->vertex(get<2>(s2)); - Vertex_handle v2b = get<0>(s2)->vertex(get<3>(s2)); + Vertex_handle v1a = std::get<0>(s1)->vertex(std::get<2>(s1)); + Vertex_handle v1b = std::get<0>(s1)->vertex(std::get<3>(s1)); + Vertex_handle v2a = std::get<0>(s2)->vertex(std::get<2>(s2)); + Vertex_handle v2b = std::get<0>(s2)->vertex(std::get<3>(s2)); return (v1a == v2a && v1b == v2b) || (v1a == v2b && v1b == v2a); } case Locate_type::FACET: - return triangulation()->are_equal(Facet(get<0>(s1), get<2>(s1)), - Facet(get<0>(s2), get<2>(s2))); + return triangulation()->are_equal(Facet(std::get<0>(s1), std::get<2>(s1)), + Facet(std::get<0>(s2), std::get<2>(s2))); default: CGAL_assertion(false); }; @@ -354,19 +344,18 @@ std::pair::Simplex, Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& prev, const Simplex& cur) const { - using CGAL::cpp11::get; std::array vert - = {&(get<0>(cur)->vertex(0)->point()), - &(get<0>(cur)->vertex(1)->point()), - &(get<0>(cur)->vertex(2)->point()), - &(get<0>(cur)->vertex(3)->point()) }; + = {&(std::get<0>(cur)->vertex(0)->point()), + &(std::get<0>(cur)->vertex(1)->point()), + &(std::get<0>(cur)->vertex(2)->point()), + &(std::get<0>(cur)->vertex(3)->point()) }; int inside=0,outside=0,regular_case=0,degenerate=0; Cell_handle nnext; - if (get<1>(cur) == Tr::FACET) { + if (std::get<1>(cur) == Tr::FACET) { regular_case = 1; - int i = get<2>(cur); + int i = std::get<2>(cur); int j0 = Tr::vertex_triple_index(i, 0); int j1 = Tr::vertex_triple_index(i, 1); int j2 = Tr::vertex_triple_index(i, 2); @@ -375,7 +364,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre Orientation o1 = _tr->orientation(_source, *vert[i], *vert[j1], _target); if (o1 != POSITIVE) { if (_tr->orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { - nnext = get<0>(cur)->neighbor(j2); + nnext = std::get<0>(cur)->neighbor(j2); outside = j2; if (o1 == ZERO) degenerate = 1; //EDGE i j1 } @@ -384,7 +373,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre } else { if (_tr->orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { - nnext = get<0>(cur)->neighbor(j0); + nnext = std::get<0>(cur)->neighbor(j0); outside = j0; } else @@ -395,7 +384,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre Orientation o1 = _tr->orientation(_source, *vert[i], *vert[j1], _target); if (o1 == NEGATIVE) { if (_tr->orientation(*vert[i], *vert[j0], *vert[j1], _target) == POSITIVE) { - nnext = get<0>(cur)->neighbor(j2); //EDGE i j0 + nnext = std::get<0>(cur)->neighbor(j2); //EDGE i j0 degenerate = 2; outside = 44; } @@ -407,14 +396,14 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre inside = 55; else { - nnext = get<0>(cur)->neighbor(j2); //VERTEX i + nnext = std::get<0>(cur)->neighbor(j2); //VERTEX i degenerate = 3; outside = 5; } } else { if (_tr->orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { - nnext = get<0>(cur)->neighbor(j0); + nnext = std::get<0>(cur)->neighbor(j0); outside = j0; } else @@ -425,7 +414,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre Orientation o2 = _tr->orientation(_source, *vert[i], *vert[j2], _target); if (o2 != NEGATIVE) { if (_tr->orientation(*vert[i], *vert[j2], *vert[j0], _target) == POSITIVE) { - nnext = get<0>(cur)->neighbor(j1); + nnext = std::get<0>(cur)->neighbor(j1); outside = j1; if (o2 == ZERO) degenerate = 4; // EDGE i j2 } @@ -434,7 +423,7 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre } else { if (_tr->orientation(*vert[i], *vert[j1], *vert[j2], _target) == POSITIVE) { - nnext = get<0>(cur)->neighbor(j0); + nnext = std::get<0>(cur)->neighbor(j0); outside = j0; } else @@ -444,14 +433,14 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre if ((!degenerate) && (!inside)) { - Simplex prev_after_walk(get<0>(cur), Tr::FACET, outside, -1); - Simplex cur_after_walk( nnext, Tr::FACET, nnext->index(get<0>(cur)), -1); + Simplex prev_after_walk(std::get<0>(cur), Tr::FACET, outside, -1); + Simplex cur_after_walk( nnext, Tr::FACET, nnext->index(std::get<0>(cur)), -1); return std::make_pair(prev_after_walk, cur_after_walk); } if ((!degenerate) && inside) { - Simplex prev_after_walk(get<0>(cur), Tr::CELL, -1, -1); + Simplex prev_after_walk(std::get<0>(cur), Tr::CELL, -1, -1); Simplex cur_after_walk(Cell_handle(), Tr::OUTSIDE_AFFINE_HULL, -1, -1); return std::make_pair(prev_after_walk, cur_after_walk); } @@ -467,19 +456,19 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre // We keep track of which orientations are calculated. bool calc[6] = { false, false, false, false, false, false }; - if( get<1>(cur) == Tr::VERTEX ) { + if( std::get<1>(cur) == Tr::VERTEX ) { // The three planes through the vertex are set to coplanar. for( int j = 0; j < 4; ++j ) { - if( get<2>(cur) != j ) { - int ij = edgeIndex( get<2>(cur), j ); + if( std::get<2>(cur) != j ) { + int ij = edgeIndex( std::get<2>(cur), j ); o[ij] = COPLANAR; calc[ij] = true; } } } - else if( get<1>(cur) == Tr::EDGE ) { + else if( std::get<1>(cur) == Tr::EDGE ) { // The plane through the edge is set to coplanar. - int ij = edgeIndex( get<2>(cur), get<3>(cur) ); + int ij = edgeIndex( std::get<2>(cur), std::get<3>(cur) ); o[ij] = COPLANAR; calc[ij] = true; } @@ -490,8 +479,8 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre for( int k = 0; k < 4; ++k, ++li ) { // Skip the previous cell. - Cell_handle next = get<0>(cur)->neighbor(li); - if( next == get<0>(prev) ) + Cell_handle next = std::get<0>(cur)->neighbor(li); + if( next == std::get<0>(prev) ) { op[li] = POSITIVE; pos += li; @@ -559,18 +548,18 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre Simplex prev_after_walk; Simplex cur_after_walk; - get<0>(prev_after_walk) = get<0>(cur); - get<0>(cur_after_walk) = next; + std::get<0>(prev_after_walk) = std::get<0>(cur); + std::get<0>(cur_after_walk) = next; switch( Or ) { case 3: - get<1>(prev_after_walk) = Tr::FACET; - get<2>(prev_after_walk) = li; - get<1>(cur_after_walk) = Tr::FACET; - get<2>(cur_after_walk) = get<0>(cur_after_walk)->index(get<0>(prev_after_walk)); + std::get<1>(prev_after_walk) = Tr::FACET; + std::get<2>(prev_after_walk) = li; + std::get<1>(cur_after_walk) = Tr::FACET; + std::get<2>(cur_after_walk) = std::get<0>(cur_after_walk)->index(std::get<0>(prev_after_walk)); if(regular_case) { - CGAL_triangulation_assertion( get<0>(cur_after_walk)==nnext ); + CGAL_triangulation_assertion( std::get<0>(cur_after_walk)==nnext ); CGAL_triangulation_assertion( li==outside ); CGAL_triangulation_assertion( ! inside ); } @@ -580,19 +569,19 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre if(regular_case) CGAL_triangulation_assertion(degenerate ); - get<1>(prev_after_walk) = Tr::EDGE; - get<1>(cur_after_walk) = Tr::EDGE; + std::get<1>(prev_after_walk) = Tr::EDGE; + std::get<1>(cur_after_walk) = Tr::EDGE; for( int j = 0; j < 4; ++j ) { if( li != j && o[ 5 - edgeIndex(li, j) ] == COPLANAR) { - Edge opp = opposite_edge( get<0>(prev), li, j ); - get<2>(prev_after_walk) = opp.second; - get<3>(prev_after_walk) = opp.third; - get<2>(cur_after_walk) - = get<0>(cur_after_walk)->index( - get<0>(prev_after_walk)->vertex( get<2>(prev_after_walk) ) ); - get<3>(cur_after_walk) - = get<0>(cur_after_walk)->index( - get<0>(prev_after_walk)->vertex( get<3>(prev_after_walk) ) ); + Edge opp = opposite_edge( std::get<0>(prev), li, j ); + std::get<2>(prev_after_walk) = opp.second; + std::get<3>(prev_after_walk) = opp.third; + std::get<2>(cur_after_walk) + = std::get<0>(cur_after_walk)->index( + std::get<0>(prev_after_walk)->vertex( std::get<2>(prev_after_walk) ) ); + std::get<3>(cur_after_walk) + = std::get<0>(cur_after_walk)->index( + std::get<0>(prev_after_walk)->vertex( std::get<3>(prev_after_walk) ) ); return std::make_pair(prev_after_walk, cur_after_walk); } @@ -603,14 +592,14 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre if(regular_case) CGAL_triangulation_assertion(degenerate ); - get<1>(prev_after_walk) = Tr::VERTEX; - get<1>(cur_after_walk) = Tr::VERTEX; + std::get<1>(prev_after_walk) = Tr::VERTEX; + std::get<1>(cur_after_walk) = Tr::VERTEX; for( int j = 0; j < 4; ++j ) { if( li != j && o[ 5 - edgeIndex(li, j) ] == NEGATIVE ) { - get<2>(prev_after_walk) = j; - get<2>(cur_after_walk) - = get<0>(cur_after_walk)->index( - get<0>(prev_after_walk)->vertex(j) ); + std::get<2>(prev_after_walk) = j; + std::get<2>(cur_after_walk) + = std::get<0>(cur_after_walk)->index( + std::get<0>(prev_after_walk)->vertex(j) ); return std::make_pair(prev_after_walk, cur_after_walk); } @@ -629,26 +618,26 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre switch( op[0] + op[1] + op[2] + op[3] ) { case 4: CGAL_triangulation_assertion( pos == 6 ); - prev_after_walk = Simplex( get<0>(cur), Tr::CELL, -1, -1 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::CELL, -1, -1 ); CGAL_triangulation_assertion( (! regular_case) || inside ); break; case 3: - prev_after_walk = Simplex( get<0>(cur), Tr::FACET, 6-pos, -1 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::FACET, 6-pos, -1 ); break; case 2: if( pos < 3 ) - prev_after_walk = Simplex( get<0>(cur), Tr::EDGE, 0, pos+1 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::EDGE, 0, pos+1 ); else if( pos < 5 ) - prev_after_walk = Simplex( get<0>(cur), Tr::EDGE, 1, pos-1 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::EDGE, 1, pos-1 ); else - prev_after_walk = Simplex( get<0>(cur), Tr::EDGE, 2, 3 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::EDGE, 2, 3 ); break; case 1: - prev_after_walk = Simplex( get<0>(cur), Tr::VERTEX, pos, -1 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::VERTEX, pos, -1 ); break; default: - prev_after_walk = Simplex( get<0>(cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); + prev_after_walk = Simplex( std::get<0>(cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); CGAL_triangulation_assertion( false ); } @@ -658,22 +647,22 @@ Triangulation_segment_cell_iterator_3::walk_to_next_3(const Simplex& pre template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: -walk_to_next_3_inf( int inf ) { - using CGAL::cpp11::get; - CGAL_triangulation_precondition( _tr->is_infinite( get<0>(_cur)->vertex(inf) ) ); +walk_to_next_3_inf( int inf ) +{ + CGAL_triangulation_precondition( _tr->is_infinite( std::get<0>(_cur)->vertex(inf) ) ); // If this cell was reached by traversal from a finite one, it must be the final cell. - Cell_handle fin = get<0>(_cur)->neighbor(inf); - if( fin == get<0>(_prev) ) { + Cell_handle fin = std::get<0>(_cur)->neighbor(inf); + if( fin == std::get<0>(_prev) ) { _prev = _cur; - get<0>(_cur) = Cell_handle(); + std::get<0>(_cur) = Cell_handle(); return; } std::array < Point*, 4> vert; for( int i = 0; i != 4; ++i ) if( i != inf ) - vert[i] = &(get<0>(_cur)->vertex(i)->point()); + vert[i] = &(std::get<0>(_cur)->vertex(i)->point()); vert[inf] = &_target; Orientation o[4]; @@ -681,8 +670,8 @@ walk_to_next_3_inf( int inf ) { if( _tr->orientation( *vert[0], *vert[1], *vert[2], *vert[3] ) == POSITIVE ) { // The target lies in an infinite cell. // Note that we do not traverse to other infinite cells. - _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); + std::get<0>(_cur) = Cell_handle(); return; } @@ -700,8 +689,8 @@ walk_to_next_3_inf( int inf ) { } // Skip the previous cell. - Cell_handle next = get<0>(_cur)->neighbor(li); - if( next == get<0>(_prev) ) { + Cell_handle next = std::get<0>(_cur)->neighbor(li); + if( next == std::get<0>(_prev) ) { o[li] = POSITIVE; continue; } @@ -718,45 +707,45 @@ walk_to_next_3_inf( int inf ) { // The target lies behind the plane through the source and two finite vertices. // Traverse to the incident infinite cell. CGAL_triangulation_assertion( _tr->is_infinite( next ) ); - _prev = Simplex( get<0>(_cur), Tr::FACET, li, -1 ); - _cur = Simplex( next, Tr::FACET, next->index( get<0>(_prev) ), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::FACET, li, -1 ); + _cur = Simplex( next, Tr::FACET, next->index( std::get<0>(_prev) ), -1 ); return; } // The line enters the convex hull here (or lies on the finite facet). - get<0>(_prev) = get<0>(_cur); - get<0>(_cur) = fin; + std::get<0>(_prev) = std::get<0>(_cur); + std::get<0>(_cur) = fin; // Check through which simplex the line traverses. switch( o[0]+o[1]+o[2]+o[3] ) { case 3: - get<1>(_prev) = Tr::FACET; - get<2>(_prev) = inf; - get<1>(_cur) = Tr::FACET; - get<2>(_cur) = get<0>(_cur)->index(get<0>(_prev)); + std::get<1>(_prev) = Tr::FACET; + std::get<2>(_prev) = inf; + std::get<1>(_cur) = Tr::FACET; + std::get<2>(_cur) = std::get<0>(_cur)->index(std::get<0>(_prev)); return; case 2: - get<1>(_prev) = Tr::EDGE; - get<1>(_cur) = Tr::EDGE; + std::get<1>(_prev) = Tr::EDGE; + std::get<1>(_cur) = Tr::EDGE; for( int i = 0; i < 4; ++i ) { if( o[i] == COPLANAR && i != inf ) { - Edge opp = opposite_edge( get<0>(_prev), inf, i ); - get<2>(_prev) = opp.second; - get<3>(_prev) = opp.third; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<3>(_prev) ) ); + Edge opp = opposite_edge( std::get<0>(_prev), inf, i ); + std::get<2>(_prev) = opp.second; + std::get<3>(_prev) = opp.third; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ); return; } } CGAL_triangulation_assertion( false ); return; case 1: - get<1>(_prev) = Tr::VERTEX; - get<1>(_cur) = Tr::VERTEX; + std::get<1>(_prev) = Tr::VERTEX; + std::get<1>(_cur) = Tr::VERTEX; for( int i = 0; i < 4; ++i ) { if( o[i] == POSITIVE ) { - get<2>(_prev) = i; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(i) ); + std::get<2>(_prev) = i; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(i) ); return; } } @@ -772,54 +761,53 @@ template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: walk_to_next_2() { - using CGAL::cpp11::get; std::array vert - = { &(get<0>(_cur)->vertex(0)->point()), - &(get<0>(_cur)->vertex(1)->point()), - &(get<0>(_cur)->vertex(2)->point()) }; + = { &(std::get<0>(_cur)->vertex(0)->point()), + &(std::get<0>(_cur)->vertex(1)->point()), + &(std::get<0>(_cur)->vertex(2)->point()) }; - switch( get<1>(_cur) ) { + switch( std::get<1>(_cur) ) { case Tr::VERTEX: { // First we try the incident edges. - Orientation ocw = CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[_tr->cw(get<2>(_cur))], *vert[_tr->ccw(get<2>(_cur))], _target ); - if( get<0>(_cur)->neighbor( _tr->ccw(get<2>(_cur)) ) != get<0>(_prev) && ocw == NEGATIVE) { - Cell_handle tmp = get<0>(_cur)->neighbor( _tr->ccw(get<2>(_cur)) ); + Orientation ocw = CGAL::coplanar_orientation( *vert[std::get<2>(_cur)], *vert[_tr->cw(std::get<2>(_cur))], *vert[_tr->ccw(std::get<2>(_cur))], _target ); + if( std::get<0>(_cur)->neighbor( _tr->ccw(std::get<2>(_cur)) ) != std::get<0>(_prev) && ocw == NEGATIVE) { + Cell_handle tmp = std::get<0>(_cur)->neighbor( _tr->ccw(std::get<2>(_cur)) ); _prev = _cur; - get<0>(_cur) = tmp; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<2>(_cur)) ); + std::get<0>(_cur) = tmp; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(std::get<2>(_cur)) ); return; } - Orientation occw = CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[_tr->ccw(get<2>(_cur))], *vert[_tr->cw(get<2>(_cur))], _target ); - if( get<0>(_cur)->neighbor( _tr->cw(get<2>(_cur)) ) != get<0>(_prev) && occw == NEGATIVE) { - Cell_handle tmp = get<0>(_cur)->neighbor( _tr->cw(get<2>(_cur)) ); + Orientation occw = CGAL::coplanar_orientation( *vert[std::get<2>(_cur)], *vert[_tr->ccw(std::get<2>(_cur))], *vert[_tr->cw(std::get<2>(_cur))], _target ); + if( std::get<0>(_cur)->neighbor( _tr->cw(std::get<2>(_cur)) ) != std::get<0>(_prev) && occw == NEGATIVE) { + Cell_handle tmp = std::get<0>(_cur)->neighbor( _tr->cw(std::get<2>(_cur)) ); _prev = _cur; - get<0>(_cur) = tmp; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<2>(_cur)) ); + std::get<0>(_cur) = tmp; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(std::get<2>(_cur)) ); return; } // Then we try the opposite edge. - Orientation op = CGAL::coplanar_orientation( *vert[_tr->ccw(get<2>(_cur))], *vert[_tr->cw(get<2>(_cur))], *vert[get<2>(_cur)], _target ); + Orientation op = CGAL::coplanar_orientation( *vert[_tr->ccw(std::get<2>(_cur))], *vert[_tr->cw(std::get<2>(_cur))], *vert[std::get<2>(_cur)], _target ); if( op == NEGATIVE) { - Cell_handle tmp = get<0>(_cur)->neighbor(get<2>(_cur)); - get<0>(_prev) = get<0>(_cur); - get<0>(_cur) = tmp; + Cell_handle tmp = std::get<0>(_cur)->neighbor(std::get<2>(_cur)); + std::get<0>(_prev) = std::get<0>(_cur); + std::get<0>(_cur) = tmp; switch( ocw+occw ) { case 2: - get<1>(_prev) = Tr::EDGE; - get<2>(_prev) = _tr->ccw( get<2>(_cur) ); - get<3>(_prev) = _tr->cw( get<2>(_cur) ); - get<1>(_cur) = Tr::EDGE; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<3>(_prev) ) ); + std::get<1>(_prev) = Tr::EDGE; + std::get<2>(_prev) = _tr->ccw( std::get<2>(_cur) ); + std::get<3>(_prev) = _tr->cw( std::get<2>(_cur) ); + std::get<1>(_cur) = Tr::EDGE; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ); return; case 1: - get<1>(_prev) = Tr::VERTEX; - get<1>(_cur) = Tr::VERTEX; - if( ocw == COLLINEAR ) get<2>(_prev) = _tr->cw( get<2>(_cur) ); - else get<2>(_cur) = _tr->ccw( get<2>(_cur) ); - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + std::get<1>(_prev) = Tr::VERTEX; + std::get<1>(_cur) = Tr::VERTEX; + if( ocw == COLLINEAR ) std::get<2>(_prev) = _tr->cw( std::get<2>(_cur) ); + else std::get<2>(_cur) = _tr->ccw( std::get<2>(_cur) ); + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); return; default: // The current vertex is the target. @@ -831,49 +819,49 @@ walk_to_next_2() // The target lies in this cell. switch( ocw+occw+op ) { case 3: - _prev = Simplex( get<0>(_cur), Tr::FACET, 3, -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::FACET, 3, -1 ); break; case 2: if( ocw == 0 ) - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->ccw(get<2>(_cur)), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->ccw(std::get<2>(_cur)), -1 ); else if( occw == 0 ) - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->cw(get<2>(_cur)), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->cw(std::get<2>(_cur)), -1 ); else - _prev = Simplex( get<0>(_cur), Tr::EDGE, get<2>(_cur), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, std::get<2>(_cur), -1 ); break; case 1: if( ocw == 1 ) - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->ccw(get<2>(_cur)), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->ccw(std::get<2>(_cur)), -1 ); else if( occw == 1 ) - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->cw(get<2>(_cur)), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->cw(std::get<2>(_cur)), -1 ); else - _prev = Simplex( get<0>(_cur), Tr::VERTEX, get<2>(_cur), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, std::get<2>(_cur), -1 ); break; case 0: CGAL_triangulation_assertion(false); - _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::OUTSIDE_AFFINE_HULL, -1, -1 ); break; } - get<0>(_cur) = Cell_handle(); + std::get<0>(_cur) = Cell_handle(); return; } case Tr::EDGE: { - int lk = 3 - get<2>(_cur) - get<3>(_cur); + int lk = 3 - std::get<2>(_cur) - std::get<3>(_cur); - if( get<0>(_cur)->neighbor(lk) != get<0>(_prev) ) { + if( std::get<0>(_cur)->neighbor(lk) != std::get<0>(_prev) ) { // Check the edge itself - switch( CGAL::coplanar_orientation( *vert[get<2>(_cur)], *vert[get<3>(_cur)], *vert[lk], _target ) ) { + switch( CGAL::coplanar_orientation( *vert[std::get<2>(_cur)], *vert[std::get<3>(_cur)], *vert[lk], _target ) ) { //_prev = _cur; //code not reached case COLLINEAR: // The target lies in this cell. - get<0>(_cur) = Cell_handle(); + std::get<0>(_cur) = Cell_handle(); return; case NEGATIVE: { // The target lies opposite of the edge. - Cell_handle tmp = get<0>(_cur)->neighbor(lk); - get<0>(_cur) = tmp; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<2>(_cur)) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex(get<3>(_cur)) ); + Cell_handle tmp = std::get<0>(_cur)->neighbor(lk); + std::get<0>(_cur) = tmp; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(std::get<2>(_cur)) ); + std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex(std::get<3>(_cur)) ); return; } default: @@ -881,30 +869,30 @@ walk_to_next_2() } } - Orientation o = CGAL::coplanar_orientation( _source, *vert[lk], *vert[get<2>(_cur)], _target ); + Orientation o = CGAL::coplanar_orientation( _source, *vert[lk], *vert[std::get<2>(_cur)], _target ); Orientation op; switch( o ) { case POSITIVE: { // The ray passes through the edge ik. - op = CGAL::coplanar_orientation( *vert[lk], *vert[get<2>(_cur)], _source, _target ); + op = CGAL::coplanar_orientation( *vert[lk], *vert[std::get<2>(_cur)], _source, _target ); if( op == NEGATIVE ) { - Cell_handle tmp = get<0>(_cur)->neighbor(get<3>(_cur)); - get<0>(_prev) = get<0>(_cur); - get<0>(_cur) = tmp; + Cell_handle tmp = std::get<0>(_cur)->neighbor(std::get<3>(_cur)); + std::get<0>(_prev) = std::get<0>(_cur); + std::get<0>(_cur) = tmp; - if( CGAL::collinear( _source, *vert[get<2>(_cur)], _target ) ) { - get<1>(_prev) = Tr::VERTEX; - get<2>(_prev) = get<2>(_cur); - get<1>(_cur) = Tr::VERTEX; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + if( CGAL::collinear( _source, *vert[std::get<2>(_cur)], _target ) ) { + std::get<1>(_prev) = Tr::VERTEX; + std::get<2>(_prev) = std::get<2>(_cur); + std::get<1>(_cur) = Tr::VERTEX; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); } else { - get<1>(_prev) = Tr::EDGE; - get<2>(_prev) = get<2>(_cur); - get<3>(_prev) = lk; - get<1>(_cur) = Tr::EDGE; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<3>(_prev) ) ); + std::get<1>(_prev) = Tr::EDGE; + std::get<2>(_prev) = std::get<2>(_cur); + std::get<3>(_prev) = lk; + std::get<1>(_cur) = Tr::EDGE; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ); } return; } @@ -912,31 +900,31 @@ walk_to_next_2() } default: { // The ray passes through the edge jk. - op = CGAL::coplanar_orientation( *vert[lk], *vert[get<3>(_cur)], _source, _target ); + op = CGAL::coplanar_orientation( *vert[lk], *vert[std::get<3>(_cur)], _source, _target ); if( op == NEGATIVE ) { - Cell_handle tmp = get<0>(_cur)->neighbor(get<2>(_cur)); - get<0>(_prev) = get<0>(_cur); - get<0>(_cur) = tmp; + Cell_handle tmp = std::get<0>(_cur)->neighbor(std::get<2>(_cur)); + std::get<0>(_prev) = std::get<0>(_cur); + std::get<0>(_cur) = tmp; - if( CGAL::collinear( _source, *vert[get<3>(_cur)], _target ) ) { - get<1>(_prev) = Tr::VERTEX; - get<2>(_prev) = get<3>(_cur); - get<1>(_cur) = Tr::VERTEX; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + if( CGAL::collinear( _source, *vert[std::get<3>(_cur)], _target ) ) { + std::get<1>(_prev) = Tr::VERTEX; + std::get<2>(_prev) = std::get<3>(_cur); + std::get<1>(_cur) = Tr::VERTEX; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); } else if( o == COLLINEAR ) { - get<1>(_prev) = Tr::VERTEX; - get<2>(_prev) = lk; - get<1>(_cur) = Tr::VERTEX; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + std::get<1>(_prev) = Tr::VERTEX; + std::get<2>(_prev) = lk; + std::get<1>(_cur) = Tr::VERTEX; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); } else { - get<1>(_prev) = Tr::EDGE; - get<2>(_prev) = lk; - get<3>(_prev) = get<3>(_cur); - get<1>(_cur) = Tr::EDGE; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + std::get<1>(_prev) = Tr::EDGE; + std::get<2>(_prev) = lk; + std::get<3>(_prev) = std::get<3>(_cur); + std::get<1>(_cur) = Tr::EDGE; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); + std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); } return; } @@ -946,22 +934,22 @@ walk_to_next_2() // The target lies in this cell. if( op == POSITIVE ) - _prev = Simplex( get<0>(_cur), Tr::FACET, 3, -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::FACET, 3, -1 ); else { CGAL_triangulation_assertion( op == ZERO ); switch( o ) { case POSITIVE: - _prev = Simplex( get<0>(_cur), Tr::EDGE, get<2>(_cur), lk ); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, std::get<2>(_cur), lk ); break; case NEGATIVE: - _prev = Simplex( get<0>(_cur), Tr::EDGE, get<3>(_cur), lk ); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, std::get<3>(_cur), lk ); break; case ZERO: - _prev = Simplex( get<0>(_cur), Tr::VERTEX, lk, -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, lk, -1 ); break; } } - get<0>(_cur) = Cell_handle(); + std::get<0>(_cur) = Cell_handle(); return; } case Tr::FACET: { @@ -971,8 +959,8 @@ walk_to_next_2() bool calc[3] = { false, false, false }; for( int j = 0; j != 3; ++j, li = _tr->ccw(li) ) { - Cell_handle next = get<0>(_cur)->neighbor(li); - if( next == get<0>(_prev) ) + Cell_handle next = std::get<0>(_cur)->neighbor(li); + if( next == std::get<0>(_prev) ) continue; // The target should lie on the other side of the edge. @@ -988,8 +976,8 @@ walk_to_next_2() if( o[_tr->ccw(li)] == NEGATIVE ) continue; else if( op == COLLINEAR && o[_tr->ccw(li)] == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->ccw(li), -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->ccw(li), -1 ); + std::get<0>(_cur) = Cell_handle(); return; } @@ -1000,29 +988,29 @@ walk_to_next_2() if( o[_tr->cw(li)] == POSITIVE ) continue; else if( op == COLLINEAR && o[_tr->cw(li)] == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->cw(li), -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->cw(li), -1 ); + std::get<0>(_cur) = Cell_handle(); return; } - get<0>(_prev) = get<0>(_cur); - get<0>(_cur) = next; + std::get<0>(_prev) = std::get<0>(_cur); + std::get<0>(_cur) = next; switch( o[_tr->ccw(li)] + o[_tr->cw(li)] ) { case 2: - get<1>(_prev) = Tr::EDGE; - get<2>(_prev) = _tr->ccw(li); - get<3>(_prev) = _tr->cw(li); - get<1>(_cur) = Tr::EDGE; - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( _tr->ccw(li) ) ); - get<3>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( _tr->cw(li) ) ); + std::get<1>(_prev) = Tr::EDGE; + std::get<2>(_prev) = _tr->ccw(li); + std::get<3>(_prev) = _tr->cw(li); + std::get<1>(_cur) = Tr::EDGE; + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( _tr->ccw(li) ) ); + std::get<3>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( _tr->cw(li) ) ); return; case 1: - get<1>(_prev) = Tr::VERTEX; - get<1>(_cur) = Tr::VERTEX; - if( o[_tr->ccw(li)] == COLLINEAR ) get<2>(_prev) = _tr->ccw(li); - else get<2>(_prev) = _tr->cw(li); - get<2>(_cur) = get<0>(_cur)->index( get<0>(_prev)->vertex( get<2>(_prev) ) ); + std::get<1>(_prev) = Tr::VERTEX; + std::get<1>(_cur) = Tr::VERTEX; + if( o[_tr->ccw(li)] == COLLINEAR ) std::get<2>(_prev) = _tr->ccw(li); + else std::get<2>(_prev) = _tr->cw(li); + std::get<2>(_cur) = std::get<0>(_cur)->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ); return; default: CGAL_triangulation_assertion( false ); @@ -1031,8 +1019,8 @@ walk_to_next_2() } // The target lies in this cell. - _prev = Simplex( get<0>(_cur), Tr::FACET, 3, -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::FACET, 3, -1 ); + std::get<0>(_cur) = Cell_handle(); return; } default: @@ -1042,77 +1030,77 @@ walk_to_next_2() template < class Tr, class Inc > void Triangulation_segment_cell_iterator_3:: -walk_to_next_2_inf( int inf ) { - using CGAL::cpp11::get; - CGAL_triangulation_precondition( _tr->is_infinite( get<0>(_cur)->vertex(3) ) ); - CGAL_triangulation_precondition( _tr->is_infinite( get<0>(_cur)->vertex(inf) ) ); - +walk_to_next_2_inf( int inf ) +{ + CGAL_triangulation_precondition( _tr->is_infinite( std::get<0>(_cur)->vertex(3) ) ); + CGAL_triangulation_precondition( _tr->is_infinite( std::get<0>(_cur)->vertex(inf) ) ); + // If this cell was reached by traversal from a finite one, it must be the final cell. - Cell_handle fin = get<0>(_cur)->neighbor(inf); - if (fin == get<0>(_prev)) { + Cell_handle fin = std::get<0>(_cur)->neighbor(inf); + if (fin == std::get<0>(_prev)) { _prev = _cur; - get<0>(_cur) = Cell_handle(); + std::get<0>(_cur) = Cell_handle(); return; } // Check the neighboring cells. Orientation occw = CGAL::coplanar_orientation( _source, - get<0>(_cur)->vertex( _tr->ccw(inf))->point(), - get<0>(_cur)->vertex(_tr->cw(inf))->point(), + std::get<0>(_cur)->vertex( _tr->ccw(inf))->point(), + std::get<0>(_cur)->vertex(_tr->cw(inf))->point(), _target ); if( occw == NEGATIVE ) { - Cell_handle tmp = get<0>(_cur)->neighbor(_tr->cw(inf)); - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->ccw(inf), inf ); - _cur = Simplex( tmp, Tr::EDGE, tmp->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), tmp->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); + Cell_handle tmp = std::get<0>(_cur)->neighbor(_tr->cw(inf)); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->ccw(inf), inf ); + _cur = Simplex( tmp, Tr::EDGE, tmp->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), tmp->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ) ); return; } Orientation ocw = CGAL::coplanar_orientation( _source, - get<0>(_cur)->vertex( _tr->cw(inf))->point(), - get<0>(_cur)->vertex(_tr->ccw(inf))->point(), + std::get<0>(_cur)->vertex( _tr->cw(inf))->point(), + std::get<0>(_cur)->vertex(_tr->ccw(inf))->point(), _target ); if( ocw == NEGATIVE ) { - Cell_handle tmp = get<0>(_cur)->neighbor(_tr->ccw(inf)); - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->cw(inf), inf ); - _cur = Simplex( tmp, Tr::EDGE, tmp->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), tmp->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); + Cell_handle tmp = std::get<0>(_cur)->neighbor(_tr->ccw(inf)); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->cw(inf), inf ); + _cur = Simplex( tmp, Tr::EDGE, tmp->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), tmp->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ) ); return; } Orientation op = CGAL::coplanar_orientation( - get<0>(_cur)->vertex( _tr->ccw(inf) )->point(), - get<0>(_cur)->vertex( _tr->cw(inf) )->point(), + std::get<0>(_cur)->vertex( _tr->ccw(inf) )->point(), + std::get<0>(_cur)->vertex( _tr->cw(inf) )->point(), _source, _target ); switch( op ) { case NEGATIVE: if( occw == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->ccw(inf), -1 ); - _cur = Simplex( fin, Tr::VERTEX, fin->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->ccw(inf), -1 ); + _cur = Simplex( fin, Tr::VERTEX, fin->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), -1 ); return; } if( ocw == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->cw(inf), -1 ); - _cur = Simplex( fin, Tr::VERTEX, fin->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), -1 ); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->cw(inf), -1 ); + _cur = Simplex( fin, Tr::VERTEX, fin->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), -1 ); return; } - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); - _cur = Simplex( fin, Tr::EDGE, fin->index( get<0>(_prev)->vertex( get<2>(_prev) ) ), fin->index( get<0>(_prev)->vertex( get<3>(_prev) ) ) ); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); + _cur = Simplex( fin, Tr::EDGE, fin->index( std::get<0>(_prev)->vertex( std::get<2>(_prev) ) ), fin->index( std::get<0>(_prev)->vertex( std::get<3>(_prev) ) ) ); return; case COLLINEAR: if( occw == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->ccw(inf), -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->ccw(inf), -1 ); + std::get<0>(_cur) = Cell_handle(); return; } if( ocw == COLLINEAR ) { - _prev = Simplex( get<0>(_cur), Tr::VERTEX, _tr->cw(inf), -1 ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::VERTEX, _tr->cw(inf), -1 ); + std::get<0>(_cur) = Cell_handle(); return; } - _prev = Simplex( get<0>(_cur), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); - get<0>(_cur) = Cell_handle(); + _prev = Simplex( std::get<0>(_cur), Tr::EDGE, _tr->ccw(inf), _tr->cw(inf) ); + std::get<0>(_cur) = Cell_handle(); return; case POSITIVE: - // The target lies in this infinite cell. - _prev = Simplex( get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); - get<0>(_cur) = Cell_handle(); + // The tarstd::std::get lies in this infinite cell. + _prev = Simplex( std::get<0>(_cur), Tr::OUTSIDE_CONVEX_HULL, -1, -1 ); + std::get<0>(_cur) = Cell_handle(); return; } }