Problem: socket_t can not be default constructed

Solution: Provide a default constructor
This commit is contained in:
Gudmundur Adalsteinsson
2019-04-14 12:21:30 +00:00
parent 5c95a07d72
commit 4ceabb37b6
2 changed files with 20 additions and 0 deletions

View File

@@ -641,6 +641,12 @@ class socket_t
friend class monitor_t;
public:
socket_t() ZMQ_NOTHROW
: ptr(ZMQ_NULLPTR)
, ctxptr(ZMQ_NULLPTR)
{
}
socket_t(context_t &context_, int type_)
: ptr(zmq_socket(static_cast<void*>(context_), type_))
, ctxptr(static_cast<void*>(context_))