mixin assembler does not work?

Foo via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jul 20 08:02:57 PDT 2014


On Sunday, 20 July 2014 at 14:55:00 UTC, Foo wrote:
> For clarification: how would that work without mixin + string?

I tried this:

mixin template Vala2(uint count, alias arr) {
	asm {
		sub ESP, count;
		mov arr, count;
		mov arr + 4, ESP;
	}
}

but I get several errors. Unfortunately it seems that asm cannot 
be used in mixin templates?!


More information about the Digitalmars-d-learn mailing list