If the return value of front is assigned to a const_reference, the queue object cannot be modified. If the return value of front is assigned to a reference, the queue object can be modified.
The member function returns a reference to the first element of the controlled sequence, which must be nonempty.
When compiling with _SECURE_SCL 1, a runtime error will occur if you attempt to access an element in an empty queue. See Checked Iterators for more information.