From e198e10ffd710e9681635593dff65bf4abd45bda Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Feb 2009 20:57:05 +0000 Subject: david - apparently the mingw compiler has a couple issues... 1) i had to make iterator and const_iterator friends of each other so they could see each other's private constructors 2) apparently there is a bug in the name-lookup related to inline typedef structs and the friend keyword... had to move the typedef struct const_iterator to after the actual struct. --- src/fbasicstring.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/fbasicstring.h b/src/fbasicstring.h index 8bbbe91..cac7dd7 100644 --- a/src/fbasicstring.h +++ b/src/fbasicstring.h @@ -124,9 +124,10 @@ namespace Bu } struct iterator; - typedef struct const_iterator + struct const_iterator { friend class FBasicString; + friend struct iterator; private: const_iterator( Chunk *pChunk, int iPos ) : pChunk( pChunk ), @@ -349,11 +350,12 @@ namespace Bu } return const_iterator( NULL, 0 ); } - } const_iterator; + }; typedef struct iterator { friend class FBasicString; + friend struct const_iterator; private: iterator( Chunk *pChunk, int iPos ) : pChunk( pChunk ), @@ -590,6 +592,8 @@ namespace Bu } } iterator; + typedef struct const_iterator const_iterator; + //typedef chr *iterator; // typedef const chr *const_iterator; // typedef iterator const_iterator; -- cgit v1.2.3