Hi all:
Must I finalice a function member declaration with ; ?
For example;
class A {
...
public:
myFunc(); //Is this ; necessary
};
I compile my programs using Sun's Forte 6 and linux gcc 3.3.2
In this case (with or without ;) compiles ok with both compilers.
But in the next case:
class DatosUssd {
...
template<typename Tabla> static const Tabla& getRefTabla(Tabla*
DatosUssd::*tabla) {
static const Tabla* nullTabla=0;
if(actual)
return *(actual->*tabla);
else
return static_cast<const Tabla&>(*nullTabla);
}; //this ; gives me an error with sun's Forte 6
public: //Compiler error due to the previous ";" character
...
};
With linux gcc, it compiles ok with or without ;
But with Sun's Forte 6 without ; compiles ok, but with ; compiler gives
me the error:
Error: A declaration was expected instead of "public"
I want to know if finalize function members with ; is a compiler error
or mine.