scoped_allocator_adaptor::construct Method
オブジェクトを構築します。
template<class Ty, class... Atypes>
void construct(Ty *ptr, Atypes&&... args);
template<class Ty1, class Ty2, class... Atypes1, class... Atypes2>
void construct(pair<Ty1, Ty2> *ptr, piecewise_construct_t,
tuple<Atypes1&&...> first, tuple<Atypes1&&...> second);
template<class Ty1, class Ty2>
void construct(pair<Ty1, Ty2> *ptr);
template<class Ty1, class Ty2, class Uy1, class Uy2>
void construct(pair<Ty1, Ty2> *ptr,
class Uy1&& first, class Uy2&& second);
template<class Ty1, class Ty2, class Uy1, class Uy2>
void construct(pair<Ty1, Ty2> *ptr, const pair<Uy1, Uy2>& right);
template<class Ty1, class Ty2, class Uy1, class Uy2>
void construct(pair<Ty1, Ty2> *ptr, pair<Uy1, Uy2>&& right);
パラメーター
ptr
オブジェクトを構築しているメモリ位置へのポインター。args
引数リスト。first
1 番目のオブジェクトは、ペアを入力します。second
2 番目のオブジェクトは、ペアを入力します。right
移動またはコピーされる既存のオブジェクト。
解説
最初のメソッドは ptr で xargs... が次のいずれか Outermost_traits::construct(OUTERMOST(*this), ptr, xargs...)を呼び出してオブジェクトを構築します。
uses_allocator<Ty, inner_allocator_type> が false を保持します xargs... は、args...です。
uses_allocator<Ty, inner_allocator_type> が保持されますが is_constructible<Ty, allocator_arg_t, inner_allocator_type, args...> が当てはまれば、xargs... は allocator_arg, inner_allocator(), args...です。
uses_allocator<Ty, inner_allocator_type> が保持されますが is_constructible<Ty, args..., inner_allocator()> が当てはまれば、xargs... は args..., inner_allocator()です。
2 番目のメソッドは ptr で xargs... が上の一覧のように変更する first... で、Outermost_traits::construct(OUTERMOST(*this), &ptr->second, xargs...)の構築を呼び出してペアを取得します xargs... が上の一覧のように変更する second... である Outermost_traits::construct(OUTERMOST(*this), &ptr->first, xargs...)。
3 番目のメソッドは this->construct(ptr, piecewise_construct, tuple<>, tuple<>)と同様に動作します。
4 番目のメソッドは this->construct(ptr, piecewise_construct, forward_as_tuple(std::forward<Uy1>(first), forward_as_tuple(std::forward<Uy2>(second))と同様に動作します。
5 番目のメソッドは this->construct(ptr, piecewise_construct, forward_as_tuple(right.first), forward_as_tuple(right.second))と同様に動作します。
6 番目のメソッドは this->construct(ptr, piecewise_construct, forward_as_tuple(std::forward<Uy1>(right.first), forward_as_tuple(std::forward<Uy2>(right.second))と同様に動作します。
必要条件
ヘッダー: <scoped_allocator>
名前空間: std