This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/23088] New: gcc 4.0.1 rejects non-ambiguous member-template call
- From: "nicoara at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Jul 2005 21:26:51 -0000
- Subject: [Bug c++/23088] New: gcc 4.0.1 rejects non-ambiguous member-template call
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code:
$ cat > t.cpp << EOF
struct A
{
template<class T>
T get () {
return T();
}
};
template<class T>
T foo ()
{
A a;
return a.get<T> ();
}
int main ()
{
return foo<int> ();
}
EOF
fails to compile:
$ g++ -c t.cpp
t.cpp: In function `T foo()':
t.cpp:13: error: parse error before `>' token
with:
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i486-slackware-linux/3.3.4/specs
Configured with: ../gcc-3.3.4/configure --prefix=/usr --enable-shared
--enable-threads=posix --enable-__cxa_atexit --disable-checking --with-gnu-ld
--verbose --target=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 3.3.4
--
Summary: gcc 4.0.1 rejects non-ambiguous member-template call
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nicoara at roguewave dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i486-slackware-linux
GCC host triplet: i486-slackware-linux
GCC target triplet: i486-slackware-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23088