… | |
… | |
336 | #endif |
336 | #endif |
337 | |
337 | |
338 | /* no emulation for ecb_decltype */ |
338 | /* no emulation for ecb_decltype */ |
339 | #if ECB_CPP11 |
339 | #if ECB_CPP11 |
340 | // older implementations might have problems with decltype(x)::type, work around it |
340 | // older implementations might have problems with decltype(x)::type, work around it |
341 | struct ecb_decltype_t { typedef T type; }; |
341 | template<class T> struct ecb_decltype_t { typedef T type; }; |
342 | #define ecb_decltype(x) ecb_decltype_t<decltype(x)>::type |
342 | #define ecb_decltype(x) ecb_decltype_t<decltype (x)>::type |
343 | #elif ECB_GCC_VERSION(3,0) || ECB_CLANG_VERSION(2,8) |
343 | #elif ECB_GCC_VERSION(3,0) || ECB_CLANG_VERSION(2,8) |
344 | #define ecb_decltype(x) __typeof__ (x) |
344 | #define ecb_decltype(x) __typeof__ (x) |
345 | #endif |
345 | #endif |
346 | |
346 | |
347 | #if _MSC_VER >= 1300 |
347 | #if _MSC_VER >= 1300 |