4 ms·
Like this? auto it = std::find(begin(replicas), end(replicas), my_ip); return (end(replicas) == it ? -1 : std::distance(begin(replicas), it)); Yeah, i
by nly 11y ago
Like this?
auto it = std::find(begin(replicas), end(replicas), my_ip);
return (end(replicas) == it ? -1 : std::distance(begin(replicas), it));
Yeah, i'll go with that.
- pavanky 11y agoYeah that's what I was thinking.