Problem: Solaris Studio does not convert from char * to string

Solution: do it explicitly to fix build on Solaris 10/11 with the Sun
compiler
This commit is contained in:
Luca Boccassi
2018-05-13 13:16:37 +01:00
parent 3d9c119543
commit 8b82ed50a2
4 changed files with 10 additions and 7 deletions

View File

@@ -503,7 +503,8 @@ int zmq::ctx_t::register_endpoint (const char *addr_,
scoped_lock_t locker (endpoints_sync);
const bool inserted =
endpoints.ZMQ_MAP_INSERT_OR_EMPLACE (addr_, endpoint_).second;
endpoints.ZMQ_MAP_INSERT_OR_EMPLACE (std::string (addr_), endpoint_)
.second;
if (!inserted) {
errno = EADDRINUSE;
return -1;