Skip to content

Commit

Permalink
ranges::swap_ranges の swap 回数が正しくない問題を修正
Browse files Browse the repository at this point in the history
  • Loading branch information
komori-n committed Jul 18, 2023
1 parent c3f3f2c commit 97b792b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions reference/algorithm/ranges_swap_ranges.md
Expand Up @@ -43,12 +43,12 @@ namespace std::ranges {
## 効果
0 以上 `last1 - first1` 以下のそれぞれの `n` について [`swap`](/reference/utility/swap.md)`(*(first1 + n), *(first2 + n))` を行う
0 以上 [`min`](ranges_min.md)`(last1 - first1, last2 - first2)` 未満のそれぞれの `n` について [`swap`](/reference/utility/swap.md)`(*(first1 + n), *(first2 + n))` を行う
## 事前条件
`[first1,last1)` と `[first2,first2 + (last1 - first1))` の範囲が重なってはならない。
0 以上 `last1 - first1` 未満のそれぞれの `n` について、`*(first1 + n) と *(first2 + n)` は `Swappable` でなければならない。
`[first1,last1)` と `[first2,last2)` の範囲が重なってはならない。
0 以上 [`min`](ranges_min.md)`(last1 - first1, last2 - first2)` 未満のそれぞれの `n` について、`*(first1 + n) と *(first2 + n)` は `Swappable` でなければならない。
## 戻り値
Expand All @@ -64,7 +64,7 @@ swap_ranges_result {


## 計算量
正確に `last1 - first1` 回のスワップが行われる
正確に [`min`](ranges_min.md)`(last1 - first1, last2 - first2)` 回のスワップが行われる


##
Expand Down

0 comments on commit 97b792b

Please sign in to comment.