S
sunrise
Hi,
I'm having a problem with the IBM Visual Age compiler (xlC) rejecting
the following code:
namespace mcrx {
class a;
class b;
}
class mcrx::a {};
class mcrx::b : public a {};
with the error:
"test.cc", line 6.24: 1540-0063 (S) The text "a" is unexpected.
It requires that "public a" be qualified as "public mcrx::a". My
understanding is that since b is in namespace mcrx, the compiler
should look in that namespace for a match to the base class a. gcc,
intel, and Comeau accept the code even in strict mode. Can anyone tell
me who is right?
Thanks,
/Patrik J.
I'm having a problem with the IBM Visual Age compiler (xlC) rejecting
the following code:
namespace mcrx {
class a;
class b;
}
class mcrx::a {};
class mcrx::b : public a {};
with the error:
"test.cc", line 6.24: 1540-0063 (S) The text "a" is unexpected.
It requires that "public a" be qualified as "public mcrx::a". My
understanding is that since b is in namespace mcrx, the compiler
should look in that namespace for a match to the base class a. gcc,
intel, and Comeau accept the code even in strict mode. Can anyone tell
me who is right?
Thanks,
/Patrik J.