Skip to content

Latest commit

 

History

History
57 lines (42 loc) · 1.73 KB

File metadata and controls

57 lines (42 loc) · 1.73 KB

コンストラクタ

  • memory[meta header]
  • std[meta namespace]
  • inout_ptr_t[meta class]
  • function[meta id-type]
  • cpp23[meta cpp]
explicit
inout_ptr_t(Smart& smart, Args... args);  // (1) C++23
constexpr explicit
inout_ptr_t(Smart& smart, Args... args);  // (1) C++26

inout_ptr_t(const inout_ptr_t&) = delete; // (2) C++23

概要

  • (1) : inout_ptr_tオブジェクトの構築。
  • (2) : コピーコンストラクタ。コピー不可。

効果

(1) : inout_ptr_tクラスの説明用メンバ変数s, a, pを下記の通り初期化する。

  • Smart&型メンバ変数s : smart
  • tuple<Args...>型メンバ変数a : std::forward<Args>(args)...
  • Pointer型メンバp :
    • is_pointer_v<Smart>trueならば、smart
    • そうでなければ、smart.get()

備考

実装によってはs.release()を呼び出すかもしれない。 コンストラクタでreleaseメンバ関数を呼び出さない場合は、デストラクタにて呼び出される。

バージョン

言語

  • C++23

処理系

関連項目

参照