This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]