diff options
author | David <david@xagasoft.com> | 2009-02-24 20:57:05 +0000 |
---|---|---|
committer | David <david@xagasoft.com> | 2009-02-24 20:57:05 +0000 |
commit | e198e10ffd710e9681635593dff65bf4abd45bda (patch) | |
tree | e03f40c7ea68ef646d32caa85326733a99e47c8f /src/fbasicstring.h | |
parent | bbc76396d899e6b59ce17643095c8d48f7083662 (diff) | |
download | libbu++-e198e10ffd710e9681635593dff65bf4abd45bda.tar.gz libbu++-e198e10ffd710e9681635593dff65bf4abd45bda.tar.bz2 libbu++-e198e10ffd710e9681635593dff65bf4abd45bda.tar.xz libbu++-e198e10ffd710e9681635593dff65bf4abd45bda.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/fbasicstring.h | 8 |
1 files changed, 6 insertions, 2 deletions
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 | |||
124 | } | 124 | } |
125 | 125 | ||
126 | struct iterator; | 126 | struct iterator; |
127 | typedef struct const_iterator | 127 | struct const_iterator |
128 | { | 128 | { |
129 | friend class FBasicString<chr, nMinSize, chralloc, chunkalloc>; | 129 | friend class FBasicString<chr, nMinSize, chralloc, chunkalloc>; |
130 | friend struct iterator; | ||
130 | private: | 131 | private: |
131 | const_iterator( Chunk *pChunk, int iPos ) : | 132 | const_iterator( Chunk *pChunk, int iPos ) : |
132 | pChunk( pChunk ), | 133 | pChunk( pChunk ), |
@@ -349,11 +350,12 @@ namespace Bu | |||
349 | } | 350 | } |
350 | return const_iterator( NULL, 0 ); | 351 | return const_iterator( NULL, 0 ); |
351 | } | 352 | } |
352 | } const_iterator; | 353 | }; |
353 | 354 | ||
354 | typedef struct iterator | 355 | typedef struct iterator |
355 | { | 356 | { |
356 | friend class FBasicString<chr, nMinSize, chralloc, chunkalloc>; | 357 | friend class FBasicString<chr, nMinSize, chralloc, chunkalloc>; |
358 | friend struct const_iterator; | ||
357 | private: | 359 | private: |
358 | iterator( Chunk *pChunk, int iPos ) : | 360 | iterator( Chunk *pChunk, int iPos ) : |
359 | pChunk( pChunk ), | 361 | pChunk( pChunk ), |
@@ -590,6 +592,8 @@ namespace Bu | |||
590 | } | 592 | } |
591 | } iterator; | 593 | } iterator; |
592 | 594 | ||
595 | typedef struct const_iterator const_iterator; | ||
596 | |||
593 | //typedef chr *iterator; | 597 | //typedef chr *iterator; |
594 | // typedef const chr *const_iterator; | 598 | // typedef const chr *const_iterator; |
595 | // typedef iterator const_iterator; | 599 | // typedef iterator const_iterator; |