This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
typeof() in templates
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: typeof() in templates
- From: Lawrence Foard <entropy at virek dot vwis dot com>
- Date: Sun, 25 Jul 1999 13:02:51 -0700 (PDT)
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