Debian Codegraph @

gcc/testsuite/g++.dg/cpp26/pack-indexing15.C

raw
1 // PR c++/113800
2 // { dg-do compile { target c++26 } }
3 // From LLVM's temp_arg_nontype_cxx2c.cpp.
4
5 template<class... T>
6 concept C = sizeof(T...[1]) == 1;
7
8 struct A {};
9
10 template<class T, C<T> auto = A{}> struct Set {};
11
12 template<class T>
13 void
14 foo ()
15 {
16 Set<T> u;
17 }
18
19 Set<bool> sb;
20 Set<float> sf; // { dg-error "placeholder constraints not satisfied" }