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

安全性

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

次の表は、このテンプレート・クラスのメンバーの詳細な情報を提供します。
メンバー 説明
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) のコピーで構成されるベクトルを構築します。ここで、N は first と last の間の距離です。

concurrent_vector( const concurrent_vector& src )

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

concurrent_vector& operator=( const concurrent_vector& src )

src の内容を *this に代入します。

戻り値: 左辺への参照。

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

src の内容を *this に代入します。

戻り値: 左辺への参照。

void assign( size_type n, const_reference t )

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

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

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