Namespaces
Variants

std::move_iterator<Iter>:: move_iterator

From cppreference.net
Iterator library
Iterator concepts
Iterator primitives
Algorithm concepts and utilities
Indirect callable concepts
Common algorithm requirements
(C++20)
(C++20)
(C++20)
Utilities
(C++20)
Iterator adaptors
Range access
(C++11) (C++14)
(C++14) (C++14)
(C++11) (C++14)
(C++14) (C++14)
(C++17) (C++20)
(C++17)
(C++17)
move_iterator ( ) ;
(1) (constexpr since C++17)
explicit move_iterator ( iterator_type x ) ;
(2) (constexpr since C++17)
template < class U >
move_iterator ( const move_iterator < U > & other ) ;
(3) (constexpr since C++17)

move_iterator を新しく構築します。

オーバーロード current
(1) 値初期化
(2) x (C++20以前) std :: move ( x ) (C++20以降) で初期化
(3) other. current で初期化
3) 変換コンストラクタ。

U Iter に変換可能でない場合、プログラムは不適格となる。

(C++20まで)

このオーバーロードは、 std:: is_same_v < U, Iter > false であり、かつ std:: convertible_to < const U & , Iter > が満たされる場合にのみ、オーバーロード解決に参加する。

(C++20以降)

目次

パラメータ

x - アダプトするイテレータ
other - コピーするイテレータアダプタ

不具合報告

以下の動作変更の欠陥報告書は、以前に公開されたC++規格に対して遡及的に適用されました。

DR 適用対象 公開時の動作 正しい動作
LWG 3435 C++20 overload ( 3 ) was not constrained constrained

関連項目

別の move_iterator を代入する
(公開メンバ関数)
引数から推測された型の std::move_iterator を作成する
(関数テンプレート)