[Bug c++/11988] Using "using" in two-stage name lookup
gdr at integrable-solutions dot net
gcc-bugzilla@gcc.gnu.org
Wed Aug 20 06:21:00 GMT 2003
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
More information about the Gcc-bugs
mailing list