From 39f422ded8c98dc0b18f635eb81cccf302aa8168 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 10 Aug 2017 17:37:08 +0200 Subject: net/SocketDescriptor: allow constructing with "int" --- src/net/SocketDescriptor.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/net/SocketDescriptor.hxx b/src/net/SocketDescriptor.hxx index 33785cd8c..6b2c6bdfa 100644 --- a/src/net/SocketDescriptor.hxx +++ b/src/net/SocketDescriptor.hxx @@ -42,15 +42,15 @@ class StaticSocketAddress; */ class SocketDescriptor : protected FileDescriptor { protected: - explicit constexpr SocketDescriptor(int _fd) - :FileDescriptor(_fd) {} - explicit constexpr SocketDescriptor(FileDescriptor _fd) :FileDescriptor(_fd) {} public: SocketDescriptor() = default; + explicit constexpr SocketDescriptor(int _fd) + :FileDescriptor(_fd) {} + constexpr bool operator==(SocketDescriptor other) const { return fd == other.fd; } -- cgit v1.2.3