Files
2025-10-25 03:02:53 +03:00

36 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[temp.deduct.funcaddr]
# 13 Templates [[temp]](./#temp)
## 13.10 Function template specializations [[temp.fct.spec]](temp.fct.spec#temp.deduct.funcaddr)
### 13.10.3 Template argument deduction [[temp.deduct]](temp.deduct#funcaddr)
#### 13.10.3.3 Deducing template arguments taking the address of a function template [temp.deduct.funcaddr]
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/templates.tex#L8473)
Template arguments can be deduced from the type specified when taking
the address of an [overload set](over.over "12.3Address of an overload set[over.over]")[.](#1.sentence-1)
If there is a target,
the function template's function type and the target type
are used as the types ofP andA,
and the deduction is done as
described in [[temp.deduct.type]](temp.deduct.type "13.10.3.6Deducing template arguments from a type")[.](#1.sentence-2)
Otherwise, deduction is performed with empty sets of types P and A[.](#1.sentence-3)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/templates.tex#L8486)
A placeholder type ([[dcl.spec.auto]](dcl.spec.auto "9.2.9.7Placeholder type specifiers")) in the return type of a
function template is a non-deduced context[.](#2.sentence-1)
If template argument
deduction succeeds for such a function, the return type is determined
from instantiation of the function body[.](#2.sentence-2)