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 {
|
class SocketDescriptor : protected FileDescriptor {
|
||||||
protected:
|
protected:
|
||||||
explicit constexpr SocketDescriptor(int _fd)
|
|
||||||
:FileDescriptor(_fd) {}
|
|
||||||
|
|
||||||
explicit constexpr SocketDescriptor(FileDescriptor _fd)
|
explicit constexpr SocketDescriptor(FileDescriptor _fd)
|
||||||
:FileDescriptor(_fd) {}
|
:FileDescriptor(_fd) {}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SocketDescriptor() = default;
|
SocketDescriptor() = default;
|
||||||
|
|
||||||
|
explicit constexpr SocketDescriptor(int _fd)
|
||||||
|
:FileDescriptor(_fd) {}
|
||||||
|
|
||||||
constexpr bool operator==(SocketDescriptor other) const {
|
constexpr bool operator==(SocketDescriptor other) const {
|
||||||
return fd == other.fd;
|
return fd == other.fd;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user