次の方法で共有


front_insert_iterator::container_type

先頭が挿入されたコンテナーを表す型。

typedef Container container_type;

解説

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

使用例

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

int main( )
{
   using namespace std;

   list<int> L1;
   front_insert_iterator<list<int> >::container_type L2 = L1;
   front_inserter ( L2 ) = 20;
   front_inserter ( L2 ) = 10;
   front_inserter ( L2 ) = 40;

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

必要条件

ヘッダー: <iterator>

名前空間: std

参照

関連項目

front_insert_iterator Class

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