Skip to content

Commit 028410b

Browse files
authored
Merge pull request #372 from cpprefjp/wx257osn2-list-splice
list::spliceの修正
2 parents ca7334f + 7206ccf commit 028410b

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

reference/list/splice.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -31,30 +31,35 @@ void splice(const_iterator position, list&& x,
3131
他の`list`オブジェクトから、要素を移動する。
3232
3333
- (1), (2) : `position`の次の要素の前に、`x`の全ての要素を移動する。
34-
- (3), (4) : `position`の次の要素の前に、`x`の要素のうち`i`の次の要素を移動する
35-
- (5), (6) : `position`の次の要素の前に、`x`の要素のうち`(first, last)`の範囲を移動する。
34+
- (3), (4) : `position`の次の要素の前に、`x`の要素のうち`i`の指す要素を移動する
35+
- (5), (6) : `position`の次の要素の前に、`x`の要素のうち`[first, last)`の範囲を移動する。
3636
3737
3838
##要件
39-
- 第1パラメータ`position`が、`[`[`begin()`](begin.md)`,` [`end()`](end.md)`]`の範囲の間接参照可能なイテレータであること。
39+
- 第1パラメータ`position`が、`[`[`begin()`](begin.md)`,` [`end()`](end.md)`)`の範囲の間接参照可能なイテレータであること。
4040
- `i`, `first`, `last`が、`x`のイテレータであること。
4141
4242
- (1), (2) : `&x != this`であること
43+
- (5), (6) : `position`が`[first, last)`に含まれる場合、未定義動作。
4344
4445
4546
##戻り値
4647
なし
4748
4849
4950
##計算量
50-
- (1), (2) : `x`の要素数に対して線形時間
51-
- (3), (4) : 定数時間
52-
- (5), (6) : `(first, last)`の要素数に対して線形時間
51+
- C++03まで
52+
- (1), (2) : `x`の要素数に対して線形時間
53+
- (3), (4) : 定数時間
54+
- (5), (6) : `[first, last)`の要素数に対して線形時間
55+
- C++11から
56+
- (1), (2) : 定数時間
57+
- (3), (4) : 定数時間
58+
- (5), (6) : `&x == this`の場合、定数時間。そうでない場合、`[first, last)`の要素数に対して線形時間
5359
5460
5561
##例外
56-
- (1), (2) : 投げない
57-
- (3), (4) : 投げない
62+
- 投げない
5863
5964
6065
##備考

0 commit comments

Comments
 (0)