1 // PR c++/53039
2 // { dg-do compile { target c++11 } }
3
4 template <class, class>
5 struct is_convertible
6 {
7 static const bool value = true;
8 };
9
10 template<bool, class T>
11 struct enable_if
12 {
13 typedef T type;
14 };
15
16 template <bool...>
17 struct Xs
18 {
19 static const bool value = true;
20 };
21
22 template<typename... BTs>
23 class BType
24 {
25 template <typename... BUs,
26 typename enable_if<
27 Xs<is_convertible<BUs, BTs>::value...>::value,
28 bool>::type = false>
29 void fooX(BUs&&...);
30 };
31
32 template <typename... ATs>
33 struct AType
34 {
35 template <typename... AUs,
36 typename enable_if<
37 Xs<is_convertible<AUs, ATs>::value...>::value,
38 bool>::type = false>
39 void foo(AUs&&...);
40 };
41
main()42 int main()
43 {
44 AType<int, int> t;
45 t.foo(1, 1);
46 }
47