mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-28 05:09:44 +01:00
Fix compiler warnings
This commit is contained in:
@@ -46,19 +46,30 @@
|
||||
# define FMT_USE_NOEXCEPT 0
|
||||
#endif
|
||||
|
||||
#if FMT_USE_NOEXCEPT || FMT_HAS_FEATURE(cxx_noexcept) || \
|
||||
(FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \
|
||||
FMT_MSC_VER >= 1900
|
||||
# define FMT_DETECTED_NOEXCEPT noexcept
|
||||
#else
|
||||
# define FMT_DETECTED_NOEXCEPT throw()
|
||||
#endif
|
||||
|
||||
#ifndef FMT_NOEXCEPT
|
||||
# if FMT_EXCEPTIONS
|
||||
# if FMT_USE_NOEXCEPT || FMT_HAS_FEATURE(cxx_noexcept) || \
|
||||
FMT_GCC_VERSION >= 408 || FMT_MSC_VER >= 1900
|
||||
# define FMT_NOEXCEPT noexcept
|
||||
# else
|
||||
# define FMT_NOEXCEPT throw()
|
||||
# endif
|
||||
# define FMT_NOEXCEPT FMT_DETECTED_NOEXCEPT
|
||||
# else
|
||||
# define FMT_NOEXCEPT
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// This is needed because GCC still uses throw() in its headers when exceptions
|
||||
// are disabled.
|
||||
#if FMT_GCC_VERSION
|
||||
# define FMT_DTOR_NOEXCEPT FMT_DETECTED_NOEXCEPT
|
||||
#else
|
||||
# define FMT_DTOR_NOEXCEPT FMT_NOEXCEPT
|
||||
#endif
|
||||
|
||||
#if !defined(FMT_HEADER_ONLY) && defined(_WIN32)
|
||||
# ifdef FMT_EXPORT
|
||||
# define FMT_API __declspec(dllexport)
|
||||
|
||||
Reference in New Issue
Block a user