tmp/tmpjo9508b3/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#### General <a id="temp.fct.general">[[temp.fct.general]]</a>
|
| 2 |
+
|
| 3 |
+
A function template defines an unbounded set of related functions.
|
| 4 |
+
|
| 5 |
+
[*Example 1*:
|
| 6 |
+
|
| 7 |
+
A family of sort functions can be declared like this:
|
| 8 |
+
|
| 9 |
+
``` cpp
|
| 10 |
+
template<class T> class Array { };
|
| 11 |
+
template<class T> void sort(Array<T>&);
|
| 12 |
+
```
|
| 13 |
+
|
| 14 |
+
— *end example*]
|
| 15 |
+
|
| 16 |
+
[*Note 1*: A function template can have the same name as other function
|
| 17 |
+
templates and non-template functions [[dcl.fct]] in the same
|
| 18 |
+
scope. — *end note*]
|
| 19 |
+
|
| 20 |
+
A non-template function is not related to a function template (i.e., it
|
| 21 |
+
is never considered to be a specialization), even if it has the same
|
| 22 |
+
name and type as a potentially generated function template
|
| 23 |
+
specialization.[^9]
|
| 24 |
+
|