Intel® Threading Building Blocks Documentation, version 4.2

Construction, Copy, and Assignment

Caution

These operations must not be invoked concurrently on the same vector.

The following table provides additional information on the members of this template class.
Member Description
concurrent_vector( const allocator_type& a = allocator_type() )

Constructs empty vector using optionally specified allocator instance.

concurrent_vector( size_type n, const_reference t=T(), const allocator_type& a = allocator_type() );

Constructs vector of n copies of t, using optionally specified allocator instance. If t is not specified, each element is default constructed instead of copied.

template<typename InputIterator> concurrent_vector( InputIterator first, InputIterator last, const allocator_type& a = allocator_type() )

Constructs vector that is copy of the sequence [first,last), making only N calls to the copy constructor of T, where N is the distance between first and last.

concurrent_vector(std::initializer_list<T> il, const allocator_type &a = allocator_type()) )

C++11 specific; Equivalent to concurrent_vector(il.begin(), il.end(), a).

concurrent_vector( const concurrent_vector& src )

Constructs copy of src.

concurrent_vector& operator=( const concurrent_vector& src )

Assigns contents of src to *this.

Returns: Reference to left hand side.

template<typename M> concurrent_vector& operator=( const concurrent_vector<T, M>& src )

Assign contents of src to *this.

Returns: Reference to left hand side.

concurrent_vector& operator=( std::initializer_list<T> il )

C++11 specific; Sets *this to contain data from il.

Returns: Reference to left hand side.

void assign( size_type n, const_reference t )

Assign n copies of t.

template<class InputIterator > void assign( InputIterator first, InputIterator last )

Assign copies of sequence [first,last), making only N calls to the copy constructor of T, where N is the distance between first and last.

void assign( std::initializer_list<T> il )

C++11 specific; Equivalent to assign(il.begin(), il.end())