Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/ImathSetup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ if(CMAKE_CXX_STANDARD)
endif()
set(IMATH_CXX_STANDARD "${tmp}" CACHE STRING "C++ standard to compile against")
set(tmp)
message(STATUS "Building against C++ Standard: ${IMATH_CXX_STANDARD}")

# Namespace-related settings: allows one to customize the namespace
# generated, and to version the namespaces.
Expand Down
19 changes: 18 additions & 1 deletion src/Imath/half.h
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,24 @@ template <> class numeric_limits<IMATH_INTERNAL_NAMESPACE::half>
static constexpr bool has_infinity = true;
static constexpr bool has_quiet_NaN = true;
static constexpr bool has_signaling_NaN = true;
static constexpr float_denorm_style has_denorm = denorm_present;

// C++23 (P2614) deprecates std::float_denorm_style and
// std::denorm_present without a replacement; std::numeric_limits still
// requires has_denorm. Scoped pragmas silence deprecation for this line
// on C++23+ toolchains; they are a no-op for C++17 / C++20.
# if defined(__clang__) || defined(__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
# elif defined(_MSC_VER)
# pragma warning(push)
# pragma warning(disable : 4996)
# endif
static constexpr float_denorm_style has_denorm = denorm_present;
# if defined(__clang__) || defined(__GNUC__)
# pragma GCC diagnostic pop
# elif defined(_MSC_VER)
# pragma warning(pop)
# endif
static constexpr bool has_denorm_loss = false;
static constexpr IMATH_INTERNAL_NAMESPACE::half infinity () IMATH_NOEXCEPT
{
Expand Down
Loading