1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
union U { struct { int x : 1; int y : 1; } test; int z; } u; void foo(const int& a){ cout << &a << endl; } int main() { cout << &u.z << endl; foo(u.test.x); foo(u.test.y); return 0; }
1 2 3
0x804fe58 0xbf5af858 0xbf5af85c