Implement compatibility with compilers other than clang

This commit is contained in:
Victor Zverovich 2013-05-15 10:04:11 -07:00
parent 5adb9f7a39
commit 6323d30247

View File

@ -41,10 +41,17 @@
#include <string> #include <string>
#include <sstream> #include <sstream>
// 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). // Define FMT_USE_NOEXCEPT to make format use noexcept (C++11 feature).
#if FMT_USE_NOEXCEPT || \ #if FMT_USE_NOEXCEPT || \
(defined(__has_feature) && __has_feature(cxx_noexcept)) (defined(__has_feature) && __has_feature(cxx_noexcept))
# define FMT_NOEXCEPT(expr) noexcept(expr) # define FMT_NOEXCEPT(expr) noexcept(expr)
#else
# define FMT_NOEXCEPT(expr)
#endif #endif
namespace fmt { namespace fmt {