From ebafd8e82da3e2ba311d4371f7c61bda03a18371 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Thu, 11 Aug 2016 00:41:38 +0200 Subject: [PATCH] Fixed aligned type build on Visual C++ 2013 and older compiler #539 --- glm/detail/type_vec.hpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/glm/detail/type_vec.hpp b/glm/detail/type_vec.hpp index 82e4ba01..23e463e7 100644 --- a/glm/detail/type_vec.hpp +++ b/glm/detail/type_vec.hpp @@ -9,6 +9,15 @@ namespace glm{ namespace detail { + template struct aligned {}; + template<> GLM_ALIGNED_STRUCT(1) aligned<1>{}; + template<> GLM_ALIGNED_STRUCT(2) aligned<2>{}; + template<> GLM_ALIGNED_STRUCT(4) aligned<4>{}; + template<> GLM_ALIGNED_STRUCT(8) aligned<8>{}; + template<> GLM_ALIGNED_STRUCT(16) aligned<16>{}; + template<> GLM_ALIGNED_STRUCT(32) aligned<32>{}; + template<> GLM_ALIGNED_STRUCT(64) aligned<64>{}; + template struct storage { @@ -20,9 +29,10 @@ namespace detail template struct storage { - typedef GLM_ALIGNED_STRUCT(size) type { + struct type : aligned + { uint8 data[size]; - } type; + }; }; # if GLM_ARCH & GLM_ARCH_SSE2_BIT