This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/25846] New: declaration scope of template members


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]