aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/variadic133.C
blob: 0265f0991c186d249cb12c01c596dad7f5710604 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// PR c++/53039
// { dg-do compile { target c++11 } }

template <class, class>
struct is_convertible
{
  static const bool value = true;
};

template<bool, class T>
struct enable_if
{
  typedef T type;
};

template <bool...>
struct Xs
{
  static const bool value = true;
};

template<typename... BTs>
  class BType
    {
      template <typename... BUs,
        typename enable_if<
               Xs<is_convertible<BUs, BTs>::value...>::value,
               bool>::type = false>
        void fooX(BUs&&...);
    };

template <typename... ATs>
  struct AType
    {
      template <typename... AUs,
    typename enable_if<
               Xs<is_convertible<AUs, ATs>::value...>::value,
               bool>::type = false>
        void foo(AUs&&...);
    };

int main()
{
  AType<int, int> t;
  t.foo(1, 1);
}