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
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
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
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
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 :
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()
{
...
}
}
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
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)
On Sunday, 15 February 2015 at 14:42:46 UTC, Guillaume Chatelet
wrote:
I updated https://github.com/gchatelet/dlang_cpp_std to provide
a struct and class implementation of string.
Also added a README to weigh the pros and cons of each, list
bugs I encountered and other things we need to think
I updated https://github.com/gchatelet/dlang_cpp_std to provide a
struct and class implementation of string.
Also added a README to weigh the pros and cons of each, list bugs
I encountered and other things we need to think about.
On 2/15/15 6:42 AM, Guillaume Chatelet wrote:
I updated https://github.com/gchatelet/dlang_cpp_std to provide a struct
and class implementation of string.
Also added a README to weigh the pros and cons of each, list bugs I
encountered and other things we need to think about.
Awesome work,
On Sunday, 15 February 2015 at 19:44:39 UTC, Guillaume Chatelet
wrote:
On Sunday, 15 February 2015 at 15:37:33 UTC, Paolo Invernizzi
wrote:
That's a great work.
Thx :)
Guillaume, I'll try to ask this question again.
I'm wrapping the C++ API of OpenCV [1], and it works great.
I'm using a D
On Sunday, 15 February 2015 at 15:37:33 UTC, Paolo Invernizzi
wrote:
That's a great work.
Thx :)
Guillaume, I'll try to ask this question again.
I'm wrapping the C++ API of OpenCV [1], and it works great.
I'm using a D struct for std::string instead of D class,
because I agree with your
On Friday, 13 February 2015 at 18:47:53 UTC, Daniel Murphy wrote:
Guillaume Chatelet wrote in message
news:gvnxmwplwkyfrydwr...@forum.dlang.org...
I'm not sure I get your point. In C++ classes without vtables
are exactly like structs. Also I don't see any difference
between a struct or a
On Saturday, 14 February 2015 at 18:04:50 UTC, Andrei
Alexandrescu wrote:
On 2/13/15 4:23 AM, Guillaume Chatelet wrote:
* In the video Walter posted recently (3), he states that one
should use
a class to represent a std::string or std::vector in D because
most of
the time we want to have
I did a few tests. Using a class doesn't work because of the
added vptr.
The data would be managed at the same time on the D and the C++
side.
Structs work however because we can add something like this :
struct std_string {
void[8] _ = void; // to match sizeof(std::string) and pad the
On Saturday, 14 February 2015 at 17:24:51 UTC, Guillaume Chatelet
wrote:
I did a few tests. Using a class doesn't work because of the
added vptr.
The data would be managed at the same time on the D and the C++
side.
Structs work however because we can add something like this :
struct
On 2/13/15 4:23 AM, Guillaume Chatelet wrote:
* In the video Walter posted recently (3), he states that one should use
a class to represent a std::string or std::vector in D because most of
the time we want to have reference semantic. I find this a bit counter
intuitive for people coming from
Guillaume Chatelet wrote in message
news:fzxoskcrswitmsdsz...@forum.dlang.org...
I did a few tests. Using a class doesn't work because of the added vptr.
This is a bug, D currently adds a vptr even if there are no members. It's
just one that doesn't happen to affect ddmd so I never got
On Saturday, 14 February 2015 at 19:54:53 UTC, Daniel Murphy
wrote:
- name mangling on linux (bug reported in my first message)
Is this in bugzilla?
I just created it
https://issues.dlang.org/show_bug.cgi?id=14178
On Friday, 13 February 2015 at 13:03:18 UTC, Kagamin wrote:
It's not like you're free to choose, because struct and class
can use different mangling.
I'm not sure I get your point. In C++ classes without vtables are
exactly like structs. Also I don't see any difference between a
struct or a
On Friday, 13 February 2015 at 14:07:44 UTC, Guillaume Chatelet
wrote:
I'm not sure I get your point. In C++ classes without vtables
are exactly like structs. Also I don't see any difference
between a struct or a class name mangling on Gnu Linux.
Do you want it to be compatible with Gnu Linux
It's not like you're free to choose, because struct and class can
use different mangling.
On Friday, 13 February 2015 at 14:15:10 UTC, Kagamin wrote:
On Friday, 13 February 2015 at 14:07:44 UTC, Guillaume Chatelet
wrote:
I'm not sure I get your point. In C++ classes without vtables
are exactly like structs. Also I don't see any difference
between a struct or a class name mangling
Guillaume Chatelet wrote in message
news:gvnxmwplwkyfrydwr...@forum.dlang.org...
I'm not sure I get your point. In C++ classes without vtables are exactly
like structs. Also I don't see any difference between a struct or a class
name mangling on Gnu Linux.
class/struct S{};
S foo();
foo
I'm working on integration of D with the C++ STL (at least the
linux gnu one).
* You can have a look at a current draft implementation (1).
* There is a name mangling issue in dmd related to the
compression of usual stl types when the type is const
eg. dmd will mangle 'std::vectorint::size()
26 matches
Mail list logo