May 15, 2014 Re: Any chance to avoid monitor field in my class? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Yuriy | "Yuriy" wrote in message news:rfirqtgbparjbqxwtppo@forum.dlang.org... > On Wednesday, 14 May 2014 at 08:47:38 UTC, Daniel Murphy wrote: > > I'm not getting any errors with the development head. What os/compiler version? > Hm, now that's strange. Building with latest public version seems to work. However, development head is doing the following: Never mind I can reproduce the bug with master, I probably ran 'dmd test.d' instead of './dmd test.d' after building dmd. This version seems to compile - the new manger can't handle extern(C++) functions with D arrays as arguments or return types. extern(C++) class A(T) { extern(D): string hi() { return "asdf"; } } void main() { A!string a; } Only the subset of extern(C++) required to interface with actual C++ code has been tested at all, so using it with D-only types is going to be fairly unpleasant. |
May 15, 2014 Re: Any chance to avoid monitor field in my class? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Murphy | On Thursday, 15 May 2014 at 11:51:38 UTC, Daniel Murphy wrote: > This version seems to compile - the new manger can't handle extern(C++) functions with D arrays as arguments or return types. Ok, i can understand that, but what about this one: http://dpaste.dzfl.pl/6a9961e32e6d It doesn't use d arrays in function interfaces. Should it work? |
May 16, 2014 Re: Any chance to avoid monitor field in my class? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Yuriy | "Yuriy" wrote in message news:klosrzuxwmvilupzzuvm@forum.dlang.org... > Ok, i can understand that, but what about this one: > http://dpaste.dzfl.pl/6a9961e32e6d > It doesn't use d arrays in function interfaces. Should it work? Similar problem, D arrays cannot be mangled correctly with C++ mangling. This compiles: extern(C++) interface I { extern(D): int hi(); } extern(C++) class A(T) : I { extern(D): override int hi() { return 0; } } void main() { A!string a; } |
Copyright © 1999-2021 by the D Language Foundation