deque::operator[]

const_reference operator[](size_type pos) const;
reference operator[](size_type pos);

The member function returns a reference to the element of the controlled sequence at position pos. If that position is invalid, the behavior is undefined.

See the related sample program.