111
|
1 // PR c++/66850
|
|
2 // Each namespace contains an otherwise standalone test case, none of which
|
|
3 // should cause an ICE.
|
|
4
|
|
5 namespace X {
|
|
6 template <template <typename U, U> class> struct Sort;
|
|
7
|
|
8 template <template <typename U, U> class Comparator>
|
|
9 struct Sort
|
|
10 {
|
|
11 template <int I>
|
|
12 struct less_than
|
|
13 {
|
|
14 Comparator<int, I> a;
|
|
15 };
|
|
16 };
|
|
17 }
|
|
18
|
|
19 namespace Y {
|
|
20 template <typename C, C> struct integral_constant {};
|
|
21
|
|
22 template <typename T, template <typename U, U> class> struct Sort;
|
|
23
|
|
24 template <template <typename U, U> class Comparator>
|
|
25 struct Sort<int, Comparator>
|
|
26 {
|
|
27 template <int I> struct less_than:
|
|
28 integral_constant<bool, Comparator<int, I>::value> {};
|
|
29 };
|
|
30 }
|
|
31
|
|
32 namespace Z {
|
|
33 template <typename T, template <typename U, U> class> struct Sort;
|
|
34
|
|
35 template <template <typename U, U> class Comparator>
|
|
36 struct Sort<int, Comparator>
|
|
37 {
|
|
38 template <int I>
|
|
39 struct less_than
|
|
40 {
|
|
41 Comparator<int, I> a;
|
|
42 };
|
|
43 };
|
|
44 }
|