Merge pull request #313 from gummif/gfa/socket-ctor

Problem: socket_t can not be default constructed
This commit is contained in:
Simon Giesecke
2019-04-15 10:58:45 +02:00
committed by GitHub
2 changed files with 20 additions and 0 deletions

View File

@@ -646,6 +646,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_))