[libcxx-commits] [PATCH] D152654: [libc++][spaceship] P1612R2: Removed `operator!=` from `locale`

Hristo Hristov via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jun 11 22:57:26 PDT 2023


H-G-Hristov created this revision.
Herald added a subscriber: yaxunl.
Herald added a project: All.
H-G-Hristov published this revision for review.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

Implemented parts of P1612R2:

- Removed `operator!=` from `locale`


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152654

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


Index: libcxx/include/locale
===================================================================
--- libcxx/include/locale
+++ libcxx/include/locale
@@ -53,7 +53,7 @@
     // 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;
Index: libcxx/include/__locale
===================================================================
--- libcxx/include/__locale
+++ libcxx/include/__locale
@@ -110,7 +110,9 @@
     // 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: libcxx/docs/Status/SpaceshipProjects.csv
===================================================================
--- libcxx/docs/Status/SpaceshipProjects.csv
+++ libcxx/docs/Status/SpaceshipProjects.csv
@@ -180,7 +180,7 @@
 | 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/>`_,None,Hristo Hristov,|Complete|
 - `5.14 Clause 29: Input/output library <https://wg21.link/p1614r2clause-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>`_


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152654.530320.patch
Type: text/x-patch
Size: 2267 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230612/31e720c9/attachment.bin>


More information about the libcxx-commits mailing list