[libcxx-commits] [libcxx] [libc++][math] Fix undue overflowing of `std::hypot(x, y, z)` (PR #93350)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jul 5 04:04:18 PDT 2024


================
@@ -9,11 +9,16 @@
 #ifndef _LIBCPP___MATH_HYPOT_H
 #define _LIBCPP___MATH_HYPOT_H
 
+#include <__algorithm/max.h>
 #include <__config>
+#include <__math/abs.h>
+#include <__math/roots.h>
 #include <__type_traits/enable_if.h>
 #include <__type_traits/is_arithmetic.h>
 #include <__type_traits/is_same.h>
 #include <__type_traits/promote.h>
+#include <array>
----------------
philnik777 wrote:

`__utility/pair.h` is quite lean by now I think. It's mostly depending on type traits and (since C++20) concepts. `std::pair` is also used in quite a few public interfaces, so I'm not sure we'd gain much from introducing another `pair`.

https://github.com/llvm/llvm-project/pull/93350


More information about the libcxx-commits mailing list