I have a program where I have two std::map iterators say left and right respectively. I want to find the number of elements in the ran
std::map
left
right
you can use policy based data structure which is compiler specific. More details can be found on this codeforces post The same can be used for set as well.
policy based data structure