Fix crash on UDP initialization

This commit is contained in:
Kp 2014-12-06 02:16:28 +00:00
parent 7338bb2402
commit a55028d5b4

View file

@ -174,6 +174,7 @@ struct RAIIsocket
closesocket(c);
}
explicit operator bool() const { return s != INVALID_SOCKET; }
explicit operator bool() { return static_cast<bool>(*const_cast<const RAIIsocket *>(this)); }
operator SOCKET() { return s; }
template <typename T> bool operator<(T) const = delete;
template <typename T> bool operator<=(T) const = delete;