Commit 39f422de authored by Max Kellermann's avatar Max Kellermann

net/SocketDescriptor: allow constructing with "int"

parent d2cdaa04
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment