Merge "Add unique_fd::operator{==,!=} overloads that take a unique_fd."
This commit is contained in:
commit
9ef741ccac
1 changed files with 2 additions and 0 deletions
|
|
@ -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==(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").
|
// Catch bogus error checks (i.e.: "!fd" instead of "fd != -1").
|
||||||
bool operator!() const = delete;
|
bool operator!() const = delete;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue