public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/ranger] libstdc++: Remove std::type_info::operator!= for C++20
@ 2020-06-17 19:03 Aldy Hernandez
  0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2020-06-17 19:03 UTC (permalink / raw)
  To: gcc-cvs, libstdc++-cvs

https://gcc.gnu.org/g:20fa41e61fd2d2839ca47e0dfac6976c552ab648

commit 20fa41e61fd2d2839ca47e0dfac6976c552ab648
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Feb 7 20:50:00 2020 +0000

    libstdc++: Remove std::type_info::operator!= for C++20
    
    This function can be synthesized by the compiler now.
    
            * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.

Diff:
---
 libstdc++-v3/ChangeLog          | 2 ++
 libstdc++-v3/libsupc++/typeinfo | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index a80c608d80f..0ad5ffea043 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,7 @@
 2020-02-20  Jonathan Wakely  <jwakely@redhat.com>
 
+	* libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
+
 	* include/std/thread (thread::id::operator<=>): Define for C++20.
 	* testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
 	functions in namespace std.
diff --git a/libstdc++-v3/libsupc++/typeinfo b/libstdc++-v3/libsupc++/typeinfo
index 0f523d75b55..5a64e9ff092 100644
--- a/libstdc++-v3/libsupc++/typeinfo
+++ b/libstdc++-v3/libsupc++/typeinfo
@@ -133,8 +133,11 @@ namespace std
     { return __name == __arg.__name; }
   #endif
 #endif
+
+#if __cpp_impl_three_way_comparison < 201907L
     bool operator!=(const type_info& __arg) const _GLIBCXX_NOEXCEPT
     { return !operator==(__arg); }
+#endif
 
 #if __cplusplus >= 201103L
     size_t hash_code() const noexcept


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-06-17 19:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-17 19:03 [gcc/devel/ranger] libstdc++: Remove std::type_info::operator!= for C++20 Aldy Hernandez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).