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

Hristo Hristov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jun 10 12:44:47 PDT 2023


H-G-Hristov updated this revision to Diff 530239.
H-G-Hristov added a comment.

Addressed comments


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
@@ -135,7 +135,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,|In Progress|
 - `5.12 Clause 27: Time library <https://wg21.link/p1614r2#clause-27-time-library>`_,,,,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152615.530239.patch
Type: text/x-patch
Size: 3250 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230610/b753f2b6/attachment.bin>


More information about the libcxx-commits mailing list