Debian Codegraph @

gcc/testsuite/g++.dg/cpp1z/nontype4a.C

raw
1 // PR c++/98930
2 // { dg-do compile { target c++17 } }
3
4 template<int*>
5 struct A { };
6
7 template<class T>
8 auto impl() {
9 static int i;
10 return A<&i>();
11 }
12
13 using type = decltype(impl<int>());
14 using type = decltype(impl<char>()); // { dg-error "conflicting declaration" }