std.algorithm.filter cannot call gc_malloc at compile time

John Colvin john.loughran.colvin at gmail.com
Tue Jul 9 09:44:26 PDT 2013


On Tuesday, 9 July 2013 at 16:28:21 UTC, Meta wrote:
> enum tokenRange = matchStr.split(",")
> 			  .map!(a => a.findSplit(`=>`)
> 				      .array
> 				      .map!strip)
> 			  .filter!"!a.empty";
>
> This won't compile. The error message is:
>
> .../core/memory.d(337): Error: gc_malloc cannot be interpreted 
> at compile time, because it has no available source code
>
> Is there some way I can work around this?

Fixed in git master. array was not ctfe-able until a few months 
back. What compiler version/release are you using?


More information about the Digitalmars-d-learn mailing list