Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/using-variadic2.C

raw
1 // PR c++/102104
2 // A version of using-variadic1a.C where the argument packs have
3 // different lengths.
4 // { dg-do compile { target c++17 } }
5
6 struct A {
7 using target_type = bool*;
8 operator bool*();
9 };
10
11 struct B {
12 using target_type = long*;
13 operator long*();
14 };
15
16 template<typename... Bases>
17 struct cls {
18 template<class... Ts>
19 struct nested : private Bases... {
20 using Bases::operator typename Ts::target_type...; // { dg-error "lengths" }
21 };
22 };
23
24 cls<A>::nested<A, B> v1; // { dg-message "required from here" }