[libc++][spaceship] P1612R2: Removed `operator!=` from `locale`
authorHristo Hristov <zingam@outlook.com>
Sun, 11 Jun 2023 19:17:19 +0000 (22:17 +0300)
committerHristo Hristov <zingam@outlook.com>
Tue, 13 Jun 2023 04:47:13 +0000 (07:47 +0300)
Implemented parts of P1612R2:
- Removed `operator!=` from `locale`

Reviewed By: #libc, Mordante

Differential Revision: https://reviews.llvm.org/D152654

libcxx/docs/Status/SpaceshipProjects.csv
libcxx/include/__locale
libcxx/include/locale

index c9dca96..0fa42e2 100644 (file)
@@ -179,7 +179,7 @@ Section,Description,Dependencies,Assignee,Complete
 | chrono::time_zone_link",A ``<chrono>`` implementation,Unassigned,|Not Started|
 - `5.13 Clause 28: Localization library <https://wg21.link/p1614r2#clause-28-localization-library>`_,,,,
 "| `[locale] <https://wg21.link/locale>`_
-| `[locale.operators] <https://wg21.link/locale.operators>`_",| remove ops `locale`,None,Unassigned,|Not Started|
+| `[locale.operators] <https://wg21.link/locale.operators>`_",| remove ops `locale <https://reviews.llvm.org/D152654>`_,None,Hristo Hristov,|Complete|
 - `5.14 Clause 29: Input/output library <https://wg21.link/p1614r2#clause-29-inputoutput-library>`_,,,,
 | `[fs.filesystem.syn] <https://wg21.link/fs.filesystem.syn>`_,| `filesystem::space_info <https://reviews.llvm.org/D130861>`_,None,Adrian Vogelsgesang,|Complete|
 "| `[fs.class.path] <https://wg21.link/fs.class.path>`_
index 4a031ef..e3b0085 100644 (file)
@@ -110,7 +110,9 @@ public:
     // locale operations:
     string name() const;
     bool operator==(const locale&) const;
+#if _LIBCPP_STD_VER <= 17
     _LIBCPP_HIDE_FROM_ABI bool operator!=(const locale& __y) const {return !(*this == __y);}
+#endif
     template <class _CharT, class _Traits, class _Allocator>
       _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
       bool operator()(const basic_string<_CharT, _Traits, _Allocator>&,
index cbd4713..bfe0060 100644 (file)
@@ -53,7 +53,7 @@ public:
     // locale operations:
     basic_string<char> name() const;
     bool operator==(const locale& other) const;
-    bool operator!=(const locale& other) const;
+    bool operator!=(const locale& other) const;                              // removed C++20
     template <class charT, class Traits, class Allocator>
       bool operator()(const basic_string<charT,Traits,Allocator>& s1,
                       const basic_string<charT,Traits,Allocator>& s2) const;