From 2a09d468daa9ed3c038e78e39cc3b8ac3c352cf3 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Wed, 12 Jan 2022 09:42:29 -0800 Subject: [PATCH] Use noexcept unconditionally --- include/fmt/core.h | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 92a7aa1d..08596f5b 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -145,23 +145,9 @@ # endif #endif -// Define FMT_USE_NOEXCEPT to make fmt use noexcept (C++11 feature). -#ifndef FMT_USE_NOEXCEPT -# define FMT_USE_NOEXCEPT 0 -#endif - -#if FMT_USE_NOEXCEPT || FMT_HAS_FEATURE(cxx_noexcept) || \ - FMT_GCC_VERSION >= 408 || FMT_MSC_VER >= 1900 -# define FMT_DETECTED_NOEXCEPT noexcept -# define FMT_HAS_CXX11_NOEXCEPT 1 -#else -# define FMT_DETECTED_NOEXCEPT throw() -# define FMT_HAS_CXX11_NOEXCEPT 0 -#endif - #ifndef FMT_NOEXCEPT -# if FMT_EXCEPTIONS || FMT_HAS_CXX11_NOEXCEPT -# define FMT_NOEXCEPT FMT_DETECTED_NOEXCEPT +# if FMT_EXCEPTIONS +# define FMT_NOEXCEPT noexcept # else # define FMT_NOEXCEPT # endif