Closed jonathanbcarlson closed 3 months ago
In the constinit example in CPP20.md:
constinit
const char* g() { return "dynamic initialization"; } constexpr const char* f(bool p) { return p ? "constant initializer" : g(); } constinit const char* c = f(true); // OK constinit const char* d = f(false); // ERROR: `g` is not constexpr, so `d` cannot be evaluated at compile-time.
it has d = f(false) when it should be d = g(false).
d = f(false)
d = g(false)
Thanks for all the work on this wonderful cheatsheet!
Thanks for the bug report! Done
In the
constinit
example in CPP20.md:it has
d = f(false)
when it should bed = g(false)
.Thanks for all the work on this wonderful cheatsheet!