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

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

Messages

Date: 2000-10-15.00:00:00

Proposed resolution (10/00):

In 12.3 [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: 2000-10-15.00:00:00

Proposed resolution (10/00):

In 12.3 [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: 2022-11-20.07:54:16

12.3 [over.over] paragraph 2 says,

If the name is a function template, template argument deduction is done (13.10.3.3 [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 12.3 [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
2022-02-18 07:47:23adminsetmessages: + msg6660
2003-04-25 00:00:00adminsetstatus: dr -> tc1
2000-11-18 00:00:00adminsetmessages: + msg449
2000-10-10 00:00:00admincreate