Udostępnij za pośrednictwem


concurrent_queue::concurrent_queue Constructor

Constructs a concurrent queue.

explicit concurrent_queue(
   const allocator_type &_Al = allocator_type()
);
template<
   typename _Ty,
   class _Ax
>
concurrent_queue<_Ty,_Ax>::concurrent_queue(
   const concurrent_queue& _Queue,
   const allocator_type& _Al = allocator_type()
);
template<
   typename _InputIterator
>
concurrent_queue(
   _InputIterator_Begin,
   _InputIterator_End
);

Parameters

  • _InputIterator
    The type of the input iterator that specifies a range of values.

  • _Al
    The allocator class to use with this object.

  • _OtherQ
    The source concurrent_queue object to copy elements from.

  • _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 queue.

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

The second constructor specifies a copy of the concurrent queue _OtherQ.

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

Requirements

Header: concurrent_queue.h

Namespace: Concurrency

See Also

Reference

concurrent_queue Class