Debian Codegraph @

gcc/testsuite/g++.dg/cpp2a/using-enum-10a.C

raw
1 // A version of using-enum-10.C where Hog is a template.
2 // PR c++/103081
3 // { dg-do compile { target c++20 } }
4
5 enum class Pig { OINK };
6
7 template<int>
8 struct Hog {
9 using enum Pig;
10 Hog(Pig) { OINK; }
11 };
12
13 template<int N>
14 void pen() {
15 Hog<1>(Hog<1>::OINK);
16 Hog<N>(Hog<N>::OINK);
17 }
18
19 template void pen<0>();