Udostępnij za pośrednictwem


concurrent_vector::concurrent_vector Constructor

Constructs a concurrent vector.

explicit concurrent_vector(
   const allocator_type &_Al = allocator_type()
);
concurrent_vector(
   const concurrent_vector& _Vector,
   const allocator_type& _Al = allocator_type()
);
template<
   class M
>
concurrent_vector(
   const concurrent_vector<_Ty,
   M>& _Vector,
   const allocator_type& _Al = allocator_type()
);
explicit concurrent_vector(
   size_type _N
);
concurrent_vector(
   size_type _N,
   const_reference _Item,
   const allocator_type& _Al = allocator_type()
);
template<
   class _InputIterator
>
concurrent_vector(
   _InputIterator_Begin,
   _InputIterator_End,
   const allocator_type &_Al = allocator_type()
);

Parameters

  • M
    The allocator type of the source vector.

  • _InputIterator
    The type of the input iterator.

  • _Al
    The allocator class to use with this object.

  • _Vector
    The source concurrent_vector object to copy elements from.

  • _N
    The initial size of the concurrent_vector object.

  • _Item
    The value of elements in the constructed object.

  • _Begin
    Position of the first element in the range of elements to be copied.

  • _End
    Position of the first element beyond the range of elements to be copied.

Remarks

All constructors store an allocator object _Al and initialize the vector.

The first constructor specifies an empty initial vector and explicitly specifies the allocator type to be used.

The second and third constructors specify a copy of the concurrent vector _Vector.

The fourth constructor specifies a repetition of a specified number (_N) of elements of the default value for class _Ty.

The fifth constructor specifies a repetition of (_N) elements of value _Item.

The last constructor specifies values supplied by the iterator range [_Begin, _End).

Requirements

Header: concurrent_vector.h

Namespace: Concurrency

See Also

Reference

concurrent_vector Class