Debian Codegraph @

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

raw
1 // PR c++/102104
2 // A version of of using-variadic1.C where only the terminal name
3 // uses a parameter pack.
4 // { dg-do compile { target c++17 } }
5
6 struct A {
7 operator bool*();
8 };
9
10 struct B {
11 operator bool*();
12 };
13
14 struct C {
15 using target_type = bool*;
16 };
17
18 template<typename... Bases>
19 struct cls {
20 template<class T>
21 struct nested : private Bases... {
22 using Bases::operator typename T::target_type...;
23 };
24 };
25
26 cls<A, B>::nested<C> v1;
27 bool* a1 = v1; // { dg-error "ambiguous" }
28
29 cls<A>::nested<C> v2;
30 bool* a2 = v2;
31
32 cls<B>::nested<C> v3;
33 bool* a3 = v3;