Guest User

Untitled

a guest
Nov 18th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.01 KB | None | 0 0
  1. 7.1.2 Function specifiers
  2. 2 A function declaration (8.3.5, 9.3, 11.4) with an inline specifier declares an inline function. The inline
  3. specifier indicates to the implementation that inline substitution of the function body at the point of call
  4. is to be preferred to the usual function call mechanism. An implementation is not required to perform this
  5. inline substitution at the point of call; however, even if this inline substitution is omitted, the other rules
  6. for inline functions defined by 7.1.2 shall still be respected.
  7. 3 A function defined within a class definition is an inline function. The inline specifier shall not appear on
  8. a block scope function declaration.
  9. 87
  10. If the inline specifier is used in a friend declaration, that declaration
  11. shall be a definition or the function shall have previously been declared inline.
  12. 87) The inline keyword has no effect on the linkage of a function.
  13. § 7.1.2 137
  14. c ISO/IEC N3035=10-0025
  15. 4 An inline function shall be defined in every translation unit in which it is used and shall have exactly
  16. the same definition in every case (3.2). [ Note: a call to the inline function may be encountered before its
  17. definition appears in the translation unit. — end note ] If the definition of a function appears in a translation
  18. unit before its first declaration as inline, the program is ill-formed. If a function with external linkage is
  19. declared inline in one translation unit, it shall be declared inline in all translation units in which it appears;
  20. no diagnostic is required. An inline function with external linkage shall have the same address in all
  21. translation units. A static local variable in an extern inline function always refers to the same object.
  22. A string literal in the body of an extern inline function is the same object in different translation units.
  23. [ Note: A string literal appearing in a default argument expression is not in the body of an inline function
  24. merely because the expression is used in a function call from that inline function. — end note ]
Add Comment
Please, Sign In to add comment