annotate gcc/testsuite/g++.dg/cpp2a/concepts-conv1.C @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 // { dg-do compile { target concepts } }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3 template <class T> concept False = false;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 template <class T>
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6 struct A
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8 explicit operator bool ();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9 explicit operator bool () requires False<T>;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12 int main()
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14 int i { A<int>() }; // { dg-error "" }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15 }