bug_ms_vec_static.cpp 359 B

123456789101112131415161718192021222324252627
  1. struct vec2;
  2. struct _swizzle
  3. {
  4. char _buffer[1];
  5. };
  6. struct vec2
  7. {
  8. constexpr vec2(float x, float y) :
  9. x(x), y(y)
  10. {}
  11. union
  12. {
  13. struct { float x, y; };
  14. struct { _swizzle xx; };
  15. };
  16. };
  17. // Visual C++ has a bug generating the error: fatal error C1001: An internal error has occurred in the compiler.
  18. vec2 const Bar(1.f, 1.f);
  19. int main()
  20. {
  21. return 0;
  22. }