std::meta::member_offset
From cppreference.com
| Defined in header <meta>
|
||
struct member_offset {
std::ptrdiff_t bytes;
std::ptrdiff_t bits;
constexpr std::ptrdiff_t total_bits() const;
auto operator<=>(const member_offset&) const = default;
};
|
(since C++26) | |
The type member_offset represents the offset of a member or base class relative to its enclosing class.
Data members
| Member name | Definition |
bytes
|
represents the offset in bytes |
bits
|
represents the remaining bits in the offset |
Member functions
total_bits |
returns bytes * CHAR_BITS + bits (public member function) |
operator<=> |
the comparison is defaulted (public member function) |
Example
| This section is incomplete Reason: no example |
See also
(C++26) |
returns the offset of a (member or base) subobject relative to its enclosing class (function) |