An inline function shall be defined in every translation unit in which it is odr-used and shall have exactly the same definition in every case (3.2). If the definition of a function appears in a translation unit before its first declaration as inline, the program is ill-formed. If a function with external linkage is declared inline in one translation unit, it shall be declared inline in all translation units in which it appears ; no diagnostic is required. An inline function with external linkage shall have the same address in all translation units. A static local variable in an extern inline function always refers to the same object.
A string literal in the body of an extern inline function is the same object in different translation units.
A type defined within the body of an extern inline function is the same type in every translation unit.
Partager