次の方法で共有


concurrent_vector::concurrent_vector コンストラクター

同時実行ベクターを構築します。

explicit concurrent_vector(
   const allocator_type &_Al = allocator_type()
);
concurrent_vector(
   const concurrent_vector& _Vector,
   const allocator_type& _Al = allocator_type()
);
template<
   class M
>
concurrent_vector(
   const concurrent_vector<_Ty,
   M>& _Vector,
   const allocator_type& _Al = allocator_type()
);
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()
);

パラメーター

  • M
    ソース ベクターのアロケーターの型。

  • _InputIterator
    入力反復子の型。

  • _Al
    このオブジェクトに対して使用するアロケーター クラス。

  • _Vector
    要素のコピー元の concurrent_vector オブジェクト。

  • _N
    concurrent_vector オブジェクトの初期サイズ。

  • _Item
    構築されたオブジェクトの要素の値。

  • _Begin
    コピーする要素範囲内の最初の要素の位置。

  • _End
    コピーする要素範囲を超える最初の要素の位置。

解説

すべてのコンストラクターは、アロケーター オブジェクト _Al を格納し、ベクターを初期化します。

1 つ目のコンストラクターは、空の初期ベクターを指定し、明示的にアロケーターの型を指定します。 これが使用されます。

2 つ目および 3 つ目のコンストラクターは、同時実行ベクター _Vector のコピーを指定します。

4 つ目のコンストラクターは、_Ty クラスの既定値の要素の指定した数 (_N) の繰り返しを指定します。

5 つ目のコンストラクターは、値 _Item の (_N) 個の要素の繰り返しを指定します。

最後のコンストラクターは、反復子の範囲 (_Begin、_End) で指定される値を指定します。

必要条件

ヘッダー: concurrent_vector.h

名前空間: Concurrency

参照

その他の技術情報

concurrent_vector クラス