This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
[Voted into WP at August, 2010 meeting.]
It does not appear that the following example is well-formed, although most compilers accept it:
template <typename T> T foo(); template <> int foo();
The reason is that 13.9.4 [temp.expl.spec] paragraph 11 only allows trailing template-arguments to be omitted if they “can be deduced from the function argument type,” and there are no function arguments in this example.
13.9.4 [temp.expl.spec] should probably say “function type” instead of “function argument type.” Also, a subsection should probably be added to 13.10.3 [temp.deduct] to cover “Deducing template arguments from declarative contexts” or some such. It would be essentially the same as 126.96.36.199 [temp.deduct.funcaddr] except that the function type from the declaration would be used as the type of P.
Proposed resolution (March, 2008):
Insert the following as a new subsection after 188.8.131.52 [temp.deduct.type]:
Change 13.9.4 [temp.expl.spec] paragraph 11 as follows:
A trailing template-argument can be left unspecified in the template-id naming an explicit function template specialization provided it can be deduced from the function
Notes from the September, 2008 meeting:
The proposed resolution is probably more than is needed. Instead of a complete new section, the material could become a paragraph in 13.7.7 [temp.fct].
Proposed resolution (February, 2010):
Add the following paragraph at the end of 13.7.7 [temp.fct]:
Proposed resolution (March, 2010):
This issue is resolved by the resolution of issue 873.