This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53247] New: [regression, c++11] can't use a function from a base class of the same name in a different namespace
- From: "b.r.longbons at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 05 May 2012 16:21:10 +0000
- Subject: [Bug c++/53247] New: [regression, c++11] can't use a function from a base class of the same name in a different namespace
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53247
Bug #: 53247
Summary: [regression, c++11] can't use a function from a base
class of the same name in a different namespace
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: b.r.longbons@gmail.com
Created attachment 27318
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27318
testcase
With gcc 4.7 and -std=c++11,
the 'using' statement fails to bring in a function from the base class into the
current class. This is useful to prevent hiding.
Error message:
base.cpp:12:19: error: type âAâ is not a base type for type âAâ
Workaround:
Create a new member function and explicitly call the base class function.
Versions tested:
Arch gcc (GCC) 4.7.0 20120114 (prerelease)
gcc-4.7 (Debian 4.7.0-3) 4.7.0