Debian Codegraph @

gcc/testsuite/g++.dg/concepts/diagnostic6.C

raw
1 // { dg-do compile { target c++2a } }
2
3 template<typename T>
4 concept C = requires (T t) { t + 0; };
5 // { dg-message "satisfaction of .C<T>. .with T = typename T::type." "" { target *-*-* } .-1 }
6
7 template<typename T>
8 concept D = C<T>;
9 // { dg-message "satisfaction of .D<typename T::type>. .with T = int." "" { target *-*-* } .-1 }
10
11 template<typename T>
12 concept E = D<typename T::type>;
13
14 static_assert(E<int>); // { dg-error "static assertion failed|not a class" }