Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Erases elements from a forward list and copies a new set of elements to a target forward list.
template<class InputIterator>
void assign(InputIterator _First, InputIterator _Last);
void assign(size_type _Count, const Type& _Val);
Parameters
Parameter |
Description |
|---|---|
_First |
The beginning of the replacement range. |
_Last |
The end of the replacement range. |
_Count |
The number of elements to assign. |
_Val |
The value to assign each element. |
Remarks
If _IList is an integer type, the first member function behaves the same as assign((size_type)_First, (Type)_Last). Otherwise, the first member function replaces the sequence controlled by *this with the sequence [_First, _Last), which must not overlap the initial controlled sequence.
The second member function replaces the sequence controlled by *this with a repetition of _Count elements of value _Val.
Requirements
Header: <forward_list>
Namespace: std