Changeset 1154 for trunk/src/lol/math/vector.h
- Timestamp:
- Mar 6, 2012, 8:11:19 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lol/math/vector.h
r1153 r1154 28 28 namespace lol 29 29 { 30 31 /* Some compilers do not support const members in anonymous unions. So 32 * far, GCC (>= 4.6), CLang (3.0) and Visual Studio (>= 2010) appear to 33 * work properly. */ 34 #undef LOL_NO_CONST_MEMBERS_IN_ANONYMOUS_UNIONS 35 #if defined __GNUC__ && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6)) 36 # define LOL_NO_CONST_MEMBERS_IN_ANONYMOUS_UNIONS 1 37 #endif 30 38 31 39 #define DECLARE_VECTOR_TYPEDEFS(tname, suffix) \ … … 129 137 struct { T s, t; }; 130 138 139 #if LOL_NO_CONST_MEMBERS_IN_ANONYMOUS_UNIONS 140 # define const /* disabled */ 141 #endif 131 142 XVec2<T,0x00> const xx, rr, ss; 132 143 XVec2<T,0x01> const xy, rg, st; /* lvalue */ … … 159 170 XVec4<T,0x1110> const yyyx, gggr, ttts; 160 171 XVec4<T,0x1111> const yyyy, gggg, tttt; 172 #if LOL_NO_CONST_MEMBERS_IN_ANONYMOUS_UNIONS 173 # undef const 174 #endif 161 175 }; 162 176 }; … … 288 302 struct { T s, t, p; }; 289 303 304 #if LOL_NO_CONST_MEMBERS_IN_ANONYMOUS_UNIONS 305 # define const /* disabled */ 306 #endif 290 307 XVec2<T,0x00> const xx, rr, ss; 291 308 XVec2<T,0x01> const xy, rg, st; /* lvalue */ … … 407 424 XVec4<T,0x2221> const zzzy, bbbg, pppt; 408 425 XVec4<T,0x2222> const zzzz, bbbb, pppp; 426 #if LOL_NO_CONST_MEMBERS_IN_ANONYMOUS_UNIONS 427 # undef const 428 #endif 409 429 }; 410 430 }; … … 469 489 struct { T s, t, p, q; }; 470 490 491 #if LOL_NO_CONST_MEMBERS_IN_ANONYMOUS_UNIONS 492 # define const /* disabled */ 493 #endif 471 494 XVec2<T,0x00> const xx, rr, ss; 472 495 XVec2<T,0x01> const xy, rg, st; /* lvalue */ … … 807 830 XVec4<T,0x3332> const wwwz, aaab, qqqp; 808 831 XVec4<T,0x3333> const wwww, aaaa, qqqq; 832 #if LOL_NO_CONST_MEMBERS_IN_ANONYMOUS_UNIONS 833 # undef const 834 #endif 809 835 }; 810 836 };
Note: See TracChangeset
for help on using the changeset viewer.