Skip to content

Commit bc633a4

Browse files
committed
Mark the major papers for C++20 consistent comparisons as "done", and
start publishing the corresponding feature-test macro.
1 parent 4a4e90a commit bc633a4

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,7 @@ static void InitializeCPlusPlusFeatureTestMacros(const LangOptions &LangOpts,
546546
Builder.defineMacro("__cpp_conditional_explicit", "201806L");
547547
Builder.defineMacro("__cpp_constexpr_dynamic_alloc", "201907L");
548548
Builder.defineMacro("__cpp_constinit", "201907L");
549+
Builder.defineMacro("__cpp_impl_three_way_comparison", "201907L");
549550
}
550551
if (LangOpts.Char8)
551552
Builder.defineMacro("__cpp_char8_t", "201811L");

clang/test/Lexer/cxx-features.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646
#error "wrong value for __cpp_impl_destroying_delete"
4747
#endif
4848

49+
#if check(impl_three_way_comparison, 0, 0, 0, 0, 201907)
50+
#error "wrong value for __cpp_impl_three_way_comparison"
51+
#endif
52+
4953
// --- C++17 features ---
5054

5155
#if check(hex_float, 0, 0, 0, 201603, 201603)

clang/www/cxx_status.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -926,11 +926,10 @@ <h2 id="cxx20">C++2a implementation status</h2>
926926
<tr>
927927
<td rowspan="8">Consistent comparison (<tt>operator&lt;=&gt;</tt>)</td>
928928
<td><a href="https://wg21.link/p0515r3">P0515R3</a></td>
929-
<td class="partial" align="center">Partial</td>
929+
<td rowspan="2" class="svn" align="center">SVN</td>
930930
</tr>
931931
<tr> <!-- from Jacksonville -->
932932
<td><a href="https://wg21.link/p0905r1">P0905R1</a></td>
933-
<td class="svn" align="center">SVN</td>
934933
</tr>
935934
<tr> <!-- from Rapperswil -->
936935
<td><a href="https://wg21.link/p1120r0">P1120R0</a></td>

0 commit comments

Comments
 (0)