Control: tags -1 + patch

Hello,

I found a patch from Gentoo that could work:

Description: Fix ODR violation for IsFloatType_v
  constexpr is only implicitly inline for functions or
  static data members, so the two constexpr IsFloatType_v definitions
  here cause an ODR violation. Explicitly mark as inline constexpr.
Author: Sam James <s...@gentoo.org>
Origin: https://codereview.qt-project.org/c/qt/qtbase/+/582403
Bug-Debian: https://bugs.debian.org/1097717
Last-Update: 2025-02-19

diff --git a/src/corelib/global/qcomparehelpers.h 
b/src/corelib/global/qcomparehelpers.h
index dcaa886..c7423c6 100644
--- a/src/corelib/global/qcomparehelpers.h
+++ b/src/corelib/global/qcomparehelpers.h
@@ -561,7 +561,7 @@ constexpr bool IsIntegralType_v = 
std::numeric_limits<std::remove_const_t<T>>::i
                                    && 
std::numeric_limits<std::remove_const_t<T>>::is_integer;
  
  template <typename T>
-constexpr bool IsFloatType_v = std::is_floating_point_v<T>;
+inline constexpr bool IsFloatType_v = std::is_floating_point_v<T>;
  
  #if QFLOAT16_IS_NATIVE
  template <>

Attachment: OpenPGP_signature.asc
Description: PGP signature

Reply via email to