-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FMT_NOEXCEPT should not depend on FMT_EXCEPTIONS #801
Comments
|
@EricWF So the default diff --git i/include/fmt/core.h w/include/fmt/core.h
index 1303f55..5488934 100644
--- i/include/fmt/core.h
+++ w/include/fmt/core.h
@@ -126,12 +126,14 @@
(FMT_GCC_VERSION >= 408 && FMT_HAS_GXX_CXX11) || \
FMT_MSC_VER >= 1900
# define FMT_DETECTED_NOEXCEPT noexcept
+# define FMT_HAS_NOEXCEPT 1
#else
# define FMT_DETECTED_NOEXCEPT throw()
+# define FMT_HAS_NOEXCEPT 0
#endif
#ifndef FMT_NOEXCEPT
-# if FMT_EXCEPTIONS
+# if FMT_EXCEPTIONS || FMT_FMT_HAS_NOEXCEPT
# define FMT_NOEXCEPT FMT_DETECTED_NOEXCEPT
# else
# define FMT_NOEXCEPT |
Could you submit a PR? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As the title suggests,
FMT_NOEXCEPT
should not depend onFMT_EXCEPTIONS
.This will allow
std::is_nothrow_*
traits to detect the actual behavior properly and things likestd::move_if_noexcept
to work the same way in both, normal and-fno-exceptions
builds.The text was updated successfully, but these errors were encountered: