構築、コピー、および代入

注意

これらの操作は、同じベクトルで同時に呼び出してはなりません。

次の表は、このテンプレート・クラスのメンバーの詳細な情報を提供します。
メンバー 説明
concurrent_vector( const allocator_type& a = allocator_type() )

オプションで指定されたアロケーター・インスタンスを使用して、空のベクトルを構築します。

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

オプションで指定されたアロケーター・インスタンスを使用して、tn 個のコピーのベクトルを構築します。t が指定されない場合、各要素は、コピーされる代わりに、デフォルト設定で構築されます。

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

T のコピー・コンストラクターを N 回だけ呼び出し、シーケンス [first,last) のコピーで構成されるベクトルを構築します。ここで、Nfirstlast の間の距離です。

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

C++11 仕様。concurrent_vector( il.begin(), il.end(), a) と等価です。

concurrent_vector( const concurrent_vector& src )

src のコピーを構築します。

concurrent_vector(concurrent_vector&& src )

C++11 仕様。src のコンテンツを移動することにより新しいベクトルを構築します。src は無指定の状態のままですが、安全に破棄することができます。

concurrent_vector( concurrent_vector&& src, const allocator_type& a )

C++11 仕様。アロケーター a を使用して src のコンテンツを移動することにより新しいベクトルを構築します。src は無指定の状態のままですが、安全に破棄することができます。

concurrent_vector& operator=( const concurrent_vector& src )

src のコンテンツを *this に代入します。

戻り値: 計算後の *this への参照。

concurrent_vector& operator=(concurrent_vector&& src);

C++11 仕様。src から *this にデータを移動します。src は無指定の状態のままですが、安全に破棄することができます。

戻り値: 計算後の *this への参照。

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

src のコンテンツを *this に代入します。

戻り値: 計算後の *this への参照。

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

C++11 仕様。*this を設定して il のデータを含めます。

戻り値: 計算後の *this への参照。

void assign( size_type n, const_reference t )

tn 個のコピーを *this に代入します。

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

T のコピー・コンストラクターを N 回だけ呼び出し、シーケンス [first,last) のコンテンツを代入します。ここで、Nfirstlast の間の距離です。

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

C++11 仕様。assign(il.begin(), il.end()) と等価です。