summaryrefslogtreecommitdiffstats
path: root/Tests/CompileFeatures/cxx_unrestricted_unions.cpp
blob: f6d64f62ff39fb3176c7c66955faab9dbeee466f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

struct point
{
  point() {}
  point(int x, int y)
    : x_(x)
    , y_(y)
  {
  }
  int x_, y_;
};
union u
{
  point p_;
  int i_;
  const char* s_;
};