[committed] Remove std::type_info::operator!= for C++20

Message ID 20200220113245.GW9441@redhat.com
State New
Headers show
  • [committed] Remove std::type_info::operator!= for C++20
Related show

Commit Message

Jonathan Wakely Feb. 20, 2020, 11:32 a.m.
This is an even smaller part of P1614R2.

Tested powerpc64le-linux, committed to master.


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 --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; }
+#if __cpp_impl_three_way_comparison < 201907L
     bool operator!=(const type_info& __arg) const _GLIBCXX_NOEXCEPT
     { return !operator==(__arg); }
 #if __cplusplus >= 201103L
     size_t hash_code() const noexcept