comparison gcc/testsuite/g++.dg/concepts/diagnostic6.C @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
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" }