… | |
… | |
72 | #endif |
72 | #endif |
73 | |
73 | |
74 | // use C0X decltype for auto declarations until ISO C++ sanctifies them (if ever) |
74 | // use C0X decltype for auto declarations until ISO C++ sanctifies them (if ever) |
75 | #define auto(var,expr) decltype(expr) var = (expr) |
75 | #define auto(var,expr) decltype(expr) var = (expr) |
76 | |
76 | |
77 | // very ugly macro that basicaly declares and initialises a variable |
77 | // very ugly macro that basically declares and initialises a variable |
78 | // that is in scope for the next statement only |
78 | // that is in scope for the next statement only |
79 | // works only for stuff that can be assigned 0 and converts to false |
79 | // works only for stuff that can be assigned 0 and converts to false |
80 | // (note: works great for pointers) |
80 | // (note: works great for pointers) |
81 | // most ugly macro I ever wrote |
81 | // most ugly macro I ever wrote |
82 | #define statementvar(type, name, value) if (type name = 0) { } else if (((name) = (value)), 1) |
82 | #define statementvar(type, name, value) if (type name = 0) { } else if (((name) = (value)), 1) |