What macro does Clang define to announce C++11 mode, if any?
GCC defines __GXX_EXPERIMENTAL_CXX0X__
, at least some versions do. MSVC seems to have the support turned on by default at least for _MSC_VER >= 1600
.
You should be able to just compile C++98 code in C++11 mode without problem. <stdint.h> is a C99 header. I don't know what vendor's C standard library you;re using, but if it's the native Microsoft Windows one it doesn't support C99 yet.
In C, the macro is used to define any constant value or any variable with its value in the entire program that will be replaced by this macro name, where macro contains the set of code that will be called when the macro name is used in the program. The macro uses the “#define” directive to define the macro in C programming language.
If no optimization level is specified on the tiarmclang command-line, then tiarmclang defines the __NO_INLINE__ macro symbol to indicate that compilation mode.
Clang uses a non-conformant method of indicating support for various features instead of the standards-sanctioned ways, which means you're going to need to use libc++ for the standard library because other vendor's standard C++ libraries are conformant.
It uses different preprocessor tests for each separate feature, like
#if __has_feature(cxx_decltype)
for testing if decltype
is implemented.
See the complete list here
http://clang.llvm.org/docs/LanguageExtensions.html#checking_upcoming_features
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With