-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from t3nsor/master
D2686 updates from CWG Monday morning review in St. Louis
- Loading branch information
Showing
1 changed file
with
23 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
\documentclass{wg21} | ||
|
||
\title{\tcode{constexpr} structured bindings\\{\small and}\\\ references to \tcode{constexpr} variables} | ||
\docnumber{P2686R3} | ||
\docnumber{D2686R4} | ||
\audience{EWG, CWG} | ||
\author{Corentin Jabot}{[email protected]} | ||
\authortwo{Brian Bi}{[email protected]} | ||
|
@@ -23,6 +23,13 @@ \section{Abstract} | |
|
||
\section{Revisions} | ||
|
||
\subsection{Revision 4} | ||
|
||
The definitions of "constituent values" and "constituent references" have been | ||
tweaked slightly with no change in meaning. The imprecise "at a point [...] | ||
namespace scope" wording has been changed to refer to the nearest following | ||
point at namespace scope. | ||
|
||
\subsection{Revision 3} | ||
|
||
CWG pointed out that the restrictions on volatile variables and mutable subobjects in the definition of ``usable in constant expressions'' have undesirable consequences. Those restrictions have therefore been moved to [basic.def.odr]. An unintentional omission in R2 has also been fixed: a local static constexpr reference shall not refer to a variable with automatic storage duration. Examples have also been added to the wording section. | ||
|
@@ -526,11 +533,19 @@ \section{Wording for Option 3a (symbolic addressing with the same-function restr | |
\ednote{Insert a paragraph after p1:} | ||
|
||
\begin{addedblock} | ||
The \defn{constituent values} of an object $o$ are the value of $o$ if it has scalar type and the values of | ||
any of $o$’s subobjects of scalar type, other than inactive union members and subobjects | ||
thereof. The \defn{constituent references} of an object $o$ are the non-static data members of | ||
reference type of $o$ and of any of $o$’s subobjects that are neither inactive union members nor | ||
subobjects thereof. | ||
The \defn{constituent values} of an object $o$ are: | ||
\begin{itemize} | ||
\item if $o$ has scalar type, the value of $o$; | ||
\item otherwise, the constituent values of any direct subobjects of $o$, other | ||
than inactive union members. | ||
\end{itemize} | ||
|
||
The \defn{constituent references} of an object $o$ are: | ||
\begin{itemize} | ||
\item any direct members of $o$ that have reference type, and | ||
\item the constituent references of any direct subobjects of $o$ other than | ||
inactive union members. | ||
\end{itemize} | ||
\end{addedblock} | ||
|
||
\ednote{Insert a paragraph after p1:} | ||
|
@@ -614,7 +629,7 @@ \section{Wording for Option 3a (symbolic addressing with the same-function restr | |
returns \keyword{true}. | ||
\end{note}\added{, and} | ||
\begin{addedblock} | ||
\item immediately after the initializing declaration of \tcode{v}, the object or reference declared by \tcode{v} is constexpr-representable, and if \tcode{v} has static or thread storage duration, the object or reference declared by \tcode{v} is constexpr-representable at a point that follows the initializing declaration of \tcode{v} and whose immediate scope is a namespace scope. | ||
\item immediately after the initializing declaration of \tcode{v}, the object or reference declared by \tcode{v} is constexpr-representable, and if \tcode{v} has static or thread storage duration, the object or reference declared by \tcode{v} is constexpr-representable at the nearest point following the initializing declaration of \tcode{v} whose immediate scope is a namespace scope. | ||
\end{addedblock} | ||
\end{itemize} | ||
\begin{addedblock} | ||
|
@@ -915,7 +930,7 @@ \section{Wording for Option 3a (symbolic addressing with the same-function restr | |
Immediately after the initializing declaration of \tcode{v}, | ||
$x$ shall be constexpr-representable. | ||
If $x$ has static or thread storage duration, $x$ shall be | ||
constexpr-representable at a point following the initializing declaration of | ||
constexpr-representable at the nearest point following the initializing declaration of | ||
\tcode{v} whose immediate scope is a namespace scope. | ||
} | ||
|
||
|