2017-01-04 22:35:02 +00:00
|
|
|
struct vec2;
|
2017-01-04 22:19:48 +00:00
|
|
|
|
2017-01-04 22:35:02 +00:00
|
|
|
struct _swizzle
|
2017-01-04 22:19:48 +00:00
|
|
|
{
|
|
|
|
char _buffer[1];
|
|
|
|
};
|
|
|
|
|
|
|
|
struct vec2
|
|
|
|
{
|
2017-01-04 22:35:02 +00:00
|
|
|
constexpr vec2(float x, float y) :
|
2017-01-04 22:19:48 +00:00
|
|
|
x(x), y(y)
|
|
|
|
{}
|
|
|
|
|
|
|
|
union
|
|
|
|
{
|
2017-01-04 22:35:02 +00:00
|
|
|
struct { float x, y; };
|
|
|
|
struct { _swizzle xx; };
|
2017-01-04 22:19:48 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2017-01-04 21:54:15 +00:00
|
|
|
// Visual C++ has a bug generating the error: fatal error C1001: An internal error has occurred in the compiler.
|
2017-01-04 22:35:02 +00:00
|
|
|
vec2 const Bar(1.f, 1.f);
|
2016-09-25 08:29:08 +00:00
|
|
|
|
|
|
|
int main()
|
|
|
|
{
|
2016-09-25 08:35:30 +00:00
|
|
|
return 0;
|
2016-09-25 08:29:08 +00:00
|
|
|
}
|