diff options
Diffstat (limited to 'libphobos/libdruntime/core/stdcpp/typeinfo.d')
-rw-r--r-- | libphobos/libdruntime/core/stdcpp/typeinfo.d | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/libphobos/libdruntime/core/stdcpp/typeinfo.d b/libphobos/libdruntime/core/stdcpp/typeinfo.d index 53b25c5e9a5..24f2938ccab 100644 --- a/libphobos/libdruntime/core/stdcpp/typeinfo.d +++ b/libphobos/libdruntime/core/stdcpp/typeinfo.d @@ -18,10 +18,10 @@ version (CppRuntime_DigitalMars) import core.stdcpp.exception; extern (C++, "std"): - @nogc: class type_info { + @nogc: void* pdata; public: @@ -41,8 +41,9 @@ version (CppRuntime_DigitalMars) class bad_cast : exception { - this() nothrow { } - this(const bad_cast) nothrow { } + @nogc: + extern(D) this() nothrow { } + extern(D) this(const bad_cast) nothrow { } //bad_cast operator=(const bad_cast) nothrow { return this; } //virtual ~this() nothrow; override const(char)* what() const nothrow; @@ -50,8 +51,9 @@ version (CppRuntime_DigitalMars) class bad_typeid : exception { - this() nothrow { } - this(const bad_typeid) nothrow { } + @nogc: + extern(D) this() nothrow { } + extern(D) this(const bad_typeid) nothrow { } //bad_typeid operator=(const bad_typeid) nothrow { return this; } //virtual ~this() nothrow; override const (char)* what() const nothrow; @@ -62,7 +64,6 @@ else version (CppRuntime_Microsoft) import core.stdcpp.exception; extern (C++, "std"): - @nogc: struct __type_info_node { @@ -74,6 +75,7 @@ else version (CppRuntime_Microsoft) class type_info { + @nogc: @weak ~this() nothrow {} //bool operator==(const type_info rhs) const; //bool operator!=(const type_info rhs) const; @@ -88,13 +90,15 @@ else version (CppRuntime_Microsoft) class bad_cast : exception { - this(const(char)* msg = "bad cast") @nogc nothrow { super(msg); } + @nogc: + extern(D) this(const(char)* msg = "bad cast") nothrow { super(msg); } //virtual ~this(); } class bad_typeid : exception { - this(const(char)* msg = "bad typeid") @nogc nothrow { super(msg); } + @nogc: + extern(D) this(const(char)* msg = "bad typeid") nothrow { super(msg); } //virtual ~this(); } } @@ -108,10 +112,10 @@ else version (CppRuntime_Gcc) } extern (C++, "std"): - @nogc: abstract class type_info { + @nogc: @weak ~this() {} @weak final const(char)* name() const nothrow { @@ -133,19 +137,21 @@ else version (CppRuntime_Gcc) protected: const(char)* _name; - this(const(char)* name) { _name = name; } + extern(D) this(const(char)* name) { _name = name; } } class bad_cast : exception { - this() nothrow {} + @nogc: + extern(D) this() nothrow {} //~this(); @weak override const(char)* what() const nothrow { return "bad cast"; } } class bad_typeid : exception { - this() nothrow {} + @nogc: + extern(D) this() nothrow {} //~this(); @weak override const(char)* what() const nothrow { return "bad typeid"; } } @@ -155,10 +161,10 @@ else version (CppRuntime_Clang) import core.stdcpp.exception; extern (C++, "std"): - @nogc: abstract class type_info { + @nogc: @weak ~this() {} @weak final const(char)* name() const nothrow { @@ -173,19 +179,21 @@ else version (CppRuntime_Clang) protected: const(char)* __type_name; - this(const(char)* __n) { __type_name = __n; } + extern(D) this(const(char)* __n) { __type_name = __n; } } class bad_cast : exception { - this() nothrow {} + @nogc: + extern(D) this() nothrow {} //~this(); @weak override const(char)* what() const nothrow { return "bad cast"; } } class bad_typeid : exception { - this() nothrow {} + @nogc: + extern(D) this() nothrow {} //~this(); @weak override const(char)* what() const nothrow { return "bad typeid"; } } |