Skip to content

Commit e84b0f9

Browse files
committed
Add missing clang-cl support
Signed-off-by: Ian <[email protected]>
1 parent 595bb08 commit e84b0f9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/ccmath/internal/support/helpers/fpclassify_helper.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace ccm::support::helpers
2727
{
2828
struct floating_point_defines
2929
{
30-
#if defined(CCMATH_COMPILER_MSVC) // Mirrors the corecrt definitions
30+
#if defined(CCMATH_COMPILER_MSVC) || defined(CCMATH_COMPILER_CLANG_CL) // Mirrors the corecrt definitions
3131
static constexpr int eFP_NAN = 2;
3232
static constexpr int eFP_INFINITE = 1;
3333
static constexpr int eFP_ZERO = 0;

include/ccmath/math/basic/impl/nan_double_impl.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ namespace ccm::internal::impl
2626
{
2727
if constexpr (!std::numeric_limits<double>::is_iec559) { return 0.0; }
2828

29-
#if defined(_MSC_VER) && !defined(__clang__)
30-
// Currently, MSVC always returns a Quiet NaN no matter if a payload is
29+
#if (defined(_MSC_VER) && !defined(__clang__)) || (defined(_MSC_VER) && defined(__clang__))
30+
// Currently, MSVC, along with Clang-cl who mimics msvc, always returns a Quiet NaN no matter if a payload is
3131
// provided or not. This is different from GCC and Clang which do allow payloads to be set.
3232
// So if we detect we are using MSVC without Clang-CL then
3333
// we can just return NaN and not bother doing any extra work.

0 commit comments

Comments
 (0)