[libcxx-commits] [PATCH] D152615: [libc++][spaceship] P1614R2: Removed ops from `complex`

Hristo Hristov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 11 09:52:09 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGbe45fe5d8508: [libc++][spaceship] P1614R2: Removed ops from `complex` (authored by Zingam).

Changed prior to commit:
  https://reviews.llvm.org/D152615?vs=530239&id=530311#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152615/new/

https://reviews.llvm.org/D152615

Files:
  libcxx/docs/Status/SpaceshipProjects.csv
  libcxx/include/complex


Index: libcxx/include/complex
===================================================================
--- libcxx/include/complex
+++ libcxx/include/complex
@@ -148,12 +148,12 @@
 template<class T> complex<T> operator/(const T&, const complex<T>&);          // constexpr in C++20
 template<class T> complex<T> operator+(const complex<T>&);                    // constexpr in C++20
 template<class T> complex<T> operator-(const complex<T>&);                    // constexpr in C++20
-template<class T> bool operator==(const complex<T>&, const complex<T>&); // constexpr in C++14
-template<class T> bool operator==(const complex<T>&, const T&); // constexpr in C++14
-template<class T> bool operator==(const T&, const complex<T>&); // constexpr in C++14
-template<class T> bool operator!=(const complex<T>&, const complex<T>&); // constexpr in C++14
-template<class T> bool operator!=(const complex<T>&, const T&); // constexpr in C++14
-template<class T> bool operator!=(const T&, const complex<T>&); // constexpr in C++14
+template<class T> bool operator==(const complex<T>&, const complex<T>&);      // constexpr in C++14
+template<class T> bool operator==(const complex<T>&, const T&);               // constexpr in C++14
+template<class T> bool operator==(const T&, const complex<T>&);               // constexpr in C++14, removed in C++20
+template<class T> bool operator!=(const complex<T>&, const complex<T>&);      // constexpr in C++14, removed in C++20
+template<class T> bool operator!=(const complex<T>&, const T&);               // constexpr in C++14, removed in C++20
+template<class T> bool operator!=(const T&, const complex<T>&);               // constexpr in C++14, removed in C++20
 
 template<class T, class charT, class traits>
   basic_istream<charT, traits>&
@@ -827,6 +827,8 @@
     return __x.real() == __y && __x.imag() == 0;
 }
 
+#if _LIBCPP_STD_VER <= 17
+
 template<class _Tp>
 inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX14
 bool
@@ -859,6 +861,8 @@
     return !(__x == __y);
 }
 
+#endif
+
 // 26.3.7 values:
 
 template <class _Tp, bool = is_integral<_Tp>::value,
Index: libcxx/docs/Status/SpaceshipProjects.csv
===================================================================
--- libcxx/docs/Status/SpaceshipProjects.csv
+++ libcxx/docs/Status/SpaceshipProjects.csv
@@ -137,7 +137,7 @@
 | `[alg.three.way] <https://wg21.link/alg.three.way>`_",| `lexicographical_compare_three_way <https://reviews.llvm.org/D131395>`_,[comparisons.three.way],Adrian Vogelsgesang,|Complete|
 - `5.11 Clause 26: Numerics library <https://wg21.link/p1614r2#clause-26-numerics-library>`_,,,,
 "| `[complex.syn] <https://wg21.link/complex.syn>`_
-| `[complex.ops] <https://wg21.link/complex.ops>`_",| remove ops `complex <https://reviews.llvm.org/D152615>`_,None,Hristo Hristov,|In Progress|
+| `[complex.ops] <https://wg21.link/complex.ops>`_",| remove ops `complex <https://reviews.llvm.org/D152615>`_,None,Hristo Hristov,|Complete|
 "| `[class.slice.overview] <https://wg21.link/class.slice.overview>`_
 | `[slice.ops] <https://wg21.link/slice.ops>`_",| `slice <https://reviews.llvm.org/D152617>`_,None,Hristo Hristov,|Complete|
 - `5.12 Clause 27: Time library <https://wg21.link/p1614r2#clause-27-time-library>`_,,,,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152615.530311.patch
Type: text/x-patch
Size: 3247 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230611/87451198/attachment-0001.bin>


More information about the libcxx-commits mailing list