Skip to content

Commit 0913ca1

Browse files
committed
Implement P0768r1: Library support for the Spaceship Operator.
this patch adds the <compare> header and implements all of it except for [comp.alg]. As I understand it, the header is needed by the compiler in when implementing the semantics of operator<=>. For that reason I feel it's important to land this header early, despite all compilers lacking support. llvm-svn: 329460
1 parent 66f53d7 commit 0913ca1

File tree

13 files changed

+1518
-1
lines changed

13 files changed

+1518
-1
lines changed

libcxx/include/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,5 +77,4 @@ if (LIBCXX_INSTALL_HEADERS)
7777
add_custom_target(install-libcxx-headers DEPENDS install-cxx-headers)
7878
add_custom_target(install-libcxx-headers-stripped DEPENDS install-cxx-headers-stripped)
7979
endif()
80-
8180
endif()

libcxx/include/__config

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,6 +1196,11 @@ _LIBCPP_FUNC_VIS extern "C" void __sanitizer_annotate_contiguous_container(
11961196
#define _LIBCPP_HAS_NO_COROUTINES
11971197
#endif
11981198

1199+
// FIXME: Correct this macro when either (A) a feature test macro for the
1200+
// spaceship operator is provided, or (B) a compiler provides a complete
1201+
// implementation.
1202+
#define _LIBCPP_HAS_NO_SPACESHIP_OPERATOR
1203+
11991204
// Decide whether to use availability macros.
12001205
#if !defined(_LIBCPP_BUILDING_LIBRARY) && \
12011206
!defined(_LIBCPP_DISABLE_AVAILABILITY) && \

0 commit comments

Comments
 (0)