名前空間
変種
操作

std::deque::insert

提供: cppreference.com
< cpp‎ | container‎ | deque

 
 
 
はstd :: dequeの
メンバ関数
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::deque
deque::~deque
deque::operator=
deque::assign
deque::get_allocator
要素アクセスの循環参照を解除するために使用されている
Original:
Element access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::front
deque::back
イテレータ
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::begin
deque::cbegin

(C++11)
deque::end
deque::cend

(C++11)
deque::rbegin
deque::crbegin

(C++11)
deque::rend
deque::crend

(C++11)
容量
Original:
Capacity
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::empty
deque::size
deque::max_size
deque::shrink_to_fit
修飾子
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
deque::clear
deque::insert
deque::emplace
deque::erase
deque::push_front
deque::emplace_front
deque::pop_front
deque::push_back
deque::emplace_back
deque::pop_back
deque::resize
deque::swap
 
iterator insert( iterator pos, const T& value );
iterator insert( const_iterator pos, const T& value );
(1) (C++11以前)
(C++11およびそれ以降)
iterator insert( const_iterator pos, T&& value );
(2) (C++11およびそれ以降)
void insert( iterator pos, size_type count, const T& value );
iterator insert( const_iterator pos, size_type count, const T& value );
(3) (C++11以前)
(C++11およびそれ以降)
template< class InputIt >

void insert( iterator pos, InputIt first, InputIt last);
template< class InputIt >

iterator insert( const_iterator pos, InputIt first, InputIt last );
(4) (C++11以前)

(C++11およびそれ以降)
iterator insert( const_iterator pos, std::initializer_list<T> ilist );
(5) (C++11およびそれ以降)
コンテナ内の指定された位置に挿入要素.
Original:
Inserts elements to specified position in the container.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1-2)
挿入value要素がposが指す前に
Original:
inserts value before the element pointed to by pos
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
挿入countvalueが指す要素の直前posのコピー
Original:
inserts count copies of the value before the element pointed to by pos
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
要素の前にレンジ[first, last)からの挿入要素はposが指す
Original:
inserts elements from range [first, last) before the element pointed to by pos
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
初期化子リストから挿入要素ilist.
Original:
inserts elements from initializer list ilist.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

All iterators are invalidated. References are invalidated too, unless pos == begin() or pos == end(), in which case they are not invalidated.

目次

[編集] パラメータ

pos -
コンテンツが挿入される前に、要素
Original:
element before which the content will be inserted
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
value -
要素には、値挿入する
Original:
element value to insert
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
first, last -
挿入する要素の範囲は、インサートが呼び出されたコンテナにイテレータにすることはできません
Original:
the range of elements to insert, can't be iterators into container for which insert is called
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ilist -
初期化子は、リストから値を挿入する
Original:
initializer list to insert the values from
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Type requirements
-
InputIt must meet the requirements of InputIterator.

[編集] 値を返します

1-2)
挿入valueを指すイテレータ
Original:
iterator pointing to the inserted value
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
3)
最初の要素を指す反復​​子は、挿入、またはposcount==0場合.
Original:
iterator pointing to the first element inserted, or pos if count==0.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
4)
最初の要素を指す反復​​子は、挿入、またはposfirst==last場合.
Original:
iterator pointing to the first element inserted, or pos if first==last.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
5)
最初の要素を指す反復​​子は、挿入、またはposilist場合は空です.
Original:
iterator pointing to the first element inserted, or pos if ilist is empty.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 複雑

1-2) Constant plus linear in the lesser of the distances between pos and either of the ends of the container.

3) Linear in count plus linear in the lesser of the distances between pos and either of the ends of the container.

4) Linear in std::distance(first, last) plus linear in the lesser of the distances between pos and either of the ends of the container.

5) Linear in ilist.size() plus linear in the lesser of the distances between pos and either of the ends of the container.

[編集] も参照してください

(C++11)
constructs element in-place
(パブリックメンバ関数) [edit]
先頭に挿入要素
Original:
inserts elements to the beginning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(パブリックメンバ関数) [edit]
コンテナの末尾に要素を追加します
(パブリックメンバ関数) [edit]