| View previous topic :: View next topic |
| Author |
Message |
Allen Conway Guest
|
Posted: Tue Feb 15, 2005 4:08 pm Post subject: template compilation problem |
|
|
g++ 3.4.0 ne compile pas le suivant:
template <class X> struct Xmap
{
map<string,X>::const_iterator Begin()const
{
return mXmap.begin();
}
map<string,X> mXmap;
};
::::::::::::::: error: expected ';' before "Begin"
Est-ce parce que (1) je fais une erreur de syntaxe (2) C++ ne permet pas
d'écrire ça (3) il y a un problème avec cette version du compilateur
|
|
| Back to top |
|
 |
Falk Tannhäuser Guest
|
Posted: Tue Feb 15, 2005 4:14 pm Post subject: Re: template compilation problem |
|
|
Allen Conway wrote:
| Quote: | g++ 3.4.0 ne compile pas le suivant:
template <class X> struct Xmap
{
map<string,X>::const_iterator Begin()const
|
typename map<string,X>::const_iterator Begin() const
Falk
|
|
| Back to top |
|
 |
Allen Conway Guest
|
Posted: Wed Feb 16, 2005 7:44 am Post subject: Re: template compilation problem |
|
|
Que je suis bête! C'est comme parler une langue étrangère - il y a toujours
des règles de grammaire qu'on oublie dans un moment de panique... merci++!
"Falk Tannhäuser" <falk.tannhauser (AT) crf (DOT) canon.fr> wrote
| Quote: | Allen Conway wrote:
g++ 3.4.0 ne compile pas le suivant:
template <class X> struct Xmap
{
map<string,X>::const_iterator Begin()const
typename map<string,X>::const_iterator Begin() const
Falk
|
|
|
| Back to top |
|
 |
|