c++: robustify testcase [PR109752]
[official-gcc.git] / gcc / testsuite / g++.dg / template / nontype26.C
blob588ce1cc23a79c025a4a006776de92546c3fe2ad
1 // PR c++/31671
3 template<int& i> void doit() {
4   i = 0;
7 template<const int& i> class X {
8 public:
9     void foo() {
10       doit<i>();  // { dg-error "qualifi|template arg|no matching" }
11     }
14 int i = 0;
16 X<i> x;
18 int main() {
19   x.foo();