iter_swap(ranges::concat_view::iterator)
| friend constexpr void iter_swap( const /*iterator*/& x, const /*iterator*/& y ) noexcept( /* 説明を参照 */ ) requires ( /* 説明を参照 */ ); |
(C++26以降) | |
x と y の基底となるイテレータが指すオブジェクトを交換します。これは、以下の std::visit
(
[&](const auto& it1, const auto& it2)
{
if constexpr (std::is_same_v<decltype(it1), decltype(it2)>)
ranges::iter_swap(it1, it2);
else
ranges::swap(*x, *y);
},
x.it_ ,
y.it_
); に相当します。
requires 句の式は、 std::swappable_with<std::iter_reference_t</*イテレータ*/>,
std::iter_reference_t</*イテレータ*/>> &&
(... && std::indirectly_swappable<ranges::iterator_t<maybe-const <Const, Views>>>) 相当します。
x.it_ .valueless_by_exception() || y.it_ .valueless_by_exception() が true の場合、動作は未定義です。
この関数は、通常の 非修飾または修飾名前探索では見えず、concat_view::iterator <Const> が引数に関連付けられたクラスである場合にのみ、引数依存名前探索によって見つけることができます。
目次 |
[編集] パラメータ
| x, y | - | イテレータ |
[編集] 例外
its は、const ranges::iterator_t<maybe-const <Const, Views>> の対応する型の左辺値のパックとします。
[編集] 例
| このセクションは未完成です 理由: 例がありません |
[編集] 関連項目
| (C++20) |
2つの間接参照可能なオブジェクトが参照する値を交換する (カスタマイゼーションポイントオブジェクト) |
| 2つのイテレータが指す要素をスワップする (関数テンプレート) |