forked from fmtlib/fmt
Define FMT_NOEXCEPT empty when exceptions are disabled
* Fixes warnings about disabled exception support in MSVC
This commit is contained in:
@@ -150,21 +150,6 @@ typedef __int64 intmax_t;
|
|||||||
# include <utility> // for std::move
|
# include <utility> // for std::move
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Define FMT_USE_NOEXCEPT to make C++ Format use noexcept (C++11 feature).
|
|
||||||
#ifndef FMT_USE_NOEXCEPT
|
|
||||||
# define FMT_USE_NOEXCEPT 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef FMT_NOEXCEPT
|
|
||||||
# if FMT_USE_NOEXCEPT || FMT_HAS_FEATURE(cxx_noexcept) || \
|
|
||||||
(FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \
|
|
||||||
_MSC_VER >= 1900
|
|
||||||
# define FMT_NOEXCEPT noexcept
|
|
||||||
# else
|
|
||||||
# define FMT_NOEXCEPT throw()
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Check if exceptions are disabled.
|
// Check if exceptions are disabled.
|
||||||
#if defined(__GNUC__) && !defined(__EXCEPTIONS)
|
#if defined(__GNUC__) && !defined(__EXCEPTIONS)
|
||||||
# define FMT_EXCEPTIONS 0
|
# define FMT_EXCEPTIONS 0
|
||||||
@@ -184,6 +169,25 @@ typedef __int64 intmax_t;
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Define FMT_USE_NOEXCEPT to make C++ Format use noexcept (C++11 feature).
|
||||||
|
#ifndef FMT_USE_NOEXCEPT
|
||||||
|
# define FMT_USE_NOEXCEPT 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef FMT_NOEXCEPT
|
||||||
|
# if FMT_EXCEPTIONS
|
||||||
|
# if FMT_USE_NOEXCEPT || FMT_HAS_FEATURE(cxx_noexcept) || \
|
||||||
|
(FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \
|
||||||
|
_MSC_VER >= 1900
|
||||||
|
# define FMT_NOEXCEPT noexcept
|
||||||
|
# else
|
||||||
|
# define FMT_NOEXCEPT throw()
|
||||||
|
# endif
|
||||||
|
# else
|
||||||
|
# define FMT_NOEXCEPT
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
// A macro to disallow the copy constructor and operator= functions
|
// A macro to disallow the copy constructor and operator= functions
|
||||||
// This should be used in the private: declarations for a class
|
// This should be used in the private: declarations for a class
|
||||||
#ifndef FMT_USE_DELETED_FUNCTIONS
|
#ifndef FMT_USE_DELETED_FUNCTIONS
|
||||||
|
Reference in New Issue
Block a user