std::meta::offset_of - cppreference.com
From cppreference.com
consteval std::meta::member_offset offset_of( std::meta::info r ); |
(since C++26) | |
Returns the offset of the non-static data member or direct base class represented by r relative to its enclosing class std::meta::parent_of(r).
Parameters
Return value
Let V be the offset in bits from the beginning of a complete object of the type represented by std::meta::parent_of(r) to the subobject associated with what r represents. Returns std::meta::member_offset{V % CHAR_BIT, V % CHAR_BIT}.
Exceptions
Throws std::meta::exception unless r represents one of the following:
- non-static data member
- unnamed bit-field
- direct base class relationship for which either the base class is not a virtual base class or the derived class is not an abstract class