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] `_ | `[range.cmp] `_ | `[func.wrap.func] `_ -| `[func.wrap.func.nullptr] `_",| remove ops `function`,None,Unassigned,|Not Started| +| `[func.wrap.func.nullptr] `_",| remove ops `function `_,None,Hristo Hristov,|Complete| | `[meta.unary.prop] `_,| replaced by `issue LWG3354 `_,None,Unassigned,|Nothing To Do| | `[meta.trans.other] `_,|,None,Unassigned,|Not Started| "| `[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 bool operator==(const function<_R2(_ArgTypes2...)>&) const = delete; +#if _LIBCPP_STD_VER <= 17 template 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 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 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&, nullptr_t) noexcept; template - bool operator==(nullptr_t, const function&) noexcept; + bool operator==(nullptr_t, const function&) noexcept; // removed in C++20 template - bool operator!=(const function&, nullptr_t) noexcept; + bool operator!=(const function&, nullptr_t) noexcept; // removed in C++20 template - bool operator!=(nullptr_t, const function&) noexcept; + bool operator!=(nullptr_t, const function&) noexcept; // removed in C++20 // specialized algorithms: template