File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 7367
7367
a control flow that passes through
7368
7368
a declaration of a variable with
7369
7369
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 }
7371
7382
7372
7383
\item
7373
7384
an invocation of a non-constexpr function;
Original file line number Diff line number Diff line change 1801
1801
\defnxname {cpp_char8_t} & \tcode {202207L} \\ \rowsep
1802
1802
\defnxname {cpp_concepts} & \tcode {202002L} \\ \rowsep
1803
1803
\defnxname {cpp_conditional_explicit} & \tcode {201806L} \\ \rowsep
1804
- \defnxname {cpp_constexpr} & \tcode {202207L } \\ \rowsep
1804
+ \defnxname {cpp_constexpr} & \tcode {202211L } \\ \rowsep
1805
1805
\defnxname {cpp_constexpr_dynamic_alloc} & \tcode {201907L} \\ \rowsep
1806
1806
\defnxname {cpp_constexpr_in_decltype} & \tcode {201711L} \\ \rowsep
1807
1807
\defnxname {cpp_consteval} & \tcode {201811L} \\ \rowsep
You can’t perform that action at this time.
0 commit comments