Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

list::spliceの修正 #372

Merged
merged 1 commit into from
Nov 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions reference/list/splice.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,35 @@ void splice(const_iterator position, list&& x,
他の`list`オブジェクトから、要素を移動する。

- (1), (2) : `position`の次の要素の前に、`x`の全ての要素を移動する。
- (3), (4) : `position`の次の要素の前に、`x`の要素のうち`i`の次の要素を移動する
- (5), (6) : `position`の次の要素の前に、`x`の要素のうち`(first, last)`の範囲を移動する。
- (3), (4) : `position`の次の要素の前に、`x`の要素のうち`i`の指す要素を移動する
- (5), (6) : `position`の次の要素の前に、`x`の要素のうち`[first, last)`の範囲を移動する。


##要件
- 第1パラメータ`position`が、`[`[`begin()`](begin.md)`,` [`end()`](end.md)`]`の範囲の間接参照可能なイテレータであること。
- 第1パラメータ`position`が、`[`[`begin()`](begin.md)`,` [`end()`](end.md)`)`の範囲の間接参照可能なイテレータであること。
- `i`, `first`, `last`が、`x`のイテレータであること。

- (1), (2) : `&x != this`であること
- (5), (6) : `position`が`[first, last)`に含まれる場合、未定義動作。


##戻り値
なし


##計算量
- (1), (2) : `x`の要素数に対して線形時間
- (3), (4) : 定数時間
- (5), (6) : `(first, last)`の要素数に対して線形時間
- C++03まで
- (1), (2) : `x`の要素数に対して線形時間
- (3), (4) : 定数時間
- (5), (6) : `[first, last)`の要素数に対して線形時間
- C++11から
- (1), (2) : 定数時間
- (3), (4) : 定数時間
- (5), (6) : `&x == this`の場合、定数時間。そうでない場合、`[first, last)`の要素数に対して線形時間


##例外
- (1), (2) : 投げない
- (3), (4) : 投げない
- 投げない


##備考
Expand Down