net/SocketDescriptor: allow constructing with "int"
This commit is contained in:
parent
d2cdaa041c
commit
39f422ded8
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user