Skip to content

Commit b12b971

Browse files
committed
Fix function call in constinit section.
1 parent 65d08b8 commit b12b971

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CPP20.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ const char* g() { return "dynamic initialization"; }
493493
constexpr const char* f(bool p) { return p ? "constant initializer" : g(); }
494494

495495
constinit const char* c = f(true); // OK
496-
constinit const char* d = g(false); // ERROR: `g` is not constexpr, so `d` cannot be evaluated at compile-time.
496+
constinit const char* d = g(); // ERROR: `g` is not constexpr, so `d` cannot be evaluated at compile-time.
497497
```
498498
499499
### \_\_VA\_OPT\_\_

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ const char* g() { return "dynamic initialization"; }
597597
constexpr const char* f(bool p) { return p ? "constant initializer" : g(); }
598598

599599
constinit const char* c = f(true); // OK
600-
constinit const char* d = g(false); // ERROR: `g` is not constexpr, so `d` cannot be evaluated at compile-time.
600+
constinit const char* d = g(); // ERROR: `g` is not constexpr, so `d` cannot be evaluated at compile-time.
601601
```
602602

603603
### \_\_VA\_OPT\_\_

0 commit comments

Comments
 (0)