9 Declarations [dcl.dcl]

9.1 Specifiers [dcl.spec]

9.1.6 The inline specifier [dcl.inline]

The inline specifier shall be applied only to the declaration of a variable or function.
A function declaration ([dcl.fct], [class.mfct], [class.friend]) with an inline specifier declares an inline function.
The inline specifier indicates to the implementation that inline substitution of the function body at the point of call is to be preferred to the usual function call mechanism.
An implementation is not required to perform this inline substitution at the point of call; however, even if this inline substitution is omitted, the other rules for inline functions specified in this subclause shall still be respected.
A variable declaration with an inline specifier declares an inline variable.
A function defined within a class definition is an inline function.
The inline specifier shall not appear on a block scope declaration.90
If the inline specifier is used in a friend function declaration, that declaration shall be a definition or the function shall have previously been declared inline.
If an inline function or variable is odr-used in a translation unit, a definition of it shall be reachable from the end of that translation unit, and it shall have exactly the same definition in every such translation unit ([basic.def.odr]).
[Note
:
A call to the inline function or a use of the inline variable may be encountered before its definition appears in the translation unit.
end note
]
If a definition of a function or variable is reachable at the point of its first declaration as inline, the program is ill-formed.
If a function or variable with external or module linkage is declared inline in one translation unit, there shall be a reachable inline declaration in all translation units in which it is declared; no diagnostic is required.
An inline function or variable with external or module linkage shall have the same address in all translation units.
[Note
:
A static local variable in an inline function with external or module linkage always refers to the same object.
A type defined within the body of an inline function with external or module linkage is the same type in every translation unit.
end note
]
An exported inline function or variable shall be defined in the translation unit containing its exported declaration, outside the private-module-fragment (if any).
[Note
:
There is no restriction on the linkage (or absence thereof) of entities that the function body of an exported inline function can reference.
A constexpr function ([dcl.constexpr]) is implicitly inline.
end note
]
The inline keyword has no effect on the linkage of a function.