|
1096 | 1096 | \pnum
|
1097 | 1097 | \indextext{specifier!\idxcode{inline}}%
|
1098 | 1098 | \indextext{inline function}%
|
| 1099 | +\indextext{inline variable}% |
| 1100 | +A variable declaration with an \keyword{inline} specifier declares an |
| 1101 | +\defnadj{inline}{variable}. |
1099 | 1102 | A function declaration\iref{dcl.fct,class.mfct,class.friend}
|
1100 | 1103 | with an \keyword{inline} specifier declares an
|
1101 |
| -\defnadj{inline}{function}. The inline specifier indicates to |
| 1104 | +\defnadj{inline}{function}. |
| 1105 | +\begin{note} |
| 1106 | +An inline function or variable |
| 1107 | +with external or module linkage |
| 1108 | +can be defined in multiple translation units\iref{basic.def.odr}, |
| 1109 | +but is one entity with one address. |
| 1110 | +A type or \keyword{static} variable |
| 1111 | +defined in the body of such a function |
| 1112 | +is therefore a single entity. |
| 1113 | +\end{note} |
| 1114 | + |
| 1115 | +\pnum |
| 1116 | +The inline specifier indicates to |
1102 | 1117 | the implementation that inline substitution of the function body at the
|
1103 | 1118 | point of call is to be preferred to the usual function call mechanism.
|
1104 | 1119 | An implementation is not required to perform this inline substitution at
|
|
1111 | 1126 | see~\ref{basic.link}.
|
1112 | 1127 | \end{note}
|
1113 | 1128 |
|
1114 |
| -\pnum |
1115 |
| -A variable declaration with an \keyword{inline} specifier declares an |
1116 |
| -\defnadj{inline}{variable}. |
1117 |
| - |
1118 | 1129 | \pnum
|
1119 | 1130 | The \keyword{inline} specifier shall not appear on a block scope declaration or
|
1120 | 1131 | on the declaration of a function parameter.
|
|
1136 | 1147 | before its definition becomes reachable in a translation unit.
|
1137 | 1148 | \end{note}
|
1138 | 1149 |
|
1139 |
| -\pnum |
1140 |
| -\begin{note} |
1141 |
| -An inline function or variable |
1142 |
| -with external or module linkage |
1143 |
| -can be defined in multiple translation units\iref{basic.def.odr}, |
1144 |
| -but is one entity with one address. |
1145 |
| -A type or \keyword{static} variable |
1146 |
| -defined in the body of such a function |
1147 |
| -is therefore a single entity. |
1148 |
| -\end{note} |
1149 |
| - |
1150 | 1150 | \pnum
|
1151 | 1151 | If an inline function or variable that is attached to a named module
|
1152 | 1152 | is declared in a definition domain,
|
|
0 commit comments