Re: How do I call a C++ struct default constructor from D?

2017-02-08 Thread evilrat via Digitalmars-d-learn
On Tuesday, 7 February 2017 at 14:26:11 UTC, MGW wrote: On Tuesday, 7 February 2017 at 13:37:01 UTC, Atila Neves wrote: Here still example https://pp.vk.me/c636630/v636630885/46579/neSdIip1ySI.jpg I'm sorry for being offensive, but... Of course, and the next step will be pragma mangle on D fu

Re: How do I call a C++ struct default constructor from D?

2017-02-07 Thread MGW via Digitalmars-d-learn
On Tuesday, 7 February 2017 at 13:37:01 UTC, Atila Neves wrote: Here still example https://pp.vk.me/c636630/v636630885/46579/neSdIip1ySI.jpg

Re: How do I call a C++ struct default constructor from D?

2017-02-07 Thread MGW via Digitalmars-d-learn
On Tuesday, 7 February 2017 at 13:37:01 UTC, Atila Neves wrote: On Tuesday, 7 February 2017 at 10:46:24 UTC, kinke wrote: I've only every done trivial C++ integration before. As soon as I tried something "real" it all broke down incredibly fast. Probably going to have to file some bugs on name

Re: How do I call a C++ struct default constructor from D?

2017-02-07 Thread Atila Neves via Digitalmars-d-learn
On Tuesday, 7 February 2017 at 10:46:24 UTC, kinke wrote: On Tuesday, 7 February 2017 at 10:15:09 UTC, Atila Neves wrote: I can declare a C++ struct like so: extern(C++, mynamespace) struct Foo { //... } But... I don't want to repeat the initialisation code for that struct's default constr

Re: How do I call a C++ struct default constructor from D?

2017-02-07 Thread kinke via Digitalmars-d-learn
On Tuesday, 7 February 2017 at 10:15:09 UTC, Atila Neves wrote: I can declare a C++ struct like so: extern(C++, mynamespace) struct Foo { //... } But... I don't want to repeat the initialisation code for that struct's default constructor. I can't declare one in D because D doesn't allow de

How do I call a C++ struct default constructor from D?

2017-02-07 Thread Atila Neves via Digitalmars-d-learn
I can declare a C++ struct like so: extern(C++, mynamespace) struct Foo { //... } But... I don't want to repeat the initialisation code for that struct's default constructor. I can't declare one in D because D doesn't allow default constructors for structs. What's my way out? Thanks, Ati