|
|
|
|
|
by nly
3736 days ago
|
|
It's hard to say what he was trying to accomplish, but he probably could have written something like this. auto index = std::distance (begin(replicas),
std::find(begin(replicas), end(replicas), my_ip));
return (replicas.size() == index ? -1 : index);
|
|