glm/test/bug/bug_ms_vec_static.cpp

32 lines
395 B
C++
Raw Normal View History

2017-01-07 11:49:45 +00:00
#include <glm/glm.hpp>
#if GLM_HAS_ALIGNED_TYPE
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-07 11:49:45 +00:00
GLM_CONSTEXPR_CTOR vec2() :
2017-01-04 22:41:35 +00:00
x(0), y(0)
2017-01-04 22:19:48 +00:00
{}
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-07 11:49:45 +00:00
#endif
2017-01-04 22:19:48 +00:00
// Visual C++ has a bug generating the error: fatal error C1001: An internal error has occurred in the compiler.
2017-01-07 11:15:08 +00:00
// vec2 Bar;
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
}