This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13052] error in looking up template super classes in different namespace
- From: "gdr at integrable-solutions dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Nov 2003 15:52:02 -0000
- Subject: [Bug c++/13052] error in looking up template super classes in different namespace
- References: <20031114144704.13052.3.14159@gmx.net>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gdr at integrable-solutions dot net 2003-11-14 15:51 -------
Subject: Re: error in looking up template super classes in different namespace
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| I can confirm that this program
| ------------------------
| namespace NS
| {
| template <int> struct X { int x;};
| }
|
| template<int i> struct Y : NS::X<i> {};
|
|
| int main()
| {
| Y<0> y;
| y.X<0>::x=1;
| }
| -------------------------------
| indeed does not compile. I'm not quite sure that it should, though I
The code is valid. .X<0>::x is explicit member access to the
component "x" of the base subobject of type X<0>.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13052