This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11467] using doesn't help with two-stage lookup of members in template base
- From: "benko at sztaki dot hu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jul 2003 17:12:17 -0000
- Subject: [Bug c++/11467] using doesn't help with two-stage lookup of members in template base
- References: <20030708141716.11467.benko@sztaki.hu>
- 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=11467
------- Additional Comments From benko at sztaki dot hu 2003-07-14 17:12 -------
Now it also fails when i is a function:
arta:~/c/proba$ cat templ_base1.cc
template <typename T> struct Base {
int i();
};
template <typename T> struct Derived : public Base<T> {
using Base<T>::i;
int get_i() { return i(); }
};
arta:~/c/proba$ g++-cvs -v
Reading specs from /gml/shared/gcc-cvs/lib/gcc-lib/i686-pc-linux-gnu/3.4/specs
Configured with: ../gcc/configure --prefix=/gml/shared/gcc-cvs
--enable-languages=c++
Thread model: posix
gcc version 3.4 20030714 (experimental)
arta:~/c/proba$ g++-cvs templ_base1.cc
templ_base1.cc: In member function `int Derived<T>::get_i()':
templ_base1.cc:8: error: there are no arguments to `i' that depend on a
template parameter, so a declaration of `i' must be available
templ_base1.cc:8: error: (if you use `-fpermissive', G++ will accept your code,
but allowing the use of an undeclared name is deprecated)
zsh: exit 1 g++-cvs templ_base1.cc
arta:~/c/proba$