glm/test/bug/bug_ms_vec_static.cpp

32 lines
421 B
C++
Raw Permalink Normal View History

2017-01-07 11:49:45 +00:00
#include <glm/glm.hpp>
2018-07-31 21:05:48 +00:00
#if GLM_CONFIG_ANONYMOUS_STRUCT == GLM_ENABLE
2017-01-04 22:35:02 +00:00
struct vec2;
2017-01-04 22:19:48 +00:00
struct swizzleStruct
2017-01-04 22:19:48 +00:00
{
char _buffer[1];
};
struct vec2
{
2018-07-24 21:41:55 +00:00
GLM_CONSTEXPR 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 { swizzleStruct 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
}