This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52379] When inheriting a class X from another namespace, inside the class X will always refer to that one.
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 25 Feb 2012 13:06:47 +0000
- Subject: [Bug c++/52379] When inheriting a class X from another namespace, inside the class X will always refer to that one.
- Auto-submitted: auto-generated
- References: <bug-52379-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52379
Daniel KrÃgler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler at
| |googlemail dot com
--- Comment #2 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> 2012-02-25 13:06:47 UTC ---
The name 'A' within Two::B refers to the base class A (which is One::A), which
again has no what() function. This is essentially the injected-class-name of
the base class as described in the name-lookup of members.
The compiler is correct to reject the code (In addition, the compiler should
also reject the semicolon after the closing brace of the namespaces).