[Issue 8349] CTFE memcpy Error with ctRegex

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jul 5 06:52:39 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8349


Dmitry Olshansky <dmitry.olsh at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmitry.olsh at gmail.com


--- Comment #1 from Dmitry Olshansky <dmitry.olsh at gmail.com> 2012-07-05 06:52:37 PDT ---
(In reply to comment #0)
> import std.regex;
> 
> enum peakRegexStr = r"\>(wgEncode.*Tfbs.*\.(?:narrow)|(?:broad)Peak.gz)</a>";
> enum peakRegex = ctRegex!(peakRegexStr);
> 
> d:\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(1334): Error: memcpy
> cannot be interpreted at compile time, because it has no available source code
> d:\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(1431):        called from
> here: move(front(src),front(tgt))

Too bad somebody clever enough made std.algorithm.move to use memcpy... and
forgot to provide a fallback for CTFE.

We'll have these sort of problems till the day we finally replace ALL of C
magic with proper D equivalents. In this case array ops should do just fine (if
not faster).

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


More information about the Digitalmars-d-bugs mailing list