Struct default constructor - need some kind of solution for C++ interop
Dicebot via Digitalmars-d
digitalmars-d at puremagic.com
Wed Sep 7 04:42:40 PDT 2016
On Wednesday, 7 September 2016 at 11:35:45 UTC, Daniel Kozak
wrote:
> Dne 7.9.2016 v 13:16 Ethan Watson via Digitalmars-d napsal(a):
>
>> On Tuesday, 6 September 2016 at 14:49:20 UTC, Ethan Watson
>> wrote:
>>> this( void* pArg = null );
>>
>> Also doesn't work: this( Args... )( Args args ) if(
>> Args.length == 0 )
>>
>> Just for funsies I tried making my Mutex a class for the
>> purpose of embedding it manually in a struct. But thanks to
>> all classes inheriting from Object there's 16 bytes at the
>> front of the class that I don't want (64-bit build, it's 8
>> bytes in 32-bit builds but we're never going back to 32-bit).
>> So that's very definitely out of the question.
> Even extern(C++) class ?
>
> https://dlang.org/spec/cpp_interface.html#classes
If it is so, I'd call it a major extern(c++) bug.
More information about the Digitalmars-d
mailing list