------- Additional Comments From reichelt at gcc dot gnu dot org 2005-08-24 19:38 ------- This is probably due to the fact that lookup_template_class is called twice as the comment above the function states:
??? Note that this function is currently called *twice* for each template-id: the first time from the parser, while creating the incomplete type (finish_template_type), and the second type during the real instantiation (instantiate_template_class). This is surely something that we want to avoid. It also causes some problems with argument coercion (see convert_nontype_argument for more information on this). */ -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19502