performance/ocw/bit-hacks/structop.cc

15 lines
149 B
C++

#include <cstddef>
#include <iostream>
struct S {
char b;
int i;
};
int main() {
S s;
std::cout << offsetof(S, i) << '\n';
return 0;
}