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]

simple function template problem


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???


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