stdcxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liviu Nicoara <nico...@roguewave.com>
Subject Re: stdcxx compilation error
Date Thu, 16 Nov 2006 16:04:17 GMT
At a glance it appears that in the for loop you create a const iterator for:

std::map< key, value >

which uses the default std::map comparator (std::less<key>) whereas the 
actual type of "compounds" is:

std::map< key, value, CompareBoWTokenPtr >

HTH.

Nadine Faizant wrote:
> Hello,
> 
> I try to compile this code with stdcxx (code which compile with gcc + gccstl).
> 
> I don't understand why I get an error
> 
> void toto(const SentenceCompoundsData& compounds) const
> ** for (std::map< Common::BagOfWords::BoWToken*, std::deque< PhoenixGraphVertex
> >::const_iterator compoundsIt(compounds.begin());compoundsIt != compounds.end(); compoundsIt++)
> 
> {
> 
> .....
> 
> }
> 
> }
> 
> 
> where SentenceCompoundsData is defined as
> typedef std::map< Common::BagOfWords::BoWToken*, std::deque< PhoenixGraphVertex
>, CompareBoWTokenPtr > SentenceCompoundsData;
> 
> OUTPUT : see attached file (error point to line **)
> 
> I dont' know if it is a problem of STL or more a problem of compilation. If I try this,
it works.
> 
> for (SentenceCompoundsData ::const_iterator compoundsIt(compounds.begin());compoundsIt
!= compounds.end(); compoundsIt++)
> 
> Thanks for help,
> 
>     Nadine
> 
> 
> --------------------------------------------------------------------------------
> 
> Nadine Faizant 
> NewPhenix 
> Z.A. - 5, Rue de l'Auberte 
> 30 133 Les Angles 
> 
> 
> Tél : 04 90 26 74 82 
> Fax : 04 90 26 90 84 
> Courriel : nadine.faizant@nautitia.fr 
> 
> --------------------------------------------------------------------------------
> 


Mime
View raw message