cpp_binder, a not-yet-useful tool for generating C++ bindings
Ola Fosheim Grøstad via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Mon Sep 21 09:01:23 PDT 2015
On Monday, 21 September 2015 at 09:45:01 UTC, ZombineDev wrote:
> I guess that the only thing that doesn't map directly to D is
> &&. The others look on the D side like this:
> C++ -> D
> T* -> T*
> T& -> ref T
> const T* -> const T*
> const T& -> const ref T
I don't think D const and C++ const share semantics. In C++ you
can write to things pointed to by T even if T is const. You also
have no guarantee that a "const T" isn't mutated by another
thread, I believe.
A C++ pointer is what D would call a shared pointer, whereas C++
does not have the concept of thread local pointers.
etc.
More information about the Digitalmars-d-announce
mailing list