From Jason Turner

[over.pre]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpwvjw7kdd/{from.md → to.md} +27 -0
tmp/tmpwvjw7kdd/{from.md → to.md} RENAMED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Preamble <a id="over.pre">[[over.pre]]</a>
2
+
3
+ When two or more different declarations are specified for a single name
4
+ in the same scope, that name is said to be *overloaded*, and the
5
+ declarations are called *overloaded declarations*. Only function and
6
+ function template declarations can be overloaded; variable and type
7
+ declarations cannot be overloaded.
8
+
9
+ When a function name is used in a call, which function declaration is
10
+ being referenced and the validity of the call are determined by
11
+ comparing the types of the arguments at the point of use with the types
12
+ of the parameters in the declarations that are visible at the point of
13
+ use. This function selection process is called *overload resolution* and
14
+ is defined in  [[over.match]].
15
+
16
+ [*Example 1*:
17
+
18
+ ``` cpp
19
+ double abs(double);
20
+ int abs(int);
21
+
22
+ abs(1); // calls abs(int);
23
+ abs(1.0); // calls abs(double);
24
+ ```
25
+
26
+ — *end example*]
27
+