On 3 October 2016 at 13:50, Jacob via Digitalmars-d <[email protected]> wrote: > import std.stdio; > > struct SomeStruct > { > int value; > > void func() > { > writeln(value); > } > > } > > void main() > { > SomeStruct someStruct; > someStruct.value = 333; > > auto func = cast(void function(ref SomeStruct))&SomeStruct.func; > > func(someStruct); > } > > Has worked so far for me.
Some ABI's work. D would have to define that all methods use cdecl and eject 'thiscall' into space, which would be cool.
