Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 939 Bytes

op_assign.md

File metadata and controls

38 lines (29 loc) · 939 Bytes

operator=

  • iterator[meta header]
  • std[meta namespace]
  • move_sentinel[meta class]
  • function[meta id-type]
  • cpp20[meta cpp]
template<class S2>
  requires assignable_from<S&, const S2&>
constexpr move_sentinel& operator=(const move_sentinel<S2>& s);
  • assignable_from[link /reference/concepts/assignable_from.md]

概要

move_sentinelオブジェクトをコピー代入する。

効果

Sの番兵オブジェクトをlastというメンバ変数に保持しているとすると、以下と等価

last = s.last;
return *this;

バージョン

言語

  • C++20

処理系

参照