File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 8
8
- secure : F1pwSI3BTHI/W0vaUNr2HeS7+25jLJiH2CF9pTW7cySKJGJkyOJ6gJkv71HYxq/cYVda8Y7qy+a//lZFQeWlEmMW4FTblXTE0qVvUzfCw3VRKLGYIMMMi2JzyWJODH+8Q2m19mS9OneZR5zL2NmopJn6wGrfUWZZuerk3XP57C0=
9
9
- d : dmd-2.067.1
10
10
- d : dmd-2.068.0
11
+ - d : dmd
11
12
- d : ldc-0.15.1
12
13
- d : gdc-4.9.2
Original file line number Diff line number Diff line change 7
7
"license" : " BSL-1.0" ,
8
8
"dependencies" : {
9
9
"dunit" : " ~>1.0.10" ,
10
- "painlesstraits" : " ~>0.0.1 "
10
+ "painlesstraits" : " ~>0.1.0 "
11
11
},
12
12
"configurations" : [
13
13
{
Original file line number Diff line number Diff line change @@ -6,7 +6,8 @@ import std.conv;
6
6
import std.json ;
7
7
import std.range ;
8
8
import std.traits ;
9
- import std.typecons : TypeTuple, Tuple ;
9
+ import std.typecons : Tuple ;
10
+ import std.typetuple : TypeTuple;
10
11
import painlessjson.annotations;
11
12
import painlessjson.string ;
12
13
import painlesstraits;
@@ -591,15 +592,13 @@ template hasAccessibleConstructor(T)
591
592
if (__traits(hasMember, T, " __ctor" ))
592
593
{
593
594
alias Overloads = TypeTuple! (__traits(getOverloads, T, " __ctor" ));
595
+ bool anyInstanciates = false ;
594
596
foreach (overload; Overloads)
595
597
{
596
- if (__traits(compiles, getInstanceFromCustomConstructor! (T,
597
- overload, false )(JSONValue())))
598
- {
599
- return true ;
600
- }
598
+ anyInstanciates |= __traits(compiles, getInstanceFromCustomConstructor! (T,
599
+ overload, false )(JSONValue()));
601
600
}
602
- return false ;
601
+ return anyInstanciates ;
603
602
}
604
603
}
605
604
You can’t perform that action at this time.
0 commit comments