since operator==() is now considered commutative in C++20, we can
make it a member function.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
return *this;
}
+
+ bool operator ==(std::nullptr_t) const {
+ return !operate;
+ }
+
// In-place construction!
//
// This is basically what you want, and I didn't include value
return r;
}
-template<typename Base, std::size_t Size>
-bool operator ==(const static_ptr<Base, Size>& s, std::nullptr_t) {
- return !s;
-}
-template<typename Base, std::size_t Size>
-bool operator ==(static_ptr<Base, Size>& s, std::nullptr_t) {
- return !s;
-}
-
// Since `make_unique` and `make_shared` exist, we should follow their
// lead.
//