次の方法で共有


insert_iterator::container_type

一般的な挿入が行われた、コンテナーを表す型。

typedef Container container_type;

解説

この型は、テンプレート パラメーター **[コンテナー]**のシノニムです。

使用例

// insert_iterator_container_type.cpp
// compile with: /EHsc
#include <iterator>
#include <list>
#include <iostream>

int main( )
{
   using namespace std;

   list<int> L1;
   insert_iterator<list<int> >::container_type L2 = L1;
   inserter ( L2, L2.end ( ) ) = 20;
   inserter ( L2, L2.end ( ) ) = 10;
   inserter ( L2, L2.begin ( ) ) = 40;

   list <int>::iterator vIter;
   cout << "The list L2 is: ( ";
   for ( vIter = L2.begin ( ) ; vIter != L2.end ( ); vIter++ )
      cout << *vIter << " ";
   cout << ")." << endl;
}
  

必要条件

ヘッダー: <iterator>

名前空間: std

参照

関連項目

insert_iterator Class

標準テンプレート ライブラリ