digitalmars.D - extern(C++) infer linkage from interface?
- bitwise (25/25) Apr 22 2015 I have a class with callbacks that can be overridden, which are inherite...
- bitwise (2/28) Apr 24 2015 Bump
- Daniel Murphy (4/7) Apr 25 2015 I think there's a bug report about this, somewhere. I'm not sure it's w...
I have a class with callbacks that can be overridden, which are inherited
from an extern(C++) interface. The callbacks are called from C++ code. Is
there any chance that the linkage will be inferred in the future?
To be clear, couldn't the extern(C++) just be inferred in the class
'MyTest' below?
extern(C++) {
interface Test {
void Foo();
}
void register(Test test);
void unregister(Test test);
}
class MyTest : Test {
extern(C++) { // seemingly unnecessary boilerplate
void Foo() {
writeln("foo");
}
}
}
void main() {
MyTest test = new MyTest();
register(test);
while(...) {}
unregister(test);
}
Apr 22 2015
On Thursday, 23 April 2015 at 00:47:30 UTC, bitwise wrote:
I have a class with callbacks that can be overridden, which are
inherited from an extern(C++) interface. The callbacks are
called from C++ code. Is there any chance that the linkage will
be inferred in the future?
To be clear, couldn't the extern(C++) just be inferred in the
class 'MyTest' below?
extern(C++) {
interface Test {
void Foo();
}
void register(Test test);
void unregister(Test test);
}
class MyTest : Test {
extern(C++) { // seemingly unnecessary boilerplate
void Foo() {
writeln("foo");
}
}
}
void main() {
MyTest test = new MyTest();
register(test);
while(...) {}
unregister(test);
}
Bump
Apr 24 2015
"bitwise" wrote in message news:op.xxishfi24sdys0 nicolass-macbook-pro.local...I have a class with callbacks that can be overridden, which are inherited from an extern(C++) interface. The callbacks are called from C++ code. Is there any chance that the linkage will be inferred in the future?I think there's a bug report about this, somewhere. I'm not sure it's worth changing.
Apr 25 2015
On Sat, 25 Apr 2015 09:50:46 -0400, Daniel Murphy <yebbliesnospam gmail.com> wrote:"bitwise" wrote in message news:op.xxishfi24sdys0 nicolass-macbook-pro.local...Ok, thanks for the info. I was wondering if there was some prohibitive reason that the behavior I'm requesting was not currently in force. I guess I'll dig around in bugzilla then, and file an enhancement request if one does not exist.I have a class with callbacks that can be overridden, which are inherited from an extern(C++) interface. The callbacks are called from C++ code. Is there any chance that the linkage will be inferred in the future?I think there's a bug report about this, somewhere. I'm not sure it's worth changing.
Apr 26 2015
On Sat, 25 Apr 2015 09:50:46 -0400, Daniel Murphy <yebbliesnospam gmail.com> wrote:"bitwise" wrote in message news:op.xxishfi24sdys0 nicolass-macbook-pro.local...For reference: https://issues.dlang.org/show_bug.cgi?id=13867I have a class with callbacks that can be overridden, which are inherited from an extern(C++) interface. The callbacks are called from C++ code. Is there any chance that the linkage will be inferred in the future?I think there's a bug report about this, somewhere. I'm not sure it's worth changing.
Apr 26 2015









"bitwise" <bitwise.pvt gmail.com> 