A sequence container organizes a finite set of objects, all of the same type, into a strictly
linear arrangement.

The library provides four basic kinds of sequence containers:
vector, forward_list, list, and deque.

In addition,
array is provided as a sequence container which provides limited sequence operations
because it has a fixed number of elements.

The library also provides container adaptors that
make it easy to construct abstract data types,
such as stacks,
queues,
flat_maps,
flat_multimaps,
flat_sets, or
flat_multisets, out of
the basic sequence container kinds (or out of other program-defined sequence containers).

In this subclause,

- X denotes a sequence container class,
- a denotes a value of type X containing elements of type T,
- u denotes the name of a variable being declared,
- A denotes X::allocator_type if the
*qualified-id*X::allocator_type is valid and denotes a type ([temp.deduct]) and allocator<T> if it doesn't, - i and j denote iterators that meet the
*Cpp17InputIterator*requirements and refer to elements implicitly convertible to value_type, - [i, j) denotes a valid range,
- il designates an object of type initializer_list<value_type>,
- n denotes a value of type X::size_type,
- p denotes a valid constant iterator to a,
- q denotes a valid dereferenceable constant iterator to a,
- [q1, q2) denotes a valid range of constant iterators in a,
- t denotes an lvalue or a const rvalue of X::value_type, and
- Args denotes a template parameter pack;

A type X meets the *sequence container* requirements
if X meets the container requirements and
the following statements and expressions are well-formed and have
the specified semantics.

```
X u(n, t);
```

```
X u(i, j);
```

For vector,
if the iterator does not meet
the *Cpp17ForwardIterator* requirements ([forward.iterators]),
T is also *Cpp17MoveInsertable* into X.

```
X(from_range, rg)
```

For vector,
if R models
neither ranges::sized_range nor ranges::forward_range,
T is also *Cpp17MoveInsertable* into X.

```
X(il)
```

```
a = il
```

```
a.emplace(p, args)
```

```
a.insert(p, t)
```

```
a.insert(p, rv)
```

```
a.insert(p, n, t)
```

```
a.insert(p, i, j)
```

For vector and deque,
T is also
*Cpp17MoveInsertable* into X,
and T meets the
*Cpp17MoveConstructible*,
*Cpp17MoveAssignable*, and
*Cpp17Swappable* ([swappable.requirements]) requirements.

```
a.insert_range(p, rg)
```

```
a.insert(p, il)
```

```
a.erase(q)
```

```
a.erase(q1, q2)
```

```
a.clear()
```

```
a.assign(i, j)
```

For vector,
if the iterator does not meet
the forward iterator requirements ([forward.iterators]),
T is also *Cpp17MoveInsertable* into X.

```
a.assign_range(rg)
```

```
a.assign(il)
```

```
a.assign(n, t)
```

For every sequence container defined in this Clause and in [strings]:

- If the constructor template<class InputIterator> X(InputIterator first, InputIterator last, const allocator_type& alloc = allocator_type()); is called with a type InputIterator that does not qualify as an input iterator, then the constructor shall not participate in overload resolution.
- If the member functions of the forms:
template<class InputIterator>
*return-type**F*(const_iterator p, InputIterator first, InputIterator last); // such as insert template<class InputIterator>*return-type**F*(InputIterator first, InputIterator last); // such as append, assign template<class InputIterator>*return-type**F*(const_iterator i1, const_iterator i2, InputIterator first, InputIterator last); // such as replace are called with a type InputIterator that does not qualify as an input iterator, then these functions shall not participate in overload resolution. - A deduction guide for a sequence container shall not participate in overload resolution if it has an InputIterator template parameter and a type that does not qualify as an input iterator is deduced for that parameter, or if it has an Allocator template parameter and a type that does not qualify as an allocator is deduced for that parameter.

```
a.front()
```

```
a.back()
```

```
a.emplace_front(args)
```

```
a.emplace_back(args)
```

```
a.push_front(t)
```

```
a.push_front(rv)
```

```
a.prepend_range(rg)
```

For deque,
T is also *Cpp17MoveInsertable* into X, and
T meets the
*Cpp17MoveConstructible*,
*Cpp17MoveAssignable*, and
*Cpp17Swappable* ([swappable.requirements]) requirements.

```
a.push_back(t)
```

```
a.push_back(rv)
```

```
a.append_range(rg)
```

```
a.pop_front()
```

```
a.pop_back()
```

```
a[n]
```

```
a.at(n)
```