Skip to content

Commit 281b7ee

Browse files
author
Erich Keane
committed
Update www_status/add test for P1972:
This seems to have been implemented/supported correctly back in Clang 10, so update the documentation and add the test from the paper.
1 parent b3b4113 commit 281b7ee

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// RUN: %clang_cc1 -std=c++20 -verify %s
2+
3+
namespace P1972 {
4+
void f(int) requires false; // expected-note 4{{because 'false' evaluated to false}} \
5+
// expected-note{{constraints not satisfied}}
6+
void g() {
7+
f(0); // expected-error{{no matching function for call to 'f'}}
8+
void (*p1)(int) = f; // expected-error{{invalid reference to function 'f': constraints not satisfied}}
9+
void (*p21)(int) = &f; // expected-error{{invalid reference to function 'f': constraints not satisfied}}
10+
decltype(f) *p2 = nullptr; // expected-error{{invalid reference to function 'f': constraints not satisfied}}
11+
}
12+
}

clang/www/cxx_status.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -938,7 +938,7 @@ <h2 id="cxx20">C++20 implementation status</h2>
938938
</tr>
939939
<tr> <!-- from Belfast -->
940940
<td><a href="https://wg21.link/p1972r0">P1972R0</a></td>
941-
<td rowspan="4" class="none" align="center">No</td>
941+
<td rowspan="4" class="full" align="center">Clang 10</td>
942942
</tr>
943943
<tr>
944944
<td><a href="https://wg21.link/p1980r0">P1980R0</a></td>

0 commit comments

Comments
 (0)