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 | |
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-- | buildMinGW.conf | 2 | ||||
-rw-r--r-- | src/fbasicstring.h | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/buildMinGW.conf b/buildMinGW.conf index 96968aa..0688e48 100644 --- a/buildMinGW.conf +++ b/buildMinGW.conf | |||
@@ -22,7 +22,7 @@ filesIn("src") filter regexp("^src/(.*)\\.h$", "bu/{re:1}.h"): | |||
22 | target file, | 22 | target file, |
23 | set "CXXFLAGS" += "-I.", | 23 | set "CXXFLAGS" += "-I.", |
24 | #input filesIn("src") filter regexp("^.*\\.cpp$") | 24 | #input filesIn("src") filter regexp("^.*\\.cpp$") |
25 | input ["src/array.cpp", "src/list.cpp", "src/exceptionbase.cpp", "src/fstring.cpp", "src/file.cpp", "src/set.cpp", "src/hash.cpp", "src/sptr.cpp", "src/tafnode.cpp", "src/tafreader.cpp", "src/tafwriter.cpp", "src/stdstream.cpp", "src/stream.cpp", "src/archive.cpp", "src/archival.cpp", "src/socket.cpp", "src/serversocket.cpp", "src/unitsuite.cpp", "src/win32_compatibility.cpp"] | 25 | input ["src/array.cpp", "src/list.cpp", "src/exceptionbase.cpp", "src/fbasicstring.cpp", "src/fstring.cpp", "src/file.cpp", "src/set.cpp", "src/hash.cpp", "src/sptr.cpp", "src/tafnode.cpp", "src/tafreader.cpp", "src/tafwriter.cpp", "src/stdstream.cpp", "src/stream.cpp", "src/archive.cpp", "src/archival.cpp", "src/socket.cpp", "src/serversocket.cpp", "src/unitsuite.cpp", "src/win32_compatibility.cpp", "src/membuf.cpp"] |
26 | 26 | ||
27 | rule "exe": | 27 | rule "exe": |
28 | matches regexp("(.*)\\.win_o$"), | 28 | matches regexp("(.*)\\.win_o$"), |
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; |