tmp/tmpdhn3h97j/{from.md → to.md}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
### The `inline` specifier <a id="dcl.inline">[[dcl.inline]]</a>
|
| 2 |
|
| 3 |
The `inline` specifier shall be applied only to the declaration of a
|
| 4 |
variable or function.
|
| 5 |
|
| 6 |
-
A function declaration
|
| 7 |
with an `inline` specifier declares an *inline function*. The inline
|
| 8 |
specifier indicates to the implementation that inline substitution of
|
| 9 |
the function body at the point of call is to be preferred to the usual
|
| 10 |
function call mechanism. An implementation is not required to perform
|
| 11 |
this inline substitution at the point of call; however, even if this
|
|
@@ -30,22 +30,21 @@ function or variable with external or module linkage is declared inline
|
|
| 30 |
in one definition domain, an inline declaration of it shall be reachable
|
| 31 |
from the end of every definition domain in which it is declared; no
|
| 32 |
diagnostic is required.
|
| 33 |
|
| 34 |
[*Note 2*: A call to an inline function or a use of an inline variable
|
| 35 |
-
|
| 36 |
translation unit. — *end note*]
|
| 37 |
|
| 38 |
[*Note 3*: An inline function or variable with external or module
|
| 39 |
-
linkage
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
translation unit. — *end note*]
|
| 44 |
|
| 45 |
If an inline function or variable that is attached to a named module is
|
| 46 |
declared in a definition domain, it shall be defined in that domain.
|
| 47 |
|
| 48 |
[*Note 4*: A constexpr function [[dcl.constexpr]] is implicitly inline.
|
| 49 |
In the global module, a function defined within a class definition is
|
| 50 |
-
implicitly inline
|
| 51 |
|
|
|
|
| 1 |
### The `inline` specifier <a id="dcl.inline">[[dcl.inline]]</a>
|
| 2 |
|
| 3 |
The `inline` specifier shall be applied only to the declaration of a
|
| 4 |
variable or function.
|
| 5 |
|
| 6 |
+
A function declaration [[dcl.fct]], [[class.mfct]], [[class.friend]]
|
| 7 |
with an `inline` specifier declares an *inline function*. The inline
|
| 8 |
specifier indicates to the implementation that inline substitution of
|
| 9 |
the function body at the point of call is to be preferred to the usual
|
| 10 |
function call mechanism. An implementation is not required to perform
|
| 11 |
this inline substitution at the point of call; however, even if this
|
|
|
|
| 30 |
in one definition domain, an inline declaration of it shall be reachable
|
| 31 |
from the end of every definition domain in which it is declared; no
|
| 32 |
diagnostic is required.
|
| 33 |
|
| 34 |
[*Note 2*: A call to an inline function or a use of an inline variable
|
| 35 |
+
can be encountered before its definition becomes reachable in a
|
| 36 |
translation unit. — *end note*]
|
| 37 |
|
| 38 |
[*Note 3*: An inline function or variable with external or module
|
| 39 |
+
linkage can be defined in multiple translation units [[basic.def.odr]],
|
| 40 |
+
but is one entity with one address. A type or `static` variable defined
|
| 41 |
+
in the body of such a function is therefore a single
|
| 42 |
+
entity. — *end note*]
|
|
|
|
| 43 |
|
| 44 |
If an inline function or variable that is attached to a named module is
|
| 45 |
declared in a definition domain, it shall be defined in that domain.
|
| 46 |
|
| 47 |
[*Note 4*: A constexpr function [[dcl.constexpr]] is implicitly inline.
|
| 48 |
In the global module, a function defined within a class definition is
|
| 49 |
+
implicitly inline [[class.mfct]], [[class.friend]]. — *end note*]
|
| 50 |
|