[libcxx-commits] [libcxx] c433135 - [libc++] Remove unused headers from <cmath> (#213114)
via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 31 10:25:27 PDT 2026
Author: Louis Dionne
Date: 2026-07-31T13:25:22-04:00
New Revision: c433135c99fc3306ae93fa8cff9e5c00ad0ece3c
URL: https://github.com/llvm/llvm-project/commit/c433135c99fc3306ae93fa8cff9e5c00ad0ece3c
DIFF: https://github.com/llvm/llvm-project/commit/c433135c99fc3306ae93fa8cff9e5c00ad0ece3c.diff
LOG: [libc++] Remove unused headers from <cmath> (#213114)
I believe these headers were relevant when we actually implemented
functions in `<cmath>`, but they are not anymore. Note that ::hypot in
particular is obtained from <math.h> like all the other math functions.
Co-authored-by: A. Jiang <de34 at live.cn>
Added:
Modified:
libcxx/include/cmath
libcxx/test/std/numerics/complex.number/cases.h
Removed:
################################################################################
diff --git a/libcxx/include/cmath b/libcxx/include/cmath
index 27698a09fd75f..eea89ccdfb339 100644
--- a/libcxx/include/cmath
+++ b/libcxx/include/cmath
@@ -316,15 +316,11 @@ constexpr long double lerp(long double a, long double b, long double t) noexcept
# include <__cxx03/cmath>
#else
# include <__config>
-# include <__math/hypot.h>
# include <__type_traits/enable_if.h>
# include <__type_traits/is_arithmetic.h>
-# include <__type_traits/is_constant_evaluated.h>
# include <__type_traits/is_floating_point.h>
# include <__type_traits/is_same.h>
# include <__type_traits/promote.h>
-# include <__type_traits/remove_cv.h>
-# include <limits>
# include <version>
# include <__math/special_functions.h>
diff --git a/libcxx/test/std/numerics/complex.number/cases.h b/libcxx/test/std/numerics/complex.number/cases.h
index b360e1423ff57..3bcbdb202cf6d 100644
--- a/libcxx/test/std/numerics/complex.number/cases.h
+++ b/libcxx/test/std/numerics/complex.number/cases.h
@@ -14,7 +14,9 @@
#define CASES_H
#include <cassert>
+#include <cmath>
#include <complex>
+#include <limits>
#include <type_traits>
#include "test_macros.h"
More information about the libcxx-commits
mailing list