concurrent_vector::assign Method

Erases the elements of the concurrent vector and assigns to it either _N copies of _Item, or values specified by the iterator range [_Begin, _End). This method is not concurrency-safe.

void assign(
   size_type _N,
   const_reference _Item

   class _InputIterator
void assign(


  • _InputIterator
    The type of the specified iterator.

  • _N
    The number of items to copy into the concurrent vector.

  • _Item
    Reference to a value used to fill the concurrent vector.

  • _Begin
    An iterator to the first element of the source range.

  • _End
    An iterator to one past the last element of the source range.


assign is not concurrency-safe. You must ensure that no other threads are invoking methods on the concurrent vector when you call this method.


Header: concurrent_vector.h

Namespace: concurrency

See Also


concurrent_vector Class