CMake/Tests/CompileFeatures/cxx_unrestricted_unions.cpp

18 lines
153 B
C++
Raw Normal View History

2014-04-04 13:06:02 +04:00
struct point
{
2014-04-04 13:06:02 +04:00
point() {}
point(int x, int y)
: x_(x)
, y_(y)
{
}
2014-04-04 13:06:02 +04:00
int x_, y_;
};
union u
{
2014-04-04 13:06:02 +04:00
point p_;
int i_;
const char* s_;
};