diff --git a/source/basic.tex b/source/basic.tex index 4fba76b449..1630bf05f3 100644 --- a/source/basic.tex +++ b/source/basic.tex @@ -276,11 +276,10 @@ \rSec1[basic.def.odr]{One-definition rule} \pnum -A variable, function, class type, enumeration type, template, +No translation unit shall contain more than one definition of any +variable, function, class type, enumeration type, template, default argument for a parameter (for a function in a given scope), or -default template argument -shall not be defined where a prior definition is necessarily reachable\iref{module.reach}; -no diagnostic is required if the prior declaration is in another translation unit. +default template argument. \pnum \indextext{expression!potentially evaluated}% @@ -560,8 +559,7 @@ \item default template argument \end{itemize} in a program provided that -no prior definition is necessarily reachable\iref{module.reach} -at the point where a definition appears, and +each definition appears in a different translation unit, and provided the definitions satisfy the following requirements. There shall not be more than one definition of an entity diff --git a/source/modules.tex b/source/modules.tex index f36a1c3c7e..4d51f18206 100644 --- a/source/modules.tex +++ b/source/modules.tex @@ -858,7 +858,7 @@ \item the point at the end of translation unit \#3, and \item the point of the call to \tcode{g(0)}, \end{itemize} -so the definition of \tcode{X} is not necessarily reachable, +so the definition of \tcode{X} need not be reachable, as described in \ref{module.reach}. \end{example} @@ -897,16 +897,14 @@ \pnum A declaration $D$ is -\defnx{reachable}{reachable!declaration} or -\defnx{necessarily reachable}{reachable!necessarily!declaration}, -respectively, if, +\defnx{reachable}{reachable!declaration}, if, for any point $P$ in the instantiation context\iref{module.context}, \begin{itemize} \item $D$ appears prior to $P$ in the same translation unit, or \item $D$ is not discarded\iref{module.global}, appears in a translation unit that is -reachable or necessarily reachable from $P$, respectively, +reachable from $P$, and either does not appear within a \grammarterm{private-module-fragment} or appears in a \grammarterm{private-module-fragment} diff --git a/source/preprocessor.tex b/source/preprocessor.tex index 5bce3d1f95..c6a71cff9e 100644 --- a/source/preprocessor.tex +++ b/source/preprocessor.tex @@ -624,7 +624,10 @@ \pnum If the header identified by the \grammarterm{header-name} denotes an importable header\iref{module.import}, -the preprocessing directive +it is +\impldef{whether source file inclusion of importable header +is replaced with \tcode{import}} +whether the preprocessing directive is instead replaced by the \grammarterm{preprocessing-token}{s} \begin{ncbnf} \terminal{import} header-name \terminal{;} @@ -1703,6 +1706,7 @@ \defnxname{cpp_initializer_lists} & \tcode{200806L} \\ \rowsep \defnxname{cpp_inline_variables} & \tcode{201606L} \\ \rowsep \defnxname{cpp_lambdas} & \tcode{200907L} \\ \rowsep +\defnxname{cpp_modules} & \tcode{201907L} \\ \rowsep \defnxname{cpp_namespace_attributes} & \tcode{201411L} \\ \rowsep \defnxname{cpp_noexcept_function_type} & \tcode{201510L} \\ \rowsep \defnxname{cpp_nontype_template_args} & \tcode{201411L} \\ \rowsep