-
-
Notifications
You must be signed in to change notification settings - Fork 416
add core.stdcpp.exception and core.stdcpp.typeinfo #1473
Conversation
bffe371
to
8a20d4d
Compare
|
||
module core.stdcpp.exception; | ||
|
||
version (DigitalMars) version (_Win32) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug code? CRuntime_DigitalMars is predefined, and _Win32 is not.
No update to MANIFEST? I guess we can nuke it then ;-) |
8a20d4d
to
0f5af8c
Compare
Yeah, I gave up on it. If you want to do a PR to nuke it, I'll pull it. |
{ | ||
void dtor1(); // consume destructor slot in vtbl[] | ||
void dtor2(); // consume destructor slot in vtbl[] | ||
final const(char)* name(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you declares final method, you add dependence from libstdc++, because this external symbol should be resolved by linker. Is it ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why it is currently not compiled into the library. In the future, it should be compiled into the .a, but not the .so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds complicated. Then you can use core.stdcpp
with static linking, but not with dynamic linking?
But as druntime won't use core.stdcpp
internally, how about putting all core.stdcpp
modules into a extra library, stdcpp
. We can still ship this library with dmd. Then users using core.stdcpp
simply add -lstdcpp
to their linker flags and users not needing core.stdcpp
never get a dependency on libstdc++
.
0f5af8c
to
889b165
Compare
|
||
class exception | ||
{ | ||
this(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to add empty bodies or bodies with {assert(0);}
to all costructors declarations.
Also we may use @disable
attribute for all unavailable methods. It will be better then strange linkage error on constructor using.
Great! Here it is: #1476 |
I agree that |
{ | ||
void* pdata; | ||
|
||
public: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah half indent has to go
Auto-merge toggled on |
add core.stdcpp.exception and core.stdcpp.typeinfo
gotta start somewhere