This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/52126] [4.7 Regression] compilation error
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 07 Feb 2012 17:23:40 +0000
- Subject: [Bug c++/52126] [4.7 Regression] compilation error
- Auto-submitted: auto-generated
- References: <bug-52126-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52126
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-02-07 17:23:40 UTC ---
(In reply to comment #2)
> Further investigation shows that the issue appears only when inheritance from
> the template class (class B : private A<T>) is provided explicitly. According
> to the standard a nested class defined inside a class template is implicitly
> template as well.
I don't think that's relevant. The point is that the injected-class-name 'A'
and 'A<T>' both refer to the class template, and should work equivalently.
It can be reduced to:
template<typename T>
struct A
{
int foo;
struct B : A<T>
{
using A::foo;
};
};