You are probably calling the std::equal overload using 3 iterators and an additional predicate. So just leave the second end as it is not interpreted as a final iterator, but a predicate that is garbage:
std::equal(a.begin(), a.end(), v.begin())
But since Mark makes his comment in this case, you have to make sure that both container sizes coincide in advance, otherwise you run the risk of running at the end of the second set. Note that C ++ 14 does introduce an overload of std::equal with four iterators (which is exactly what you assumed) and which will depend on size checking implicitly, but it looks like your implementation does not yet support this.
In addition, other answers and comments are true that a == v much simpler, clearer, and streamlined.
source share