Debian Codegraph @

gcc/testsuite/g++.dg/ext/integer-pack6.C

raw
1 // Verify a non-constant argument to __integer_pack respects SFINAE.
2 // { dg-do compile { target c++11 } }
3
4 template<int...> struct A { };
5
6 template<class T> auto f(int) -> A<__integer_pack(T::value)...> = delete;
7 template<class T> void f(...);
8
9 struct B { static int value; };
10
11 int main() {
12 f<B>(0);
13 }