File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -8,19 +8,10 @@ package:
8
8
// Very boiled down version because we cannot use std.traits without causing
9
9
// DMD to create a ModuleInfo reference for _d_util, which would require users
10
10
// to include the Deimos files in the build.
11
-
12
- template ReturnType (T){
11
+ template ExternC (T) if (is (typeof (* (T.init)) P == function )) {
13
12
static if (is (typeof (* (T.init)) R == return )) {
14
- alias R ReturnType;
15
- }
16
- }
17
-
18
- template ParameterTypeTuple (T) {
19
- static if (is (typeof (* (T.init)) P == function )) {
20
- alias P ParameterTypeTuple;
13
+ static if (is (typeof (* (T.init)) P == function )) {
14
+ alias extern (C) R function (P) ExternC;
15
+ }
21
16
}
22
17
}
23
-
24
- template ExternC (T) {
25
- alias extern (C) ReturnType! T function (ParameterTypeTuple! T) ExternC;
26
- }
You can’t perform that action at this time.
0 commit comments