cmake/Tests/CompileFeatures/cxx_unrestricted_unions.cpp

18 lines
153 B
C++
Raw Normal View History

2015-04-27 22:25:09 +02:00
2016-07-09 11:21:54 +02:00
struct point
{
2015-04-27 22:25:09 +02:00
point() {}
2016-07-09 11:21:54 +02:00
point(int x, int y)
: x_(x)
, y_(y)
{
}
2015-04-27 22:25:09 +02:00
int x_, y_;
};
2016-07-09 11:21:54 +02:00
union u
{
2015-04-27 22:25:09 +02:00
point p_;
int i_;
const char* s_;
};