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: "tmmikolajczyk at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 05 Feb 2012 20:57:29 +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 #2 from tmmikolajczyk at gmail dot com 2012-02-05 20:57:29 UTC ---
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. The modified code reflecting that rule compiles fine:
template<typename T>
class A
{
public:
void foo() {};
class B : private A
{
public:
typedef A inherited;
using inherited::foo;
};
};
Anyway, the first version of the code seems to be valid C++ code.