Open StylishTriangles opened 5 years ago
I'd like to say that there is more than constexpr
. explicit
and noexcept
are also redefined.
#ifndef constexpr
#define constexpr static const
#endif
#ifndef explicit
#define explicit
#endif
#ifndef noexcept
#define noexcept
#endif
I see this library is not really maintained, but let me leave some comments for anyone who finds this and needs to fix it for themselves. #ifdef constexpr
most likely doesn't work, I don't know a compiler that defines this keyword as macros. constexpr
semantics couldn't be expressed in C++ without direct compiler support, it wouldn't make sense anyway.
To properly test for C++11 features, check value of __cplusplus
macro (since noexcept
has no feature test macro associated):
#if __cplusplus < 201103L
#define constexpr const static
#define noexcept
//nothing for explicit, it has been in the language since C++98
#endif
This breaks my build so much. Please don't redeclare C++ keywords like that. https://github.com/tqdm/tqdm.cpp/blob/669d6354a279afd2177d66703d7405722ea627ca/include/tqdm/utils.h#L37