[libcxx-commits] [PATCH] D114281: [libc++] Granularize the <random> header.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 19 13:21:11 PST 2021


Quuxplusone created this revision.
Quuxplusone added reviewers: ldionne, fwolff, libc++.
Quuxplusone added a project: libc++.
Herald added subscribers: arichardson, mgorny.
Quuxplusone requested review of this revision.
Herald added a subscriber: libcxx-commits.
Herald added 1 blocking reviewer(s): libc++.

The only minor functional change here is that I decided to remove `#include <concepts>` from `<random>`, because I don't think anyone has had time to start relying on that detail. But I left all the C++17-and-earlier superfluous headers intact — e.g. `<random>` still exports `<vector>`, because even some of our own tests rely on that.  (I'd be happy to split out the removal of `<concepts>` into its own commit, immediately following the NFC commit.)

I didn't fully investigate the existing `<__random/uniform_int_distribution.h>`. It seems like it'd be possible now to eliminate that file's `__independent_bits_engine` and make it use `std::independent_bits_engine` instead; but that seems like a project for a separate PR.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114281

Files:
  libcxx/include/CMakeLists.txt
  libcxx/include/__random/bernoulli_distribution.h
  libcxx/include/__random/binomial_distribution.h
  libcxx/include/__random/cauchy_distribution.h
  libcxx/include/__random/chi_squared_distribution.h
  libcxx/include/__random/default_random_engine.h
  libcxx/include/__random/discard_block_engine.h
  libcxx/include/__random/discrete_distribution.h
  libcxx/include/__random/exponential_distribution.h
  libcxx/include/__random/extreme_value_distribution.h
  libcxx/include/__random/fisher_f_distribution.h
  libcxx/include/__random/gamma_distribution.h
  libcxx/include/__random/generate_canonical.h
  libcxx/include/__random/geometric_distribution.h
  libcxx/include/__random/independent_bits_engine.h
  libcxx/include/__random/is_seed_sequence.h
  libcxx/include/__random/knuth_b.h
  libcxx/include/__random/linear_congruential_engine.h
  libcxx/include/__random/log2.h
  libcxx/include/__random/lognormal_distribution.h
  libcxx/include/__random/mersenne_twister_engine.h
  libcxx/include/__random/negative_binomial_distribution.h
  libcxx/include/__random/normal_distribution.h
  libcxx/include/__random/piecewise_constant_distribution.h
  libcxx/include/__random/piecewise_linear_distribution.h
  libcxx/include/__random/poisson_distribution.h
  libcxx/include/__random/random_device.h
  libcxx/include/__random/ranlux.h
  libcxx/include/__random/seed_seq.h
  libcxx/include/__random/shuffle_order_engine.h
  libcxx/include/__random/student_t_distribution.h
  libcxx/include/__random/subtract_with_carry_engine.h
  libcxx/include/__random/uniform_int_distribution.h
  libcxx/include/__random/uniform_random_bit_generator.h
  libcxx/include/__random/uniform_real_distribution.h
  libcxx/include/__random/weibull_distribution.h
  libcxx/include/module.modulemap
  libcxx/include/random
  libcxx/test/libcxx/diagnostics/detail.headers/random/bernoulli_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/binomial_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/cauchy_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/chi_squared_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/default_random_engine.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/discard_block_engine.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/discrete_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/exponential_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/extreme_value_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/fisher_f_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/gamma_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/generate_canonical.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/geometric_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/independent_bits_engine.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/is_seed_sequence.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/knuth_b.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/linear_congruential_engine.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/log2.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/lognormal_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/mersenne_twister_engine.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/negative_binomial_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/normal_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/piecewise_constant_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/piecewise_linear_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/poisson_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/random_device.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/ranlux.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/seed_seq.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/shuffle_order_engine.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/student_t_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/subtract_with_carry_engine.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/uniform_random_bit_generator.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/uniform_real_distribution.module.verify.cpp
  libcxx/test/libcxx/diagnostics/detail.headers/random/weibull_distribution.module.verify.cpp
  libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/params.fail.cpp
  libcxx/utils/libcxx/test/dsl.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114281.388609.patch
Type: text/x-patch
Size: 458962 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211119/aab3b86d/attachment-0001.bin>


More information about the libcxx-commits mailing list