forked from fmtlib/fmt
Implement compatibility with compilers other than clang
This commit is contained in:
7
format.h
7
format.h
@@ -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 {
|
||||||
|
Reference in New Issue
Block a user