Title
Address of function template specialization with non-deduced template arguments
Status
tc1
Section
16.4 [over.over]
Submitter
Nikolas Kauer

Created on 2000-10-10.00:00:00 last changed 208 months ago

Messages

Date: 2000-10-15.00:00:00

Proposed resolution (10/00):

In 16.4 [over.over] paragraph 2, change

...if the argument deduction succeeds, the deduced template arguments are used to generate a single template function...

to

...if the argument deduction succeeds, the resulting template argument list is used to generate a single function template specialization...
Date: 2003-04-25.00:00:00

16.4 [over.over] paragraph 2 says,

If the name is a function template, template argument deduction is done (17.9.2.2 [temp.deduct.funcaddr]), and if the argument deduction succeeds, the deduced template arguments are used to generate a single template function, which is added to the set of overloaded functions considered.

It is not clear whether this formulation allows explicit specification of non-deduced template arguments. For instance,

    template <int I> void f(double x[]);
    typedef void (*FPtr)(double x[]);
    FPtr fp = &f<3>;

If only deduced arguments can be used, this example is ill-formed.

Suggested resolution: Clarify 16.4 [over.over] paragraph 2 to allow both deduced and explicitly-specified template arguments to be used to determine the function template specialization to be added to the overload set.

(See also issues 115 and 214.)

History
Date User Action Args
2003-04-25 00:00:00adminsetstatus: dr -> tc1
2000-11-18 00:00:00adminsetmessages: + msg449
2000-10-10 00:00:00admincreate