From: pavenis AT lanet DOT lv To: Ron House , djgpp AT delorie DOT com Date: Tue, 5 Dec 2000 16:56:09 +0200 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: STL broken? Message-ID: <3A2D1E29.19611.15E396@localhost> In-reply-to: <3A2C8027.427A293D@usq.edu.au> X-mailer: Pegasus Mail for Win32 (v3.12c) Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 5 Dec 2000, at 5:41, Ron House wrote: > Bart Kowalski wrote: > > > > > An example of a line it won't compile is: > > > > > > vector > m; > > > > > > as found on page 836 of Stroustrup. > > > > You forgot the namespace qualifier. See chapter 8 of the same book. > > Oops! So did Stroustrup. (See all examples of the STL between pp1-900.) > :-) > > Seriously, no, that doesn't fix it. Besides, the error is not a simple > undeclared identifier, but a series of messages referring to lines deep > in the STL code: Search for Your own problems. Examples in pages 836 and 837 of Stroustrup's book compiles and works Ok for me with gcc-2.95.2 (DJGPP port of course gcc-2.95.2). Only warnings I can get (with -W -Wall) is about comparisson between signed and unsigned int variables. No errors at all Andris > > d:/djgpp/lang/cxx/concept_checks.h: In function `static void > _Assignable_concept_specification > > >::_Assignable_requirement_violat > ion(vector >)': > d:/djgpp/lang/cxx/stl_vector.h:159: instantiated from > `vector >,allocator *,allocator > > >' > t.cpp:3: instantiated from here > d:/djgpp/lang/cxx/concept_checks.h:530: use of parameter from containing > function > d:/djgpp/lang/cxx/concept_checks.h:389: `int * __a' declared here > d:/djgpp/lang/cxx/concept_checks.h:531: use of parameter from containing > function > d:/djgpp/lang/cxx/concept_checks.h:389: `int * __a' declared here > d:/djgpp/lang/cxx/concept_checks.h:532: use of parameter from containing > function > d:/djgpp/lang/cxx/concept_checks.h:389: `int * __a' declared here > d:/djgpp/lang/cxx/concept_checks.h:532: use of parameter from containing > function > d:/djgpp/lang/cxx/concept_checks.h:389: `int * __a' declared here > d:/djgpp/lang/cxx/concept_checks.h:533: use of parameter from containing > function > d:/djgpp/lang/cxx/concept_checks.h:389: `int * __a' declared here > d:/djgpp/lang/cxx/concept_checks.h:533: use of parameter from containing > function > d:/djgpp/lang/cxx/concept_checks.h:389: `int * __a' declared here > > Adding or removing "std::", or inserting "using namespace std" changes > the error not one iota. As far as I can tell, any declaration of the > form: "a > d;", where a and b are STL containers, fails to compile > no matter what you do with namespaces. > > -- > Ron House house AT usq DOT edu DOT au > http://www.sci.usq.edu.au/staff/house > > A rose grows in the Earth's good soil.