[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)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jul 31 02:04:57 PDT 2026
Hana =?utf-8?q?Dusíková?= <hanicka at hanicka.net>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/213084 at github.com>
philnik777 wrote:
> @ldionne is it okay to remove to remove:
>
> https://github.com/llvm/llvm-project/blob/21d9869c206e12f1932aecff50d03f06f5a96339/libcxx/test/libcxx/transitive_includes/cxx26.csv#L756
>
> in `libcxx/tests/transitive_includes/cxx??.csv`
>
> ```diff
> random climits
> - random cmath
> random compare
> ```
>
> Not sure what's the process here. I saw you have a special `#ifdef` to add includes for compatibility.
You should add
```c++
# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 23
# include <cmath>
# endif
```
to the bottom of `<random>`.
https://github.com/llvm/llvm-project/pull/213084
More information about the libcxx-commits
mailing list