xref: /netbsd-src/external/gpl3/gcc/dist/libphobos/testsuite/libphobos.traits/all_satisfy.d (revision b1e838363e3c6fc78a55519254d99869742dd33c)
1 // https://issues.dlang.org/show_bug.cgi?id=22210
2 
3 import core.internal.traits : allSatisfy;
4 
5 enum isHashable(T) = __traits(compiles,
6     () { T.init; }
7 );
8 
9 class A
10 {
11     static if (isHashable!B) {}
12 }
13 
14 class B
15 {
16     static if (isHashable!C) {}
17 }
18 
19 class C
20 {
21     static if (allSatisfy!(isHashable, int, B)) {}
22 }
23 
main()24 void main() {}
25