File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -443,7 +443,7 @@ const char* g() { return "dynamic initialization"; }
443443constexpr const char* f(bool p) { return p ? "constant initializer" : g(); }
444444
445445constinit const char* c = f(true); // OK
446- constinit const char* d = f (false); // ERROR: ` g ` is not constexpr, so ` d ` cannot be evaluated at compile-time.
446+ constinit const char* d = g (false); // ERROR: ` g ` is not constexpr, so ` d ` cannot be evaluated at compile-time.
447447```
448448
449449## C++20 Library Features
Original file line number Diff line number Diff line change @@ -546,7 +546,7 @@ const char* g() { return "dynamic initialization"; }
546546constexpr const char* f(bool p) { return p ? "constant initializer" : g(); }
547547
548548constinit const char* c = f(true); // OK
549- constinit const char* d = f (false); // ERROR: ` g ` is not constexpr, so ` d ` cannot be evaluated at compile-time.
549+ constinit const char* d = g (false); // ERROR: ` g ` is not constexpr, so ` d ` cannot be evaluated at compile-time.
550550```
551551
552552## C++20 Library Features
You can’t perform that action at this time.
0 commit comments