Problème std::list + templates GCC/G++ 4.x
Suite de mes problèmes de hier, un autre morceau du code que je dois reprendre (fait sous VisualStudio2005) n'est pas accepté :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
template<typename T,typename ACTION>
ACTION *Ia<T,ACTION>::createTree(GeneralTree<Situation<T,ACTION> > *pere, int profondeur)
{
if (pere == 0 )
return 0;
pere->getData().setValue(valoriserSituation(pere->getData()));
if ( tree == 0 )
tree=pere;
list<Situation<T,ACTION> > *listeSituations= this.creerSituations(pere->getData());
list< Situation<T,ACTION> >::iterator it; // BLAM : Erreur !!!!
for (it=listeSituations->begin();it != listeSituations->end();it++)
pere->addChild(new GeneralTree<Situation<T,ACTION> >(*it));
if ( profondeur > 1 )
for ( pere->start(); pere->isValid(); pere->forth())
createTree(pere->child(),profondeur-1);
else
for ( pere->start() ; pere->isValid() ; pere->forth() )
pere->child()->getData().setValue(noterSituation(pere->child()->getData()));
return pere->getData()->getAction();
} |
Si quelqu'un a une idée de ce qui se passe ....