Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp2a/concepts-pr88395.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
rev | line source |
---|---|
145 | 1 // { dg-do compile { target c++2a } } |
2 | |
3 template <class T, class U> | |
4 concept Concept2 = requires (T t, U u) | |
5 { | |
6 t += u; // { dg-error "template instantiation depth" } | |
7 }; | |
8 | |
9 template <class T> | |
10 concept Concept = Concept2 <T, T>; | |
11 | |
12 struct S | |
13 { | |
14 template <Concept T> | |
15 constexpr S& operator += (T o); | |
16 }; | |
17 | |
18 constexpr S operator * (S a, S b) | |
19 { | |
20 return a += b; | |
21 } | |
22 | |
23 // { dg-prune-output "compilation terminated" } |