Condividi tramite


concurrent_vector::concurrent_vector Constructor

Constructs a concurrent vector.

explicit concurrent_vector(
   const allocator_type &_Al = allocator_type()
);

concurrent_vector(
   const concurrent_vector& _Vector
);

template<
   class M
>
concurrent_vector(
   const concurrent_vector<_Ty,
   M>& _Vector,
   const allocator_type& _Al = allocator_type()
);

concurrent_vector(
   concurrent_vector && _Vector
);

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 or move elements from.

  • _N
    The initial capacity 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 specify 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 move of the concurrent vector _Vector.

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

The sixth 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