From a317448bd4e1fb55a102d48a3048172cc955f390 Mon Sep 17 00:00:00 2001 From: Alexej Harm Date: Fri, 13 Jul 2018 14:04:43 +0200 Subject: [PATCH] Keep noexcept specifier when exceptions are disabled. --- include/fmt/core.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index de44556b..4e3a7062 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -122,12 +122,14 @@ #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 +# 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 +# if FMT_EXCEPTIONS || FMT_HAS_CXX11_NOEXCEPT # define FMT_NOEXCEPT FMT_DETECTED_NOEXCEPT # else # define FMT_NOEXCEPT