[Issue 11864] std.variant.Variant doesn't work with CTFE
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 7 07:55:06 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=11864
Norm Rowtree <norm.rowtree at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |norm.rowtree at gmail.com
--- Comment #2 from Norm Rowtree <norm.rowtree at gmail.com> ---
I get pretty much the same error reported using the code snippet below and DMD
D Compiler v2.084.0
struct S {
Variant v = Variant(10);
}
void main() {auto s = S();}
dmd2/linux/bin64/../../src/phobos/std/variant.d(661): Error: memcpy cannot be
interpreted at compile time, because it has no available source code
Error: cannot interpret <error> at compile time
I don't need this evaluated at compile time, I just want a default value when
the struct is instantiated at runtime.
Thanks,
Norm
--
More information about the Digitalmars-d-bugs
mailing list