[Bug c++/13052] error in looking up template super classes in different namespace

gdr at integrable-solutions dot net gcc-bugzilla@gcc.gnu.org
Fri Nov 14 15:52:00 GMT 2003


------- 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



More information about the Gcc-bugs mailing list