Open jwmelto opened 1 month ago
Thanks for that. It would be possible to add an overload for durations, something like
template<class T>
void set(sockopt::integral_option<ZMQ_RCVTIMEO, int, false>, duration<T> val)
{
// ...
}
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 likeand the enumeration-as-helper-type pattern precludes overloads. I don't see a good solution to this issue