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
処理系
- Clang: ??
- GCC: ??
- Visual C++: ??