You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm updating legacy code to use the new socket options, and ran into an issue:
error: no matching function for call to 'zmq::socket_t::set(const zmq::sockopt::rcvtimeo_t& std::chrono::duration<long int, std::ratio<1, 1000> >::rep)'
A richer interface would accept a (templated?) std::chrono::duration, but the specific issue here is the definition of sockopt::rcvtimeo uses int and template substitution fails when provided a long int (std::chrono::milliseconds::rep).
Simply changing the definition of rcvtimeo to take a long int breaks code like
sock.set(zmq::sockopt::rcvtimeo, 42);
and the enumeration-as-helper-type pattern precludes overloads. I don't see a good solution to this issue
The text was updated successfully, but these errors were encountered:
I'm updating legacy code to use the new socket options, and ran into an issue:
The calling user code is like this:
A richer interface would accept a (templated?)
std::chrono::duration
, but the specific issue here is the definition ofsockopt::rcvtimeo
usesint
and template substitution fails when provided along int
(std::chrono::milliseconds::rep
).Simply changing the definition of
rcvtimeo
to take along int
breaks code likesock.set(zmq::sockopt::rcvtimeo, 42);
and the enumeration-as-helper-type pattern precludes overloads. I don't see a good solution to this issue
The text was updated successfully, but these errors were encountered: