[Bug c++/26404] New: g++ seems to substitute template parameter too early
seefeld at sympatico dot ca
gcc-bugzilla@gcc.gnu.org
Tue Feb 21 21:03:00 GMT 2006
The following code generates the error
/home/stefan/fs.cc:11: error: template-id Âfoo<>Â for Âvoid foo(int)Â does not
match any template declaration
/home/stefan/fs.cc:11: error: invalid function declaration
as it doesn't seem to match 'Tag<int>::tag' against 'Tag<A>::tag' but the
substituted 'int' directly.
---
template <typename A> struct Tag { typedef int type;};
template <typename A>
void
foo(typename Tag<A>::type t);
template <>
void
foo(Tag<int>::type t) {}
---
--
Summary: g++ seems to substitute template parameter too early
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: seefeld at sympatico dot ca
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26404
More information about the Gcc-bugs
mailing list