This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11988] Using "using" in two-stage name lookup
- 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: 20 Aug 2003 06:21:41 -0000
- Subject: [Bug c++/11988] Using "using" in two-stage name lookup
- References: <20030820052808.11988.derrick@cco.caltech.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11988
------- Additional Comments From gdr at integrable-solutions dot net 2003-08-20 06:21 -------
Subject: Re: New: Using "using" in two-stage name lookup
"derrick at cco dot caltech dot edu" <gcc-bugzilla@gcc.gnu.org> writes:
| template <typename T> struct Derived : public Base<T> {
| int get_i() { using Base<T>::i; return i; }
| };
|
| since, according to that document,
| "Alternatively, Base<T>::i might be brought into scope by a using-declaration."
|
| However, gcc-3.4-20030813 is rejecting the code with the following errors:
| test2.cc: In member function `int Derived<T>::get_i()':
| test2.cc:6: error: `Base<T>' is not a namespace
| test2.cc:6: error: `i' undeclared (first use this function)
| test2.cc:6: error: (Each undeclared identifier is reported only once for each
| function it appears in.)
|
| Is the documentation wrong (or unclear), or the compiler?
The compiler is broken.
-- Gaby