[libcxx-commits] [libcxx] [libc++] Make all `__random/HEADER.h` depend on `<__math/FOO.h>` instead of `<cmath>` and use `__math::` namespace instead `std::` (PR #213084)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 3 02:18:52 PDT 2026
frederick-vs-ja wrote:
> When I was prototyping `constexpr <random>` paper I have found some of `<random>` functionality depends on system's `math.h` header instead on `__math/FOO.h`. System's are just undefined symbol to be linked, but the `__math/FOO.h` are implemented with builtins. Which for me was surprising as I have marked in my prototype all the builtins and functions `constexpr`, and compiler was still complaining (I have my native float implementation of `<cmath>` for the prototype, so I can test the proposal properly).
>
> I found some of the functionality seems to be using `__math::` namespace and some doesn't, seemingly randomly. I think it's just inconsistency. So this PR is just that.
@hanickadot I rephrased the PR description, which will be used as squashed commit message by default, to make it more suitable for commit message (IMO). Please double check the changes. Feel free to restore some or all of the original PR description.
https://github.com/llvm/llvm-project/pull/213084
More information about the libcxx-commits
mailing list