Debian Codegraph @

gcc/testsuite/g++.dg/cpp1y/var-templ76.C

raw
1 // Verify we can evaluate a non-dependent variable template-id ahead of time.
2 // { dg-do compile { target c++14 } }
3
4 template<int N>
5 constexpr int var = N;
6
7 template<int N> void f(int) = delete;
8 template<int N> void f(...);
9
10 template<class T>
11 void g() {
12 f<var<42>>(0); // { dg-error "deleted" }
13 }