Skip to content

Latest commit

 

History

History
51 lines (38 loc) · 1.12 KB

File metadata and controls

51 lines (38 loc) · 1.12 KB

member_offset

  • meta[meta header]
  • std::meta[meta namespace]
  • class[meta id-type]
  • cpp26[meta cpp]
namespace std::meta {
  struct member_offset {
    ptrdiff_t bytes;
    ptrdiff_t bits;
    constexpr ptrdiff_t total_bits() const;
    auto operator<=>(const member_offset&) const = default;
  };
}

概要

member_offsetは、メンバ変数のオフセットを表すクラスである。offset_of()の戻り値型として使用される。

メンバ変数

名前 説明
bytes バイト単位のオフセット
bits ビット単位の追加オフセット

メンバ関数

名前 説明
total_bits() bytes * CHAR_BIT + bitsを返す
operator<=> 三方比較(デフォルト)

バージョン

言語

  • C++26

処理系

関連項目

参照