ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/util.h
(Generate patch)

Comparing deliantra/server/include/util.h (file contents):
Revision 1.123 by root, Wed Nov 16 23:42:01 2016 UTC vs.
Revision 1.124 by root, Fri Nov 18 20:20:05 2016 UTC

55#endif 55#endif
56 56
57// use C0X decltype for auto declarations until ISO C++ sanctifies them (if ever) 57// use C0X decltype for auto declarations until ISO C++ sanctifies them (if ever)
58#define auto(var,expr) decltype(expr) var = (expr) 58#define auto(var,expr) decltype(expr) var = (expr)
59 59
60#if cplusplus_does_not_suck 60#if cplusplus_does_not_suck /* still sucks in codesize with gcc 6, although local types work now */
61// does not work for local types (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm) 61// does not work for local types (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm)
62template<typename T, int N> 62template<typename T, int N>
63static inline int array_length (const T (&arr)[N]) 63static inline int array_length (const T (&arr)[N])
64{ 64{
65 return N; 65 return N;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines