simple function template problem

Yonik Seeley yseeley@cs.stanford.edu
Wed Jun 3 14:21:00 GMT 1998


Hi, I am having a simple function template compilation problem.
I looked through the g++ FAQ but was unable to find anything
relevant.  The following code snippet does work with
Sun's CC.
-Yonik

[myhost] more x.C
template <class T> 
void foo(T& t) {
  T::iterator itr;
}
 
[myhost] g++ x.C
x.C: In function `void foo(T &)':
x.C:3: parse error before `;'
[myhost] g++ -v
Reading specs from /packages2/gnu/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.90.29/specs
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)


ps: does anyone know an eta for namespaces???



More information about the Gcc-bugs mailing list