Merge "Add unique_fd::operator{==,!=} overloads that take a unique_fd."

am: 9ef741ccac

Change-Id: Ie361658e875008f06bb8d50e476ce0c9ef377aa6
This commit is contained in:
Peter Collingbourne 2020-01-14 17:25:44 -08:00 committed by android-build-merger
commit bba5ea0622

View file

@ -116,6 +116,8 @@ class unique_fd_impl final {
bool operator<(int rhs) const { return get() < rhs; }
bool operator==(int rhs) const { return get() == rhs; }
bool operator!=(int rhs) const { return get() != rhs; }
bool operator==(const unique_fd_impl& rhs) const { return get() == rhs.get(); }
bool operator!=(const unique_fd_impl& rhs) const { return get() != rhs.get(); }
// Catch bogus error checks (i.e.: "!fd" instead of "fd != -1").
bool operator!() const = delete;