Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp2a/concepts-pr88395.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 1830386684a0 |
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" } |