This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25846] New: declaration scope of template members
- From: "vna at rts dot co dot at" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jan 2006 15:57:00 -0000
- Subject: [Bug c++/25846] New: declaration scope of template members
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I have a problem with template construction compiled by g++ 4.0.2 (SuSE Linux).
The compiler populate following error message:
"test.cpp:17: error: a m_pData was not declared in this scope"
Previous release g++ 3.3.3 works fine.
template<class T> class c1T
{
public:
c1T () { }
~c1T (){ }
operator T*() const { return m_pData; }
T *m_pData;
};
template<class T> class c1newT : public c1T<T>
{
public:
c1newT () : c1T<T> () { }
T* operator->() const { return m_pData; }
};
main ()
{
c1T<int> hugo;
}
Thanks
--
Summary: declaration scope of template members
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vna at rts dot co dot at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25846