Re: akePureMalloc cannot be interpreted at compile time

2020-03-05 Thread Adam D. Ruppe via Digitalmars-d-learn
On Thursday, 5 March 2020 at 20:13:11 UTC, Adnan wrote: auto d = some!(some!int(9)); My guess would be this line is causing your trouble. That is trying to pass an instance as a value at compile time, thus triggering ctfe. Since you use the `Array` object inside and that uses malloc

akePureMalloc cannot be interpreted at compile time

2020-03-05 Thread Adnan via Digitalmars-d-learn
The following program produces an error message and it is not clear exactly what line causes this error: module maybe; @nogc: private import std.container : Array; struct MayBe(T) { Array!T data; this(T datum) { data.reserve(1); data.insert(datu