Boost.patch 946 B

1234567891011121314151617181920212223
  1. diff -u ../boost_1_75_0-orig/boost/rational.hpp ./boost/rational.hpp
  2. --- ../boost_1_75_0-orig/boost/rational.hpp 2020-12-03 06:02:19.000000000 +0100
  3. +++ ./boost/rational.hpp 2022-01-27 16:02:27.993848905 +0100
  4. @@ -302,6 +302,9 @@
  5. return *this;
  6. }
  7. template <class T>
  8. + #if defined(__clang__)
  9. + __attribute__((no_sanitize("undefined")))
  10. + #endif
  11. BOOST_CXX14_CONSTEXPR typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator*= (const T& i)
  12. {
  13. // Avoid overflow and preserve normalization
  14. @@ -311,6 +314,9 @@
  15. return *this;
  16. }
  17. template <class T>
  18. + #if defined(__clang__)
  19. + __attribute__((no_sanitize("undefined")))
  20. + #endif
  21. BOOST_CXX14_CONSTEXPR typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator/= (const T& i)
  22. {
  23. // Avoid repeated construction