Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 7.1.2 Function specifiers
- 2 A function declaration (8.3.5, 9.3, 11.4) 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 defined by 7.1.2 shall still be respected.
- 3 A function defined within a class definition is an inline function. The inline specifier shall not appear on
- a block scope function declaration.
- 87
- If the inline specifier is used in a friend declaration, that declaration
- shall be a definition or the function shall have previously been declared inline.
- 87) The inline keyword has no effect on the linkage of a function.
- § 7.1.2 137
- c ISO/IEC N3035=10-0025
- 4 An inline function shall be defined in every translation unit in which it is used and shall have exactly
- the same definition in every case (3.2). [ Note: a call to the inline function may be encountered before its
- definition appears in the translation unit. — end note ] 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.
- [ Note: A string literal appearing in a default argument expression is not in the body of an inline function
- merely because the expression is used in a function call from that inline function. — end note ]
Add Comment
Please, Sign In to add comment