Title
Templated function vs. function template
Status
c++23
Section
13.1 [temp.pre]
Submitter
Matthew House

Created on 2023-01-11.00:00:00 last changed 16 months ago

Messages

Date: 2023-01-27.23:50:39

Proposed resolution (approved by CWG 2023-01-27):

  1. Change in 9.2.9.7.1 [dcl.spec.auto.general] paragraph 12 as follows:

    Return type deduction for a templated entity that is a function or function template with a placeholder in its declared type occurs when the definition is instantiated even if the function body contains a return statement with a non-type-dependent operand.
  2. Change in 13.1 [temp.pre] paragraph 8 as follows:

    [Note 6: A local class, a local or block variable, or a friend function defined in a templated entity is a templated entity. —end note]
    A templated function is a function template or a function that is templated. A templated class is a class template or a class that is templated. A templated variable is a variable template or a variable that is templated.
Date: 2023-02-15.00:00:00

[Accepted as a DR at the February, 2023 meeting.]

In 13.1 [temp.pre] paragraph 8, the phrase "templated entity" is defined. The derived term "templated function" is never actually defined, but is intended to apply to function templates as well as non-template members of class templates. Similarly, the phrases "templated variable" and "templated class" should be properly defined.

History
Date User Action Args
2023-07-16 13:00:43adminsetstatus: open -> c++23
2023-07-16 13:00:43adminsetstatus: dr -> open
2023-02-18 18:43:04adminsetstatus: ready -> dr
2023-02-07 05:29:18adminsetstatus: tentatively ready -> ready
2023-01-27 23:50:39adminsetstatus: open -> tentatively ready
2023-01-15 11:51:48adminsetmessages: + msg7134
2023-01-11 00:00:00admincreate