From Jason Turner

[dcl.fct.spec]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpgkhom4jg/{from.md → to.md} +0 -34
tmp/tmpgkhom4jg/{from.md → to.md} RENAMED
@@ -2,48 +2,14 @@
2
 
3
  can be used only in function declarations.
4
 
5
  ``` bnf
6
  function-specifier:
7
- 'inline'
8
  'virtual'
9
  'explicit'
10
  ```
11
 
12
- A function declaration ([[dcl.fct]],  [[class.mfct]], [[class.friend]])
13
- with an `inline` specifier declares an *inline function*. The inline
14
- specifier indicates to the implementation that inline substitution of
15
- the function body at the point of call is to be preferred to the usual
16
- function call mechanism. An implementation is not required to perform
17
- this inline substitution at the point of call; however, even if this
18
- inline substitution is omitted, the other rules for inline functions
19
- defined by  [[dcl.fct.spec]] shall still be respected.
20
-
21
- A function defined within a class definition is an inline function. The
22
- `inline` specifier shall not appear on a block scope function
23
- declaration.[^2] If the `inline` specifier is used in a friend
24
- declaration, that declaration shall be a definition or the function
25
- shall have previously been declared inline.
26
-
27
- An inline function shall be defined in every translation unit in which
28
- it is odr-used and shall have exactly the same definition in every
29
- case ([[basic.def.odr]]). A call to the inline function may be
30
- encountered before its definition appears in the translation unit. If
31
- the definition of a function appears in a translation unit before its
32
- first declaration as inline, the program is ill-formed. If a function
33
- with external linkage is declared inline in one translation unit, it
34
- shall be declared inline in all translation units in which it appears;
35
- no diagnostic is required. An `inline` function with external linkage
36
- shall have the same address in all translation units. A `static` local
37
- variable in an `extern` `inline` function always refers to the same
38
- object. A string literal in the body of an `extern` `inline` function is
39
- the same object in different translation units. A string literal
40
- appearing in a default argument is not in the body of an inline function
41
- merely because the expression is used in a function call from that
42
- inline function. A type defined within the body of an `extern inline`
43
- function is the same type in every translation unit.
44
-
45
  The `virtual` specifier shall be used only in the initial declaration of
46
  a non-static class member function; see  [[class.virtual]].
47
 
48
  The `explicit` specifier shall be used only in the declaration of a
49
  constructor or conversion function within its class definition; see 
 
2
 
3
  can be used only in function declarations.
4
 
5
  ``` bnf
6
  function-specifier:
 
7
  'virtual'
8
  'explicit'
9
  ```
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  The `virtual` specifier shall be used only in the initial declaration of
12
  a non-static class member function; see  [[class.virtual]].
13
 
14
  The `explicit` specifier shall be used only in the declaration of a
15
  constructor or conversion function within its class definition; see