diff --git a/STL_Extension/include/CGAL/Nested_iterator.h b/STL_Extension/include/CGAL/Nested_iterator.h index c587f55858c..c0209107baa 100644 --- a/STL_Extension/include/CGAL/Nested_iterator.h +++ b/STL_Extension/include/CGAL/Nested_iterator.h @@ -84,11 +84,6 @@ namespace CGALi { } -template class Nested_iterator; - -template -bool operator==(const Nested_iterator&, - const Nested_iterator&); template > @@ -200,8 +195,20 @@ public: return nested_it_.operator->(); } - friend bool operator==<>(const Self&, const Self&); + bool operator==(const Self& it2) const + { + // CGAL_precondition( it1.b_ == it2.b_ && it1.e_ == it2.e_ ); + + if ( this->base() != it2.base() ) { return false; } + return this->is_end() || ( this->nested_it_ == it2.nested_it_ ); + } + + bool operator!=(const Self& it2) const + { + return !(*this == it2); + } + protected: void copy_from(const Self& other) { @@ -216,29 +223,6 @@ protected: }; - - - -template -inline -bool operator==(const Nested_iterator& it1, - const Nested_iterator& it2) -{ - // CGAL_precondition( it1.b_ == it2.b_ && it1.e_ == it2.e_ ); - - if ( it1.base() != it2.base() ) { return false; } - return it1.is_end() || ( it1.nested_it_ == it2.nested_it_ ); -} - -template -inline -bool operator!=(const Nested_iterator& it1, - const Nested_iterator& it2) -{ - return !(it1 == it2); -} - - CGAL_END_NAMESPACE #endif // CGAL_NESTED_ITERATOR_H