after the push_front () call, the iterator it becomes invalid whereas the pointer p remains valid.
calling erase () in the middle of the deque invalidates all the iterators and references to its elements.