名前空間
変種
操作

std::vector::emplace

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

 
 
 
std::vector
メンバ関数
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.
vector::vector
vector::~vector
vector::operator=
vector::assign
vector::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.
vector::at
vector::operator[]
vector::front
vector::back
vector::data(C++11)
イテレータ
Original:
Iterators
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
vector::begin
vector::cbegin

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

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

(C++11)
vector::rend
vector::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.
vector::empty
vector::size
vector::max_size
vector::reserve
vector::capacity
vector::shrink_to_fit(C++11)
修飾子
Original:
Modifiers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
vector::clear
vector::insert
vector::emplace(C++11)
vector::erase
vector::push_back
vector::emplace_back(C++11)
vector::pop_back
vector::resize
vector::swap
 
template< class... Args >
iterator emplace( const_iterator pos, Args&&... args );
(C + + 11以来)
直接挿入pos前にコンテナに新しい要素。要素はその場で構成され、操作が実行されないコピーや移動、すなわちません。要素のコンストラクタは引数std::forward<Args>(args)...で呼び出されます。要素型はEmplaceConstructible, MoveInsertable and MoveAssignableでなければなりません.
Original:
Inserts a new element into the container directly before pos. The element is constructed in-place, i.e. no copy or move operations are performed. The constructor of the element is called with the arguments std::forward<Args>(args).... The element type must be EmplaceConstructible, MoveInsertable and MoveAssignable.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

If the new size() is greater than capacity(), all iterators and references are invalidated. Otherwise, only the iterators and references after the added element are invalidated.

目次

[編集] パラメータ

pos -
新しい要素が構築される前に、イテレータ
Original:
iterator before which the new element will be constructed
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
args -
要素のコンストラクタに転送するための引数
Original:
arguments to forward to the constructor of the element
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 値を返します

定置の要素を指すイテレータ.
Original:
Iterator pointing to the emplaced element.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[編集] 複雑

Linear in the distance between pos and end of the container.

[編集] 例外

例外は(コンストラクタなどで)スローされた場合、この関数は(強い例外保証)と呼ばれることはなかったかのように、容器は、変更されない.
Original:
If an exception is thrown (e.g. by the constructor), the container is left unmodified, as if this function was never called (strong exception guarantee).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

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

要素を挿入します
(パブリックメンバ関数) [edit]