From 6d75a1d965ffcf6f70e090e2fb89bd37ee9ffe79 Mon Sep 17 00:00:00 2001 From: Junekey Jeon Date: Tue, 2 Apr 2024 15:17:31 -0700 Subject: [PATCH] Guard against MSVC only; clang-cl doesn't need to be there --- include/dragonbox/dragonbox.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/dragonbox/dragonbox.h b/include/dragonbox/dragonbox.h index a597eee..4c6d9c6 100644 --- a/include/dragonbox/dragonbox.h +++ b/include/dragonbox/dragonbox.h @@ -1884,7 +1884,9 @@ namespace jkj { using sign_policy = ignore_t; static constexpr bool return_has_sign = false; -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(__clang__) + // See + // https://developercommunity.visualstudio.com/t/Failure-to-optimize-intrinsics/10628226 template static constexpr decimal_fp handle_sign(SignedSignificandBits, decimal_fp r) noexcept {