Skip to content

Commit 06bd91b

Browse files
authored
Merge 2022-11 CWG Motion 8
2 parents f810445 + 2e92639 commit 06bd91b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

source/expressions.tex

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7367,7 +7367,18 @@
73677367
a control flow that passes through
73687368
a declaration of a variable with
73697369
static\iref{basic.stc.static} or
7370-
thread\iref{basic.stc.thread} storage duration;
7370+
thread\iref{basic.stc.thread} storage duration,
7371+
unless that variable is usable in constant expressions;
7372+
\begin{example}
7373+
\begin{codeblock}
7374+
constexpr char test() {
7375+
static const int x = 5;
7376+
static constexpr char c[] = "Hello World";
7377+
return *(c + x);
7378+
}
7379+
static_assert(' ' == test());
7380+
\end{codeblock}
7381+
\end{example}
73717382

73727383
\item
73737384
an invocation of a non-constexpr function;

source/preprocessor.tex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1801,7 +1801,7 @@
18011801
\defnxname{cpp_char8_t} & \tcode{202207L} \\ \rowsep
18021802
\defnxname{cpp_concepts} & \tcode{202002L} \\ \rowsep
18031803
\defnxname{cpp_conditional_explicit} & \tcode{201806L} \\ \rowsep
1804-
\defnxname{cpp_constexpr} & \tcode{202207L} \\ \rowsep
1804+
\defnxname{cpp_constexpr} & \tcode{202211L} \\ \rowsep
18051805
\defnxname{cpp_constexpr_dynamic_alloc} & \tcode{201907L} \\ \rowsep
18061806
\defnxname{cpp_constexpr_in_decltype} & \tcode{201711L} \\ \rowsep
18071807
\defnxname{cpp_consteval} & \tcode{201811L} \\ \rowsep

0 commit comments

Comments
 (0)