public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33121] New: Problem when deriving methods from a class with same name but different argments
@ 2007-08-20 13:07 pietz at gmx dot de
2007-08-20 13:55 ` [Bug c++/33121] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: pietz at gmx dot de @ 2007-08-20 13:07 UTC (permalink / raw)
To: gcc-bugs
Hello,
I have the classes A and B where B is derived from A. The following methods are
given:
bool A::method();
virtual bool A::method(int arg);
bool B::method(int);
Now when I want to call method() on an object of type B I get the compiler
error that there is no method() in class B and the only candidate is
method(int). Is this my fault with some GCC options or is this really a bug?
Thanks for looking into it.
Andreas
--
Summary: Problem when deriving methods from a class with same
name but different argments
Product: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pietz at gmx dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33121
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/33121] Problem when deriving methods from a class with same name but different argments
2007-08-20 13:07 [Bug c++/33121] New: Problem when deriving methods from a class with same name but different argments pietz at gmx dot de
@ 2007-08-20 13:55 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-20 13:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-08-20 13:54 -------
struct A
{
virtual int method(int);
int method();
};
struct B: A
{
int method(int);
};
That is the example. You need to add:
using A::method;
to get exposed in B, A::method.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33121
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-08-20 13:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-20 13:07 [Bug c++/33121] New: Problem when deriving methods from a class with same name but different argments pietz at gmx dot de
2007-08-20 13:55 ` [Bug c++/33121] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).