I've got a specialized container that holds objects of class S. I've got the usual void add(S) and bool remove(S) functions. I'd like to add functions to add and remove a range of elements. For example, something like void add_range(InputIterator<S> begin, InputIterator<S> end) and int remove_range(InputIterator<S> begin, InputIterator<S> end).
I found this link that helped me understand how to define functions that take iterators. However, doing it that way doesn't restrict my range functions to take only InputIterators that have a value_type of S. How can I define a function to take InputIterators with a value_type of S?