[Issue 19720] const structs without explicit initializer are not usable in CTFE expressions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 6 11:09:49 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19720
Simen Kjaeraas <simen.kjaras at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |simen.kjaras at gmail.com
Resolution|--- |INVALID
--- Comment #1 from Simen Kjaeraas <simen.kjaras at gmail.com> ---
This is intended behavior - a const variable with an initializer has a known
value at compile time, while one without is expected to be initialized in a
static constructor, and using its value before that point is undefined
behavior.
--
More information about the Digitalmars-d-bugs
mailing list