aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetLib
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2008-09-05 07:50:37 -0400
committerErik Schnetter <schnetter@cct.lsu.edu>2008-09-05 07:50:37 -0400
commit6b151d8ad34740171ec4ba62ceaf918422aa62f4 (patch)
treef958301e942bf04b701eebebaac46b14438fc3b3 /Carpet/CarpetLib
parent7017c2bc4aed35fef9db3c20c3990873096ba42d (diff)
CarpetLib: Simplify fulltree API to avoid problems with PGI compiler
Diffstat (limited to 'Carpet/CarpetLib')
-rw-r--r--Carpet/CarpetLib/src/fulltree.cc2
-rw-r--r--Carpet/CarpetLib/src/fulltree.hh9
2 files changed, 9 insertions, 2 deletions
diff --git a/Carpet/CarpetLib/src/fulltree.cc b/Carpet/CarpetLib/src/fulltree.cc
index 2687a5b61..0318cb83c 100644
--- a/Carpet/CarpetLib/src/fulltree.cc
+++ b/Carpet/CarpetLib/src/fulltree.cc
@@ -315,7 +315,7 @@ fulltree<T,D,P>::iterator::~iterator ()
template <typename T, int D, typename P>
fulltree<T,D,P> &
-fulltree<T,D,P>::iterator::operator* ()
+fulltree<T,D,P>::iterator::operator* () const
{
assert (not done());
assert (not f.empty());
diff --git a/Carpet/CarpetLib/src/fulltree.hh b/Carpet/CarpetLib/src/fulltree.hh
index e0c55fbfa..d8869a919 100644
--- a/Carpet/CarpetLib/src/fulltree.hh
+++ b/Carpet/CarpetLib/src/fulltree.hh
@@ -127,7 +127,7 @@ public:
iterator (fulltree & f_);
iterator (fulltree & f_, int);
~iterator ();
- fulltree & operator* ();
+ fulltree & operator* () const;
bool operator== (iterator const & it2) const;
bool operator!= (iterator const & it2) const
{ return not (*this == it2); }
@@ -135,6 +135,12 @@ public:
bool done () const;
};
+#if 0
+ // ES 2008-09-04:
+ // It seems that PGI does not handle comparisons to end() correctly.
+ // We therefore disable these; please use the iterators'
+ // constructors and their done() methods instead.
+
const_iterator begin() const
{ return const_iterator (*this); }
@@ -146,6 +152,7 @@ public:
iterator end()
{ return iterator (*this, 0); }
+#endif
// Memory usage
size_t memory () const;