From 5487d40be92d0944f44621c0bd4568ee5d66701f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 20 Aug 2018 16:49:14 +0200 Subject: [PATCH] system/FileDescriptor: add operator!= --- src/system/FileDescriptor.hxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/system/FileDescriptor.hxx b/src/system/FileDescriptor.hxx index ff42efc32..b4294c246 100644 --- a/src/system/FileDescriptor.hxx +++ b/src/system/FileDescriptor.hxx @@ -65,6 +65,10 @@ public: return fd == other.fd; } + constexpr bool operator!=(FileDescriptor other) const noexcept { + return !(*this == other); + } + constexpr bool IsDefined() const noexcept { return fd >= 0; }