problem with local typedef names

scott snyder snyder@d0sgif.fnal.gov
Thu Feb 12 19:33:00 GMT 1998


hi -

For the following source, egcs-2.91.07 reports the error


local-typedef-problem.cpp: In method `void d0_RVector<d0_Object>::resize<d0_Object>()':
local-typedef-problem.cpp:13: invalid use of member `d0_Object::d0_pointer'


However, the problem goes away if d0_pointer is changed to a global typedef,
or if the d0_Object definition is moved to before the d0_RVector definition.

(Platform = mips-sgi-irix6.2.)

thanks,
sss




class d0_Object;


void foo (void*);


template <class T>
class d0_RVector
{
public:
  void resize ()
    { foo (d0_Object::d0_pointer()); }
};

class d0_Object
{
public:
  typedef d0_Object* d0_pointer;
};



template class d0_RVector<d0_Object>;



More information about the Gcc-bugs mailing list