Iterator stuff
I have a function that expects a reference to a std::vector. Now I want it to be able to accept a pointer to an array.
I thought I could give the start and end iterator to the function, like in std::copy(). But I couldn't figure out the type of the function's parameter that would work as an iterator for both vector iterators and plain pointers. Can I get away with just one type, or do I have to overload my function for pointers?
I thought I could give the start and end iterator to the function, like in std::copy(). But I couldn't figure out the type of the function's parameter that would work as an iterator for both vector iterators and plain pointers. Can I get away with just one type, or do I have to overload my function for pointers?
