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

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 12 21:47:20 PDT 2023


Author: Hristo Hristov
Date: 2023-06-13T07:47:13+03:00
New Revision: 7928ac4e6a75c4d9e69e70e4c025119e2f9649ef

URL: https://github.com/llvm/llvm-project/commit/7928ac4e6a75c4d9e69e70e4c025119e2f9649ef
DIFF: https://github.com/llvm/llvm-project/commit/7928ac4e6a75c4d9e69e70e4c025119e2f9649ef.diff

LOG: [libc++][spaceship] P1612R2: Removed `operator!=` from `locale`

Implemented parts of P1612R2:
- Removed `operator!=` from `locale`

Reviewed By: #libc, Mordante

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/libcxx/docs/Status/SpaceshipProjects.csv b/libcxx/docs/Status/SpaceshipProjects.csv
index c9dca960a7a4b..0fa42e2b777ee 100644
--- a/libcxx/docs/Status/SpaceshipProjects.csv
+++ b/libcxx/docs/Status/SpaceshipProjects.csv
@@ -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>`_

diff  --git a/libcxx/include/__locale b/libcxx/include/__locale
index 4a031ef08ed92..e3b0085397d22 100644
--- a/libcxx/include/__locale
+++ b/libcxx/include/__locale
@@ -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>&,

diff  --git a/libcxx/include/locale b/libcxx/include/locale
index cbd47139344fc..bfe00608bf445 100644
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -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;


        


More information about the libcxx-commits mailing list