aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/using-variadic2.C
blob: 1d68ceece8a5b35cd7cb97988a0272004dcd62f5 (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
// PR c++/102104
// A version of using-variadic1a.C where the argument packs have
// different lengths.
// { dg-do compile { target c++17 } }

struct A {
  using target_type = bool*;
  operator bool*();
};

struct B {
  using target_type = long*;
  operator long*();
};

template<typename... Bases>
struct cls {
  template<class... Ts>
  struct nested : private Bases... {
    using Bases::operator typename Ts::target_type...; // { dg-error "lengths" }
  };
};

cls<A>::nested<A, B> v1; // { dg-message "required from here" }