ISO C++03 14.2/4:
When the name of a member template specialization appears after . or -> in a postfix-expression, or after nested-name-specifier in a qualified-id, and the postfix-expression or qualified-id explicitly depends on a template-parameter (14.6.2), the member template name must be prefixed by the keyword template. Otherwise the name is assumed to name a non-template.
In t->f0<U>();
f0<U>
is a member template specialization which appears after ->
and which explicitly depends on template parameter U
, so the member template specialization must be prefixed by template
keyword.
So change t->f0<U>()
to t->template f0<U>()
.