cxx_unrestricted_unions.cpp 153 B

1234567891011121314151617
  1. struct point
  2. {
  3. point() {}
  4. point(int x, int y)
  5. : x_(x)
  6. , y_(y)
  7. {
  8. }
  9. int x_, y_;
  10. };
  11. union u
  12. {
  13. point p_;
  14. int i_;
  15. const char* s_;
  16. };