From af1236880a0388d52c10e3b2470cece030cf4884 Mon Sep 17 00:00:00 2001 From: wolf Date: Fri, 7 May 1999 11:29:14 +0000 Subject: [PATCH] Finally fix kind'o very strange problem, which made the compiler choose a global comparison operator over a member function one. Don't know what happened here, but as soon as we use the member one explicitely, everything works and we are able to make these operators protected again. git-svn-id: https://svn.dealii.org/trunk@1296 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/include/grid/tria_accessor.h | 31 ++++++++++--------- .../include/grid/tria_iterator.templates.h | 2 +- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/deal.II/deal.II/include/grid/tria_accessor.h b/deal.II/deal.II/include/grid/tria_accessor.h index a38f7bc9f5..25d6a99546 100644 --- a/deal.II/deal.II/include/grid/tria_accessor.h +++ b/deal.II/deal.II/include/grid/tria_accessor.h @@ -97,33 +97,36 @@ class TriaAccessor { */ TriaAccessor &operator = (const TriaAccessor &); - public: + protected: + /** * Compare for equality. - * - * This method should be protected, - * since it is only to be called from - * the iterator class. Due to problems - * with the STL, we have to make it - * public, so don't use it from - * non-friend classes! */ bool operator == (const TriaAccessor &) const; /** * Compare for inequality. * - * This method should be protected, - * since it is only to be called from - * the iterator class. Due to problems - * with the STL, we have to make it - * public, so don't use it from - * non-friend classes! + * Note that at times, there is a problem + * with egcs 1.1 that makes it choose + * the global STL operator != (which + * does only !(a==b)) over this + * one, which then results in an + * error because the operator == is + * not made public. Strange... */ bool operator != (const TriaAccessor &) const; public: + /** + * Data type to be used for passing + * parameters from iterators to the + * accessor classes in a unified + * way, no matter what the type of + * number of these parameters is. + */ typedef void* LocalData; + /**@ name Iterator address and state */ /*@{*/ diff --git a/deal.II/deal.II/include/grid/tria_iterator.templates.h b/deal.II/deal.II/include/grid/tria_iterator.templates.h index a70ed1a0df..6a336cf869 100644 --- a/deal.II/deal.II/include/grid/tria_iterator.templates.h +++ b/deal.II/deal.II/include/grid/tria_iterator.templates.h @@ -67,7 +67,7 @@ template inline bool TriaRawIterator::operator != (const TriaRawIterator &i) const { - return accessor != i.accessor; + return accessor.operator != (i.accessor); }; -- 2.39.5