From 6323d30247f9d70b927daf217c6053e4fcb52cfa Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 15 May 2013 10:04:11 -0700 Subject: [PATCH] Implement compatibility with compilers other than clang --- format.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/format.h b/format.h index 3c37fefe..360776b4 100644 --- a/format.h +++ b/format.h @@ -41,10 +41,17 @@ #include #include +// Compatibility with compilers other than clang. +#ifndef __has_feature +# define __has_feature(x) 0 +#endif + // Define FMT_USE_NOEXCEPT to make format use noexcept (C++11 feature). #if FMT_USE_NOEXCEPT || \ (defined(__has_feature) && __has_feature(cxx_noexcept)) # define FMT_NOEXCEPT(expr) noexcept(expr) +#else +# define FMT_NOEXCEPT(expr) #endif namespace fmt {