www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11825] New: An impossible memcpy at CTFE with cartesianProduct.array


           Summary: An impossible memcpy at CTFE with
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc

--- Comment #0 from bearophile_hugs eml.cc 2013-12-26 09:51:27 PST ---
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]))

Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Dec 26 2013