Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.
I would like to check that the input iterators first and last refer to the same container. I know that the STL containers carry out such a check, since if one tries to use insert when this condition fails, one gets an error, e.g., "string iterators incompatible". How is this check implemented for STL containers?
void insert (iterator position, InputIterator first, InputIterator last);
Join the community of 500,000 technology professionals and ask your questions.