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]

Bug: "using" doesn't work


This should compile:

------------------------
class A
{ public:
    void f(int) { }
};
class B: public A
{
 public:
    using A::f;
    void f(char*) { }
};
int main()
{  
    B   b;
    b.f(4711);
    return 0;
}
------------------------

But I get:

tst.cpp:10: cannot adjust access to `void A::f(int)' in `class B'
tst.cpp:9:   because of local method `void B::f(char *)' with same name
tst.cpp: In function `int main()':
tst.cpp:15: no matching function for call to `B::f (int)'
tst.cpp:9: candidates are: B::f(char *)

Version:

Reading specs from
/usr/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.91.57/specs
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)

BTW, is there something like a bug list (I'm new to the list)?

Regards,
	Bernd
--
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
eggink@uni-hamburg.de
http://www.rrz.uni-hamburg.de/eggink/BEggink.html


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