This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/34453] New: Scope of nested template classes
- From: "rombust at hotmail dot co dot uk" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Dec 2007 14:33:45 -0000
- Subject: [Bug c++/34453] New: Scope of nested template classes
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following test code (stripped down):
template<typename CharType>
class CLASS_A
{
public:
int value;
};
template<typename CharType>
class CLASS_B : public CLASS_A<CharType>
{
public:
int GetValue() { return value; }
};
Gives the following error:
test.cpp: In member function ?int CLASS_B<CharType>::GetValue()?:
test.cpp:16: error: ?value? was not declared in this scope
If i change the GetValue() line to:
int GetValue() { return CLASS_A<CharType>::value; }
It compiles.
(This works in Microsoft Visual Studio)
--
Summary: Scope of nested template classes
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rombust at hotmail dot co dot uk
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34453