www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/12/05/11:30:22

From: pavenis AT lanet DOT lv
To: Ron House <house AT usq DOT edu DOT au>, djgpp AT delorie DOT com
Date: Tue, 5 Dec 2000 16:56:09 +0200
MIME-Version: 1.0
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

On 5 Dec 2000, at 5:41, Ron House wrote:

> Bart Kowalski wrote:
> > 
> > > An example of a line it won't compile is:
> > >
> > > vector<vector<int> > 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<vector<int *,allocator<int *> >
> >::_Assignable_requirement_violat
> ion(vector<int *,allocator<int *> >)':
> d:/djgpp/lang/cxx/stl_vector.h:159:   instantiated from
> `vector<vector<int *,allocator<int *> >,allocator<vector<int
> *,allocator<int *> > > >'
> 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<b<c> > 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.


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019