Debian Codegraph @

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

raw
1 // { dg-do compile { target c++14 } }
2
3 template <bool> struct Sink {};
4 template <class T> void fn();
5 template <class T> T var = T();
6
7 template <class T> void f()
8 {
9 Sink<fn<T>::value>(); // { dg-error "function" }
10 Sink<var<T>::value>(); // { dg-error "variable" }
11 }
12 // { dg-prune-output "template argument" }