From edaa4a042237477fa38ddb2957c3a41888730633 Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Fri, 14 Aug 2009 17:18:03 +0000 Subject: MIPSpro compilation fixes / workarounds (from a patch by Rainer Canavan) The hashmap.h change is ugly, but so far the only thing found to work. Suggestions for a better "fix" appreciated! svn-id: r43380 --- common/hashmap.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'common') diff --git a/common/hashmap.h b/common/hashmap.h index f5059a4bcf..2a50bff07a 100644 --- a/common/hashmap.h +++ b/common/hashmap.h @@ -39,6 +39,13 @@ #endif namespace Common { +/** + * The sgi IRIX MIPSpro Compiler has difficulties with nested templates. + * This and the other __sgi conditionals below work around these problems. + */ +#ifdef __sgi +template class IteratorImpl; +#endif // Enable the following #define if you want to check how many collisions the // code produces (many collisions indicate either a bad hash function, or a @@ -125,7 +132,9 @@ public: int lookupAndCreateIfMissing(const Key &key); void expandStorage(uint newCapacity); +#ifndef __sgi template friend class IteratorImpl; +#endif /** * Simple HashMap iterator implementation. @@ -133,7 +142,11 @@ public: template class IteratorImpl { friend class HashMap; +#ifdef __sgi + template friend class Common::IteratorImpl; +#else template friend class IteratorImpl; +#endif protected: typedef const HashMap hashmap_t; -- cgit v1.2.3