Fix compilation on GCC when -std=c++11 is not specified.

This commit is contained in:
Victor Zverovich 2013-12-09 17:45:27 -08:00
parent 3d7faaf0bd
commit 8ca31c8473

View File

@ -51,16 +51,19 @@
# define __has_feature(x) 0 # define __has_feature(x) 0
#endif #endif
#define FMT_USE_INITIALIZER_LIST \ #ifndef FMT_USE_INITIALIZER_LIST
# define FMT_USE_INITIALIZER_LIST \
(__has_feature(cxx_generalized_initializers) || \ (__has_feature(cxx_generalized_initializers) || \
FMG_GCC_VERSION >= 404 || _MSC_VER >= 1700) (FMG_GCC_VERSION >= 404 && __cplusplus >= 201103) || _MSC_VER >= 1700)
#endif
#if FMT_USE_INITIALIZER_LIST #if FMT_USE_INITIALIZER_LIST
# include <initializer_list> # include <initializer_list>
#endif #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 || __has_feature(cxx_noexcept) || FMG_GCC_VERSION >= 408 #if FMT_USE_NOEXCEPT || __has_feature(cxx_noexcept) || \
(FMG_GCC_VERSION >= 408 && __cplusplus >= 201103)
# define FMT_NOEXCEPT(expr) noexcept(expr) # define FMT_NOEXCEPT(expr) noexcept(expr)
#else #else
# define FMT_NOEXCEPT(expr) # define FMT_NOEXCEPT(expr)