[Bug c++/21019] New: fails to identify template function overload
igodard at pacbell dot net
gcc-bugzilla@gcc.gnu.org
Thu Apr 14 11:09:00 GMT 2005
The attached code is doing metaprogramming where a "showNode" template function
recurses up a linked list of "attrNode" templates (with different argument
types) until it hits an "attrBottom" type at the end of the list. That
identifies a different overload of "showNode" and stops the recursion.
As the error shows, it has successfully recursed to the end, but at the last
node it is identifying the generic recursive "showNode" overload rather than the
specific overload for "attrBottom". The actual problem is the indentification;
once the wrong identification was made the resulting errors are correct, and
there would be no errors had the right overload been identified.
The misidentification appears fragile; the same recursion works fine elsewhere
in the code, and relatively minor twiddles of the code get the compiler to
identify correctly, which is why I don't have a reduced case for you.
--
Summary: fails to identify template function overload
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21019
More information about the Gcc-bugs
mailing list