diff --git a/libcxx/docs/Status/SpaceshipProjects.csv b/libcxx/docs/Status/SpaceshipProjects.csv --- a/libcxx/docs/Status/SpaceshipProjects.csv +++ b/libcxx/docs/Status/SpaceshipProjects.csv @@ -65,7 +65,7 @@ "| `[functional.syn] <https://wg21.link/functional.syn>`_ | `[range.cmp] <https://wg21.link/range.cmp>`_ | `[func.wrap.func] <https://wg21.link/func.wrap.func>`_ -| `[func.wrap.func.nullptr] <https://wg21.link/func.wrap.func.nullptr>`_",| remove ops `function`,None,Unassigned,|Not Started| +| `[func.wrap.func.nullptr] <https://wg21.link/func.wrap.func.nullptr>`_",| remove ops `function <https://reviews.llvm.org/D152704>`_,None,Hristo Hristov,|Complete| | `[meta.unary.prop] <https://wg21.link/meta.unary.prop>`_,| replaced by `issue LWG3354 <https://wg21.link/LWG3354>`_,None,Unassigned,|Nothing To Do| | `[meta.trans.other] <https://wg21.link/meta.trans.other>`_,|,None,Unassigned,|Not Started| "| `[type.index.overview] <https://wg21.link/type.index.overview>`_ diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h --- a/libcxx/include/__functional/function.h +++ b/libcxx/include/__functional/function.h @@ -1058,8 +1058,10 @@ // deleted overloads close possible hole in the type system template<class _R2, class... _ArgTypes2> bool operator==(const function<_R2(_ArgTypes2...)>&) const = delete; +#if _LIBCPP_STD_VER <= 17 template<class _R2, class... _ArgTypes2> bool operator!=(const function<_R2(_ArgTypes2...)>&) const = delete; +#endif public: // function invocation: _LIBCPP_HIDE_FROM_ABI _Rp operator()(_ArgTypes...) const; @@ -1198,6 +1200,8 @@ bool operator==(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return !__f;} +#if _LIBCPP_STD_VER <= 17 + template <class _Rp, class... _ArgTypes> inline _LIBCPP_INLINE_VISIBILITY bool @@ -1213,6 +1217,8 @@ bool operator!=(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return (bool)__f;} +#endif // _LIBCPP_STD_VER <= 17 + template <class _Rp, class... _ArgTypes> inline _LIBCPP_INLINE_VISIBILITY void diff --git a/libcxx/include/functional b/libcxx/include/functional --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -456,13 +456,13 @@ bool operator==(const function<R(ArgTypes...)>&, nullptr_t) noexcept; template <class R, class ... ArgTypes> - bool operator==(nullptr_t, const function<R(ArgTypes...)>&) noexcept; + bool operator==(nullptr_t, const function<R(ArgTypes...)>&) noexcept; // removed in C++20 template <class R, class ... ArgTypes> - bool operator!=(const function<R(ArgTypes...)>&, nullptr_t) noexcept; + bool operator!=(const function<R(ArgTypes...)>&, nullptr_t) noexcept; // removed in C++20 template <class R, class ... ArgTypes> - bool operator!=(nullptr_t, const function<R(ArgTypes...)>&) noexcept; + bool operator!=(nullptr_t, const function<R(ArgTypes...)>&) noexcept; // removed in C++20 // specialized algorithms: template <class R, class ... ArgTypes>