[Bug c++/39567] New: class member template function won't compile
drtr at dial dot pipex dot com
gcc-bugzilla@gcc.gnu.org
Fri Mar 27 16:00:00 GMT 2009
% g++ -v
Using built-in specs.
Target: i386-pc-solaris2.10
Configured with: ../gcc-4.3.3/configure --prefix=/home/robind/local
--with-gnu-as --with-as=/usr/sfw/bin/gas --without-gnu-ld
--with-ld=/usr/ccs/bin/ld
Thread model: posix
gcc version 4.3.3 (GCC)
With this source file:
template<typename T>
struct wom
{
T afunc();
};
struct foo
{
template<typename T>
T bfunc(wom<T> w)
{
return w.afunc<T>();
}
};
I get this compilation error:
bug.cc: In member function 'T foo::bfunc(wom<T>)':
bug.cc:12: error: expected primary-expression before '>' token
bug.cc:12: error: expected primary-expression before ')' token
Renaming the function at line 10 from bfunc to afunc makes the code compile.
Thanks,
David Robinson
--
Summary: class member template function won't compile
Product: gcc
Version: 4.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: drtr at dial dot pipex dot com
GCC build triplet: i386-pc-solaris2.10
GCC host triplet: i386-pc-solaris2.10
GCC target triplet: i386-pc-solaris2.10
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39567
More information about the Gcc-bugs
mailing list