Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 9a0dd5f

Browse files
committed
core.stdcpp: Use CppRuntime definitions, not CRuntime and add static assert
1 parent a032596 commit 9a0dd5f

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/core/stdcpp/exception.d

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module core.stdcpp.exception;
1313

1414
extern (C++, "std"):
1515

16-
version (CRuntime_DigitalMars)
16+
version (CppRuntime_DigitalMars)
1717
{
1818
import core.stdcpp.typeinfo;
1919

@@ -46,7 +46,7 @@ version (CRuntime_DigitalMars)
4646
override const(char)* what() const nothrow;
4747
}
4848
}
49-
else version (CRuntime_Glibc)
49+
else version (CppRuntime_Gcc)
5050
{
5151
alias void function() unexpected_handler;
5252
unexpected_handler set_unexpected(unexpected_handler f) nothrow;
@@ -74,7 +74,7 @@ else version (CRuntime_Glibc)
7474
override const(char)* what() const;
7575
}
7676
}
77-
else version (CRuntime_Microsoft)
77+
else version (CppRuntime_Microsoft)
7878
{
7979
class exception
8080
{
@@ -96,3 +96,5 @@ else version (CRuntime_Microsoft)
9696
//virtual ~this();
9797
}
9898
}
99+
else
100+
static assert(0, "Missing std::exception binding for this platform");

src/core/stdcpp/typeinfo.d

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
module core.stdcpp.typeinfo;
1313

14-
version (CRuntime_DigitalMars)
14+
version (CppRuntime_DigitalMars)
1515
{
1616
import core.stdcpp.exception;
1717

@@ -54,7 +54,7 @@ version (CRuntime_DigitalMars)
5454
override const (char)* what() const nothrow;
5555
}
5656
}
57-
else version (CRuntime_Microsoft)
57+
else version (CppRuntime_Microsoft)
5858
{
5959
import core.stdcpp.exception;
6060

@@ -95,7 +95,7 @@ else version (CRuntime_Microsoft)
9595
//virtual ~this();
9696
}
9797
}
98-
else version (CRuntime_Glibc)
98+
else version (CppRuntime_Gcc)
9999
{
100100
import core.stdcpp.exception;
101101

@@ -143,3 +143,5 @@ else version (CRuntime_Glibc)
143143
override const(char)* what() const;
144144
}
145145
}
146+
else
147+
static assert(0, "Missing std::type_info binding for this platform");

0 commit comments

Comments
 (0)