IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Update: test code: try the fun on YOUR c++ compiler!
Fun for the whole ANSI committee!

This is the minimal code needed to duplicate the test case:

\n// file test.cpp\n\n#include <string>\n#include <list>\n\ntemplate <class T>\nclass CTestAlloc\n{\npublic:\n\ttypedef T value_type;\n\ttypedef size_t size_type;\n\ttypedef ptrdiff_t difference_type;\n\ttypedef T * pointer;\n\ttypedef const T * const_pointer;\n\ttypedef T & reference;\n\ttypedef const T & const_reference;\n\n\ttemplate <class U>\n\tstruct rebind { typedef CTestAlloc<U> other; };\n};\n\n\nclass CTest  \n{\n\ttypedef std::string string;\n\npublic:\n\tclass Field;\n\tclass Field_iter;\n\n\ttypedef CTestAlloc<Field> FieldAllocator;\n\n\ttypedef std::list<Field,FieldAllocator> Fields_t;\n\n\tclass Field : public string\n\t{\n\t};\n\n\tclass Field_iter : public Fields_t::iterator\n\t{\n\t};\n\npublic:\n\tCTest();\n\tvirtual ~CTest();\n};\n


'gcc -o test.o -c test.cpp' (2.95.4) compiles. 'icc -o test.o -c test.cpp' (7.0) does not. Same code will compile in MSVC 6.0 and gcc 3.2.1 as well.

So, is it a compiler error or an stl implementation error? And how do you put up with this shit?
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New Borland C++ Builder 6 Pro compiles w/o error
As I would expect, as Borland tends to be the most ANSI compliant of the compilers with which I am familiar.

(And I'm sure that brings some warmth to Sir Cyclic's heart...).
jb4
"They lead. They don't manage. The carrot always wins over the stick. Ask your horse. You can lead your horse to water, but you can't manage him to drink."
Richard Kerr, United Technologies Corporation, 1990
New Nifty for Windows users, eh?
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New In Linux-land, try Kylix...
Same compiler, targets Linux.

It really really works!
jb4
"They lead. They don't manage. The carrot always wins over the stick. Ask your horse. You can lead your horse to water, but you can't manage him to drink."
Richard Kerr, United Technologies Corporation, 1990
Expand Edited by jb4 Feb. 10, 2003, 06:57:42 PM EST
New I'll take a look then.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New GCC on Jaguar (3.1) works okay
Tom Sinclair

"Everybody is someone else's weirdo."
- E. Dijkstra
     More C++ BS: - (admin) - (21)
         OK, the problem here is the implementation, not the language - (jb4) - (10)
             Oh, come the heck on! Yes, it IS the language! - (CRConrad) - (7)
                 C'mon Christian... - (jb4) - (6)
                     Not that big a stretch... - (admin)
                     So, it's a great language, if your definition... - (CRConrad) - (1)
                         NO, that's NOT what I said. - (jb4)
                     Yeah, its the language - (tuberculosis) - (2)
                         Re: Yeah, its the language - (jb4) - (1)
                             Yes. -NT - (inthane-chan)
             Advocacy aside: - (admin) - (1)
                 My understanding is: - (jb4)
         Update: test code: try the fun on YOUR c++ compiler! - (admin) - (5)
             Borland C++ Builder 6 Pro compiles w/o error - (jb4) - (3)
                 Nifty for Windows users, eh? -NT - (admin) - (2)
                     In Linux-land, try Kylix... - (jb4) - (1)
                         I'll take a look then. -NT - (admin)
             GCC on Jaguar (3.1) works okay -NT - (tjsinclair)
         Update: what I did to workaround this - (admin) - (3)
             LUCK!!! ;-) -NT - (jb4)
             OT: gcc 2.95 native STL is very bad - (Arkadiy) - (1)
                 I'm not using native 2.95 STL. - (admin)

What a bizarre 'field' ... all about 'Information' - and nobody has any you'd trust!
211 ms