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]

typeof() in templates



I'm somewhat new to templates so this code may not be legal, the
following piece of code causes an internal compiler error. I'm using egcs
that comes with Redhat 6. Attempting to compile the following "class"
will cause an internal compiler error.


template <class AParticle>
 class World
  {
   typedef typeof(AParticle::origin) Position;
   typedef typeof(AParticle::velocity) Velocity;
        
  }

g++ -v 
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)

Thanks



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