Skip to content

Commit efc0d1e

Browse files
author
Stefanus Du Toit
committed
CWG1511 const volatile variables and the one-definition rule
1 parent f61d893 commit efc0d1e

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

source/basic.tex

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -399,12 +399,11 @@
399399
the definition of \tcode{D}, or shall refer to the same entity, after
400400
overload resolution~(\ref{over.match}) and after matching of partial
401401
template specialization~(\ref{temp.over}), except that a name can refer
402-
to a \tcode{const} object with internal or no linkage if the object has
403-
the same literal type in all definitions of \tcode{D},
402+
to a non-volatile \tcode{const} object with internal or no linkage if the
403+
object has the same literal type in all definitions of \tcode{D},
404404
and the object is initialized with a constant
405-
expression~(\ref{expr.const}), and the value (but not the address) of
406-
the object is used, and the object has the same value in all definitions
407-
of \tcode{D}; and
405+
expression~(\ref{expr.const}), and the object is not odr-used, and the object
406+
has the same value in all definitions of \tcode{D}; and
408407
\item in each definition of \tcode{D}, corresponding entities shall have the
409408
same language linkage; and
410409
\item in each definition of \tcode{D}, the overloaded operators referred
@@ -2207,9 +2206,9 @@
22072206
\item a variable, function or function template that is
22082207
explicitly declared \tcode{static}; or,
22092208

2210-
\item a variable that is explicitly declared \tcode{const} or \tcode{constexpr}
2211-
and neither explicitly declared \tcode{extern} nor previously declared
2212-
to have external linkage; or
2209+
\item a non-volatile variable that is explicitly declared \tcode{const} or
2210+
\tcode{constexpr} and neither explicitly declared \tcode{extern} nor previously
2211+
declared to have external linkage; or
22132212

22142213
\item a data member of an anonymous union.
22152214
\end{itemize}

0 commit comments

Comments
 (0)