February 17, 2015 Re: H1 2015 - C++ integration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Guillaume Chatelet | On Tuesday, 17 February 2015 at 11:39:06 UTC, Guillaume Chatelet wrote:
> We'll also have to provide a new pragma to allow correct mangling of types on Windows. Maybe something like :
>
> extern(C++, std) {
>
> pragma(mangleAs, "class")
> struct basic_string()
> {
> ...
> }
>
> }
Yes please. I'm running into the same issue right now. Changing everything to struct on the c++ side is not always possible.
|
February 17, 2015 Re: H1 2015 - C++ integration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Benjamin Thaut | On Tuesday, 17 February 2015 at 12:09:11 UTC, Benjamin Thaut wrote: > On Tuesday, 17 February 2015 at 11:39:06 UTC, Guillaume Chatelet wrote: >> We'll also have to provide a new pragma to allow correct mangling of types on Windows. Maybe something like : >> >> extern(C++, std) { >> >> pragma(mangleAs, "class") >> struct basic_string() >> { >> ... >> } >> >> } > > Yes please. I'm running into the same issue right now. Changing everything to struct on the c++ side is not always possible. Created https://issues.dlang.org/show_bug.cgi?id=14193 |
February 17, 2015 Re: H1 2015 - C++ integration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Guillaume Chatelet | On 2/17/15 3:34 AM, Guillaume Chatelet wrote: > On Sunday, 15 February 2015 at 19:49:28 UTC, Andrei Alexandrescu wrote: >> Please file bugs for any constructor/destructor issues you find (I >> notice you filed one already). Walter is up to the task and of course >> I'm counting on others, too. > > ctor/dtor C++ naming : https://issues.dlang.org/show_bug.cgi?id=14086 > invalid stl manlging : https://issues.dlang.org/show_bug.cgi?id=14178 > > Questions : > + Shall I add one more to allow default ctor for struct when they are > extern C++ ? (ie. no @disable) This is tricky. I'd say for now we shouldn't allow default-constructed C++ objects. We can later add a special type e.g. CppDefault to mean "invoke the C++ default constructor". > + I guess this C++ STL binding will end up in phobos. Any idea of where > this should be put ? core.stdcpp. Andrei |
February 17, 2015 Re: H1 2015 - C++ integration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Guillaume Chatelet | On 2/17/15 3:39 AM, Guillaume Chatelet wrote:
> We'll also have to provide a new pragma to allow correct mangling of
> types on Windows. Maybe something like :
>
> extern(C++, std) {
>
> pragma(mangleAs, "class")
> struct basic_string()
> {
> ...
> }
>
> }
Yah, I don't think we can get away without that. -- Andrei
|
February 17, 2015 Re: H1 2015 - C++ integration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Guillaume Chatelet | On Tuesday, 17 February 2015 at 11:39:06 UTC, Guillaume Chatelet wrote:
> We'll also have to provide a new pragma to allow correct mangling of types on Windows. Maybe something like :
>
> extern(C++, std) {
>
> pragma(mangleAs, "class")
> struct basic_string()
> {
> ...
> }
>
> }
+1 please!
---
Paolo
|
July 05, 2015 Re: H1 2015 - C++ integration | ||||
---|---|---|---|---|
| ||||
Posted in reply to Guillaume Chatelet | On Friday, 13 February 2015 at 12:23:58 UTC, Guillaume Chatelet wrote: > I'm working on integration of D with the C++ STL (at least the linux gnu one). > > [...] I finally took some time to put up a first draft https://github.com/D-Programming-Language/druntime/pull/1316 There's a bunch of questions in there as well, please destroy :) |
Copyright © 1999-2021 by the D Language Foundation