Bug 11825 – An impossible memcpy at CTFE with cartesianProduct.array
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2013-12-26T09:51:00Z
Last change time
2014-07-10T21:35:42Z
Keywords
rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2013-12-26T09:51:27Z
import std.algorithm: cartesianProduct;
import std.array: array;
auto fullDeck = cartesianProduct([1], [2]).array;
void main() {}
DMD 2.065alpha gives me:
..\dmd2\src\phobos\std\conv.d(3880): Error: memcpy cannot be interpreted at compile time, because it has no available source code
..\dmd2\src\phobos\std\array.d(2409): called from here: emplace(&bigData[len], item)
..\dmd2\src\phobos\std\array.d(59): called from here: a.put(e)
test.d(3): called from here: array(cartesianProduct([1], [2]))
Comment #1 by bearophile_hugs — 2014-07-10T21:35:42Z