On Saturday, 30 January 2016 at 13:37:43 UTC, Kagamin wrote:
Alias templates require stack pointer, init probably has it set
to null.
Try this:
FooType foo = FooType();
Yes, that fixed it. Interesting.
Alias templates require stack pointer, init probably has it set
to null.
Try this:
FooType foo = FooType();
On Saturday, 30 January 2016 at 05:18:08 UTC, Steven
Schveighoffer wrote:
https://issues.dlang.org/enter_bug.cgi
-Steve
Added!
https://issues.dlang.org/show_bug.cgi?id=15627
Thanks for the help.
On 1/29/16 11:53 PM, Matt Elkins wrote:
Title says it; I get an access violation in code marked @safe. Here's a
minimal example:
[code]
@safe:
struct Foo(alias Callback)
{
~this() {Callback();}
}
unittest
{
uint stackVar;
alias FooType = Foo!((){++stackVar;});
FooType[1] f
Title says it; I get an access violation in code marked @safe.
Here's a minimal example:
[code]
@safe:
struct Foo(alias Callback)
{
~this() {Callback();}
}
unittest
{
uint stackVar;
alias FooType = Foo!((){++stackVar;});
FooType[1] foos;
foos[0] = FooType.init;
}
[/code]