On 03/30/2015 11:32 AM, Steven Schveighoffer wrote:
On 3/30/15 5:12 AM, Marc =?UTF-8?B?U2Now7x0eiI=?= schue...@gmx.net
wrote:
`this` is already a reference. You're taking the address of that
reference. A simple cast should work: `cast(void*) this`.
To build on this further, this for a
I'm registering a callback with some C code. The simplified story is
here, but the actual code is on GitHub [1] at the end if you care.
The call looks something like this.
void register(void(*fp)(void*), void* context);
I have a class that holds state for the callback and registers itself:
On 03/29/2015 10:57 PM, weaselcat wrote:
On Monday, 30 March 2015 at 02:53:36 UTC, Paul O'Neil wrote:
As of dmd 2.067, doing this is deprecated.
where is this documented? I don't see it in the release notes.
I don't see it in the release notes either, but it's happening. Maybe
it's an
On Tuesday, 20 January 2015 at 21:10:59 UTC, Guillaume Chatelet
wrote:
Consider the following foo.cpp
namespace A {
namespace B {
struct Type {};
int foo(Type unused){ return 42; }
}
}
Compile it : g++ foo.cpp -c -o foo.o
Then the following main.d
extern(C++, A.B) {
struct Type {}
On 12/17/2014 03:01 AM, Kagamin wrote:
previous thread:
http://forum.dlang.org/post/mailman.1464.1415039051.9932.digitalmar...@puremagic.com
I read that thread. I don't understand if / how it answers this question.
--
Paul O'Neil
Github / IRC: todayman
To make my C++ binding life easier, I wrote a small string structure [1]
in C++ to use instead of std::string and produced the D declarations for
some of it [2]. (It's not that complicated, I promise.) The important
properties of this struct are that it has a non-trivial copy constructor
and a
On 10/31/2014 12:55 AM, Meta wrote:
On Friday, 31 October 2014 at 02:01:00 UTC, Paul O'Neil wrote:
I'm trying to bind to some C++ code, but when I compile the D side,
there are errors. Here's my reduced test case:
// C++
namespace ns {
void func1();
void func2();
}
// D
module
I'm trying to bind to some C++ code, but when I compile the D side,
there are errors. Here's my reduced test case:
// C++
namespace ns {
void func1();
void func2();
}
// D
module cpp;
extern(C++, ns) void func1();
extern(C++, ns) void func2()
dmd says:cpp_test.d(4): Error: namespace