Bug 53247 - [regression, c++11] can't use a function from a base class of the same name in a different namespace
Summary: [regression, c++11] can't use a function from a base class of the same name i...
Status: RESOLVED DUPLICATE of bug 52841
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-05 16:21 UTC by Ben Longbons
Modified: 2012-05-05 17:57 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
testcase (123 bytes, text/x-c++src)
2012-05-05 16:21 UTC, Ben Longbons
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ben Longbons 2012-05-05 16:21:10 UTC
Created attachment 27318 [details]
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
Comment 1 Jonathan Wakely 2012-05-05 17:43:01 UTC
Fabien, is this a dup of one of the other "using" regressions?
Comment 2 fabien 2012-05-05 17:57:27 UTC
(In reply to comment #1)
> Fabien, is this a dup of one of the other "using" regressions?

Definitely, this is a duplicate, thanks.

*** This bug has been marked as a duplicate of bug 52841 ***