[libc++] Extract __clamp_to_integral to its own header
In addition to being more consistent with our approach for helpers, this
solves an actual issue where <cmath> was using numeric_limits but never
including the <limits> header directly. In a normal setup, this is not
an issue because the <math.h> header included by <cmath> does include
<limits>. However, I did stumble upon some code where that didn't work,
most likely because they were placing their own <math.h> header in front
of ours. I didn't bother investigating further.
Differential Revision: https://reviews.llvm.org/D115282
NOKEYCHECK=True
GitOrigin-RevId: 81eda008e952e6b46d20b97f7fbfd6f2e69bd3a1
diff --git a/include/module.modulemap b/include/module.modulemap
index ea0a6f8..ae1d2ae 100644
--- a/include/module.modulemap
+++ b/include/module.modulemap
@@ -704,6 +704,7 @@
module binomial_distribution { private header "__random/binomial_distribution.h" }
module cauchy_distribution { private header "__random/cauchy_distribution.h" }
module chi_squared_distribution { private header "__random/chi_squared_distribution.h" }
+ module clamp_to_integral { private header "__random/clamp_to_integral.h" }
module default_random_engine { private header "__random/default_random_engine.h" }
module discard_block_engine { private header "__random/discard_block_engine.h" }
module discrete_distribution { private header "__random/discrete_distribution.h" }