[libcxx-commits] [libcxx] [libc++][modules] Rewrite the modulemap to have fewer top-level modules (PR #107638)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Mon Sep 16 07:34:33 PDT 2024


https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/107638

>From c2c849fbaae86c54527750819fc8d3b58a09894d Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Wed, 11 Sep 2024 10:25:07 -0400
Subject: [PATCH 1/2] [WIP] Add missing includes

---
 libcxx/include/__algorithm/copy.h             |  2 +
 libcxx/include/__algorithm/copy_backward.h    |  2 +
 libcxx/include/__algorithm/count.h            |  3 +-
 libcxx/include/__algorithm/equal.h            |  2 +-
 libcxx/include/__algorithm/equal_range.h      |  2 +-
 libcxx/include/__algorithm/find.h             |  4 +-
 libcxx/include/__algorithm/find_end.h         |  2 +-
 libcxx/include/__algorithm/fold.h             |  1 +
 libcxx/include/__algorithm/includes.h         |  2 +-
 libcxx/include/__algorithm/inplace_merge.h    |  1 +
 libcxx/include/__algorithm/is_permutation.h   |  4 +-
 .../__algorithm/lexicographical_compare.h     |  1 +
 libcxx/include/__algorithm/lower_bound.h      |  2 +-
 libcxx/include/__algorithm/make_projected.h   |  1 +
 libcxx/include/__algorithm/min_element.h      |  2 +-
 libcxx/include/__algorithm/minmax_element.h   |  2 +-
 libcxx/include/__algorithm/mismatch.h         |  2 +
 libcxx/include/__algorithm/move.h             |  2 +
 libcxx/include/__algorithm/move_backward.h    |  2 +
 .../include/__algorithm/partial_sort_copy.h   |  2 +-
 libcxx/include/__algorithm/partition.h        |  1 +
 libcxx/include/__algorithm/ranges_ends_with.h |  1 +
 libcxx/include/__algorithm/ranges_find_last.h |  1 +
 libcxx/include/__algorithm/ranges_generate.h  |  2 +-
 .../include/__algorithm/ranges_generate_n.h   |  2 +-
 libcxx/include/__algorithm/ranges_partition.h |  1 +
 libcxx/include/__algorithm/search.h           |  2 +-
 libcxx/include/__algorithm/search_n.h         |  3 +-
 libcxx/include/__algorithm/set_difference.h   |  1 -
 libcxx/include/__algorithm/set_intersection.h |  1 +
 libcxx/include/__algorithm/sort.h             |  3 +
 libcxx/include/__algorithm/stable_partition.h |  1 +
 .../uniform_random_bit_generator_adaptor.h    |  2 +-
 libcxx/include/__algorithm/upper_bound.h      |  1 +
 libcxx/include/__atomic/atomic_ref.h          |  1 +
 libcxx/include/__chrono/day.h                 |  2 +-
 libcxx/include/__chrono/formatter.h           |  1 +
 libcxx/include/__chrono/month.h               |  2 +-
 libcxx/include/__chrono/monthday.h            |  2 +-
 libcxx/include/__chrono/ostream.h             |  1 +
 libcxx/include/__chrono/tzdb.h                |  3 +
 libcxx/include/__chrono/tzdb_list.h           |  1 +
 libcxx/include/__chrono/year.h                |  2 +-
 libcxx/include/__chrono/year_month.h          |  2 +-
 libcxx/include/__chrono/year_month_day.h      |  2 +-
 libcxx/include/__chrono/zoned_time.h          |  4 +-
 libcxx/include/__concepts/predicate.h         |  2 +-
 libcxx/include/__expected/expected.h          |  2 +
 libcxx/include/__format/format_arg_store.h    |  1 +
 libcxx/include/__format/write_escaped.h       |  1 +
 libcxx/include/__functional/bind.h            |  2 +-
 libcxx/include/__functional/hash.h            |  1 +
 libcxx/include/__functional/invoke.h          |  1 +
 libcxx/include/__functional/mem_fn.h          |  2 +-
 libcxx/include/__functional/perfect_forward.h |  1 +
 .../include/__functional/reference_wrapper.h  |  2 +-
 .../include/__functional/weak_result_type.h   |  2 +-
 libcxx/include/__hash_table                   |  3 +-
 libcxx/include/__iterator/common_iterator.h   |  1 +
 libcxx/include/__iterator/concepts.h          |  2 +-
 libcxx/include/__iterator/counted_iterator.h  |  2 +-
 .../include/__iterator/ostreambuf_iterator.h  |  5 +-
 libcxx/include/__memory/allocator_traits.h    |  1 +
 libcxx/include/__memory/inout_ptr.h           |  1 +
 libcxx/include/__memory/out_ptr.h             |  1 +
 libcxx/include/__memory/pointer_traits.h      |  1 +
 .../__random/uniform_random_bit_generator.h   |  2 +-
 libcxx/include/__ranges/elements_view.h       |  1 +
 libcxx/include/__ranges/range_adaptor.h       |  2 +
 libcxx/include/__ranges/transform_view.h      |  1 +
 libcxx/include/__string/char_traits.h         |  1 +
 libcxx/include/__thread/jthread.h             |  4 +-
 libcxx/include/__thread/this_thread.h         |  1 +
 libcxx/include/__thread/thread.h              |  1 +
 libcxx/include/__tree                         |  3 +-
 libcxx/include/__type_traits/is_swappable.h   |  1 +
 libcxx/include/algorithm                      |  9 +++
 libcxx/include/array                          |  1 +
 libcxx/include/bitset                         |  1 +
 libcxx/include/deque                          | 13 +++++
 libcxx/include/experimental/iterator          |  2 +
 libcxx/include/fstream                        |  6 +-
 libcxx/include/future                         |  5 ++
 libcxx/include/iomanip                        |  2 +
 libcxx/include/map                            |  7 +++
 libcxx/include/optional                       |  3 +
 libcxx/include/set                            |  9 +++
 libcxx/include/sstream                        |  2 +
 libcxx/include/tuple                          |  5 +-
 libcxx/include/unordered_map                  |  7 +++
 libcxx/include/unordered_set                  |  9 +++
 libcxx/include/variant                        |  8 ++-
 libcxx/include/vector                         | 14 +++++
 .../make.heap/complexity.pass.cpp             |  1 +
 ...obust_against_copying_comparators.pass.cpp |  1 +
 ...obust_against_copying_projections.pass.cpp |  1 +
 ...obust_against_copying_comparators.pass.cpp |  1 +
 ...t_cpp20_hostile_iterators.compile.pass.cpp |  1 +
 .../vector.bool/abi.compile.pass.cpp          |  1 +
 .../sequences/vector/abi.compile.pass.cpp     |  1 +
 .../containers/unord/next_pow2.pass.cpp       |  3 +-
 .../containers/unord/next_prime.pass.cpp      |  1 +
 .../depr.adaptors.cxx1z.pass.cpp              |  1 +
 .../diagnostics/ranges.nodiscard.verify.cpp   |  1 +
 .../cpp20_iter_concepts.pass.cpp              |  5 +-
 .../has_arrow.compile.pass.cpp                |  1 +
 .../basic.string/alignof.compile.pass.cpp     |  1 +
 .../basic.string/sizeof.compile.pass.cpp      |  1 +
 .../test/libcxx/transitive_includes/cxx03.csv | 25 ++++++++
 .../test/libcxx/transitive_includes/cxx11.csv | 25 ++++++++
 .../test/libcxx/transitive_includes/cxx14.csv | 26 +++++++++
 .../test/libcxx/transitive_includes/cxx17.csv | 24 ++++++++
 .../test/libcxx/transitive_includes/cxx20.csv | 24 ++++++++
 .../test/libcxx/transitive_includes/cxx23.csv | 19 ++++++
 .../test/libcxx/transitive_includes/cxx26.csv | 20 ++++++-
 .../format.arg/arg_t.compile.pass.cpp         |  1 +
 .../format.string.std/escaped_output.pass.cpp |  5 +-
 .../func.require/bullet_1_2_3.pass.cpp        |  3 +-
 .../func.require/bullet_4_5_6.pass.cpp        |  3 +-
 .../function_type_default_deleter.verify.cpp  |  1 +
 .../libcxx/utilities/meta/meta_base.pass.cpp  |  1 +
 .../__murmur2_or_cityhash.abi-v1.pass.cpp     |  1 +
 .../random_shuffle_urng.pass.cpp              |  3 +-
 .../mismatch/mismatch.pass.cpp                |  2 +
 .../sort.heap/complexity.pass.cpp             |  1 +
 .../sort.heap/ranges_sort_heap.pass.cpp       |  2 +
 .../alg.merge/inplace_merge_comp.pass.cpp     |  3 +-
 .../alg.sorting/alg.merge/pstl.merge.pass.cpp |  1 +
 .../alg.sort/sort/pstl.sort.pass.cpp          |  1 +
 .../alg.sort/stable.sort/stable_sort.pass.cpp |  1 +
 ...es_robust_against_omitting_invoke.pass.cpp |  2 +
 ...nst_proxy_iterators_lifetime_bugs.pass.cpp |  2 +
 ...robust_re_difference_type.compile.pass.cpp |  1 +
 .../atomics.ref/bitwise_and_assign.pass.cpp   |  1 +
 .../atomics.ref/bitwise_or_assign.pass.cpp    |  1 +
 .../atomics.ref/bitwise_xor_assign.pass.cpp   |  1 +
 .../atomics/atomics.ref/fetch_and.pass.cpp    |  1 +
 .../std/atomics/atomics.ref/fetch_or.pass.cpp |  3 +-
 .../atomics/atomics.ref/fetch_xor.pass.cpp    |  3 +-
 .../atomics.ref/increment_decrement.pass.cpp  |  1 +
 .../atomics.ref/member_types.compile.pass.cpp | 58 ++++++++++---------
 .../atomics.types.float/load.pass.cpp         |  3 +-
 .../cstdint_typedefs.pass.cpp                 |  3 +-
 .../integral_typedefs.pass.cpp                |  1 +
 .../stdatomic.h.syn/types.compile.pass.cpp    |  2 +
 libcxx/test/std/atomics/types.pass.cpp        |  1 +
 .../map.modifiers/insert_or_assign.pass.cpp   |  1 +
 .../map/map.modifiers/try.emplace.pass.cpp    |  1 +
 .../multiset/multiset.cons/copy.pass.cpp      |  1 +
 .../multiset.cons/copy_alloc.pass.cpp         |  1 +
 .../multiset.cons/copy_assign.pass.cpp        |  1 +
 .../initializer_list_compare.pass.cpp         |  2 +
 .../initializer_list_compare_alloc.pass.cpp   |  2 +
 .../associative/set/set.cons/copy.pass.cpp    |  1 +
 .../set/set.cons/copy_alloc.pass.cpp          |  1 +
 .../set/set.cons/copy_assign.pass.cpp         |  1 +
 .../initializer_list_compare.pass.cpp         |  2 +
 .../initializer_list_compare_alloc.pass.cpp   |  2 +
 .../priqueue.cons/dtor_noexcept.pass.cpp      |  1 +
 .../queue/queue.cons/dtor_noexcept.pass.cpp   |  1 +
 .../stack/stack.cons/dtor_noexcept.pass.cpp   |  1 +
 .../mdspan/layout_left/properties.pass.cpp    |  1 +
 .../mdspan/layout_right/properties.pass.cpp   |  1 +
 .../mdspan/layout_stride/deduction.pass.cpp   |  1 +
 .../std/depr/depr.c.headers/math_h.pass.cpp   |  2 +-
 .../std/depr/depr.c.headers/stdlib_h.pass.cpp |  3 +-
 .../syserr/syserr.hash/error_code.pass.cpp    | 13 ++---
 .../syserr.hash/error_condition.pass.cpp      | 13 ++---
 .../memory/memory.observer.ptr/hash.pass.cpp  |  1 +
 .../reference_arith_operators.pass.cpp        |  4 +-
 .../reference_bitwise_operators.pass.cpp      |  4 +-
 .../move_assign.pass.cpp                      |  4 +-
 .../move_assign_convertible.pass.cpp          |  4 +-
 ...ssign_convertible_propagate_const.pass.cpp |  4 +-
 ...ertible_propagate_const.move_ctor.pass.cpp |  4 +-
 .../propagate_const.ctors/move_ctor.pass.cpp  |  4 +-
 .../propagate_const.nonmembers/hash.pass.cpp  |  5 +-
 .../equal_to.pass.cpp                         |  4 +-
 .../greater.pass.cpp                          |  4 +-
 .../greater_equal.pass.cpp                    |  4 +-
 .../less.pass.cpp                             |  4 +-
 .../less_equal.pass.cpp                       |  4 +-
 .../not_equal_to.pass.cpp                     |  4 +-
 .../propagate_const.relops/equal.pass.cpp     |  4 +-
 .../propagate_const.relops/not_equal.pass.cpp |  4 +-
 .../iterator.basic/iterator.pass.cpp          |  1 +
 .../iterator.traits/const_pointer.pass.cpp    |  1 +
 .../const_volatile_pointer.pass.cpp           |  1 +
 .../iterator.traits/pointer.pass.cpp          |  1 +
 .../iterator.traits/volatile_pointer.pass.cpp |  1 +
 .../incrementable_traits.compile.pass.cpp     |  1 +
 .../sentinel_for.compile.pass.cpp             |  1 +
 .../reverse.iter.cmp/sfinae.compile.pass.cpp  |  1 +
 .../three_way_comparable.compile.pass.cpp     |  1 +
 ...three_way_comparable_with.compile.pass.cpp |  1 +
 .../coroutine.handle.con/assign.pass.cpp      |  3 +-
 .../coroutine.handle.con/construct.pass.cpp   |  3 +-
 .../destroying_delete_t_declaration.pass.cpp  |  2 +
 .../support.runtime/cstdlib.pass.cpp          |  3 +-
 .../support.types/nullptr_t.pass.cpp          |  3 +-
 .../niebloid.compile.pass.cpp                 |  2 +
 .../conversions.string/ctor_codecvt.pass.cpp  |  3 +-
 .../test/std/numerics/c.math/cmath.pass.cpp   |  5 +-
 .../rand.adapt.disc/result_type.pass.cpp      |  1 +
 .../rand.dist.bern.bernoulli/eval.pass.cpp    |  5 +-
 .../eval_param.pass.cpp                       |  5 +-
 .../rand.dist.bern.bin/eval.PR44847.pass.cpp  |  5 +-
 .../rand.dist.bern.bin/eval.pass.cpp          |  1 +
 .../rand.dist.bern.bin/eval_param.pass.cpp    |  3 +-
 .../rand.dist.bern.geo/eval.pass.cpp          |  3 +-
 .../rand.dist.bern.geo/eval_param.pass.cpp    |  3 +-
 .../rand.dist.bern.negbin/eval.pass.cpp       |  3 +-
 .../rand.dist.bern.negbin/eval_param.pass.cpp |  3 +-
 .../rand.dist.norm.chisq/eval.pass.cpp        |  5 +-
 .../rand.dist.norm.chisq/eval_param.pass.cpp  |  5 +-
 .../rand.dist.norm.lognormal/eval.pass.cpp    |  3 +-
 .../eval_param.pass.cpp                       |  3 +-
 .../rand.dist.norm.normal/eval.pass.cpp       |  5 +-
 .../rand.dist.norm.normal/eval_param.pass.cpp |  5 +-
 .../rand.dist.norm.t/eval.pass.cpp            |  3 +-
 .../rand.dist.norm.t/eval_param.pass.cpp      |  3 +-
 .../rand.dist.pois.exp/eval.pass.cpp          |  5 +-
 .../rand.dist.pois.exp/eval_param.pass.cpp    |  5 +-
 .../rand.dist.pois.extreme/eval.pass.cpp      |  3 +-
 .../eval_param.pass.cpp                       |  3 +-
 .../rand.dist.pois.gamma/eval.pass.cpp        |  3 +-
 .../rand.dist.pois.gamma/eval_param.pass.cpp  |  3 +-
 .../eval_param.pass.cpp                       |  3 +-
 .../rand.dist.pois.weibull/eval.pass.cpp      |  5 +-
 .../eval_param.pass.cpp                       |  5 +-
 .../rand.dist.samp.pconst/eval.pass.cpp       |  7 ++-
 .../rand.dist.samp.pconst/eval_param.pass.cpp |  7 ++-
 .../rand.dist.samp.plinear/eval.pass.cpp      |  7 ++-
 .../eval_param.pass.cpp                       |  7 ++-
 .../rand.dist.uni.int/eval.pass.cpp           |  3 +-
 .../rand.dist.uni.int/eval_param.pass.cpp     |  5 +-
 .../rand.dist.uni.real/eval.pass.cpp          |  5 +-
 .../rand.dist.uni.real/eval_param.pass.cpp    |  5 +-
 .../rand.eng/rand.eng.lcong/copy.pass.cpp     |  1 +
 .../rand.eng/rand.eng.lcong/default.pass.cpp  |  1 +
 .../rand.eng/rand.eng.lcong/values.pass.cpp   |  3 +-
 .../rand.eng.mers/result_type.pass.cpp        |  1 +
 .../rand.eng.sub/result_type.pass.cpp         |  1 +
 .../generate.mandates.verify.cpp              |  1 +
 .../rand.util.seedseq/types.pass.cpp          |  1 +
 .../wait_for_token_pred.pass.cpp              |  1 +
 .../wait_token_pred.pass.cpp                  |  1 +
 .../wait_until_token_pred.pass.cpp            |  1 +
 .../thread.jthread/cons.func.token.pass.cpp   |  1 +
 .../stopcallback/dtor.pass.cpp                |  1 +
 .../time.cal.day.members/decrement.pass.cpp   |  3 +-
 .../time.cal.day.members/increment.pass.cpp   |  3 +-
 .../time.cal.day.members/ok.pass.cpp          |  3 +-
 .../plus_minus_equal.pass.cpp                 |  3 +-
 .../time.cal.day.nonmembers/minus.pass.cpp    |  3 +-
 .../time.cal.day.nonmembers/plus.pass.cpp     |  3 +-
 .../time.cal.md.members/day.pass.cpp          |  3 +-
 .../time.cal.md.members/month.pass.cpp        |  3 +-
 .../time.cal.md.members/ok.pass.cpp           |  3 +-
 .../time.cal/time.cal.mdlast/month.pass.cpp   |  3 +-
 .../time/time.cal/time.cal.mdlast/ok.pass.cpp |  3 +-
 .../time.cal.month.members/decrement.pass.cpp |  3 +-
 .../time.cal.month.members/increment.pass.cpp |  3 +-
 .../time.cal.month.members/ok.pass.cpp        |  3 +-
 .../plus_minus_equal.pass.cpp                 |  3 +-
 .../time.cal.month.nonmembers/minus.pass.cpp  |  3 +-
 .../time.cal.month.nonmembers/plus.pass.cpp   |  3 +-
 .../time.cal.mwd.members/month.pass.cpp       |  3 +-
 .../time.cal.mwd.members/ok.pass.cpp          |  3 +-
 .../weekday_indexed.pass.cpp                  |  3 +-
 .../time.cal.mwdlast.members/month.pass.cpp   |  3 +-
 .../time.cal.mwdlast.members/ok.pass.cpp      |  3 +-
 .../weekday_last.pass.cpp                     |  3 +-
 .../time.cal.wdidx.members/index.pass.cpp     |  3 +-
 .../time.cal.wdidx.members/ok.pass.cpp        |  3 +-
 .../time.cal.wdidx.members/weekday.pass.cpp   |  3 +-
 .../time.cal.wdlast.members/ok.pass.cpp       |  3 +-
 .../time.cal.wdlast.members/weekday.pass.cpp  |  3 +-
 .../c_encoding.pass.cpp                       |  3 +-
 .../ctor.local_days.pass.cpp                  |  3 +-
 .../ctor.sys_days.pass.cpp                    |  3 +-
 .../decrement.pass.cpp                        |  3 +-
 .../increment.pass.cpp                        |  3 +-
 .../iso_encoding.pass.cpp                     |  3 +-
 .../time.cal.weekday.members/ok.pass.cpp      |  3 +-
 .../operator[].pass.cpp                       |  3 +-
 .../plus_minus_equal.pass.cpp                 |  3 +-
 .../minus.pass.cpp                            |  3 +-
 .../time.cal.weekday.nonmembers/plus.pass.cpp |  3 +-
 .../time.cal.year.members/decrement.pass.cpp  |  3 +-
 .../time.cal.year.members/increment.pass.cpp  |  3 +-
 .../time.cal.year.members/ok.pass.cpp         |  3 +-
 .../time.cal.year.members/plus_minus.pass.cpp |  3 +-
 .../plus_minus_equal.pass.cpp                 |  3 +-
 .../time.cal.year.nonmembers/minus.pass.cpp   |  3 +-
 .../time.cal.year.nonmembers/plus.pass.cpp    |  3 +-
 .../time.cal.ym.members/month.pass.cpp        |  3 +-
 .../time.cal.ym.members/ok.pass.cpp           |  3 +-
 .../plus_minus_equal_month.pass.cpp           |  3 +-
 .../plus_minus_equal_year.pass.cpp            |  3 +-
 .../time.cal.ym.members/year.pass.cpp         |  3 +-
 .../time.cal.ym.nonmembers/minus.pass.cpp     |  3 +-
 .../time.cal.ym.nonmembers/plus.pass.cpp      |  3 +-
 .../ctor.local_days.pass.cpp                  |  3 +-
 .../ctor.sys_days.pass.cpp                    |  3 +-
 .../ctor.year_month_day_last.pass.cpp         |  3 +-
 .../time.cal.ymd.members/day.pass.cpp         |  3 +-
 .../time.cal.ymd.members/month.pass.cpp       |  3 +-
 .../time.cal.ymd.members/ok.pass.cpp          |  3 +-
 .../op.local_days.pass.cpp                    |  3 +-
 .../time.cal.ymd.members/op.sys_days.pass.cpp |  3 +-
 .../plus_minus_equal_month.pass.cpp           |  3 +-
 .../plus_minus_equal_year.pass.cpp            |  3 +-
 .../time.cal.ymd.members/year.pass.cpp        |  3 +-
 .../time.cal.ymd.nonmembers/minus.pass.cpp    |  3 +-
 .../time.cal.ymd.nonmembers/plus.pass.cpp     |  3 +-
 .../time.cal.ymdlast.members/day.pass.cpp     |  3 +-
 .../time.cal.ymdlast.members/month.pass.cpp   |  3 +-
 .../month_day_last.pass.cpp                   |  3 +-
 .../time.cal.ymdlast.members/ok.pass.cpp      |  3 +-
 .../op_local_days.pass.cpp                    |  3 +-
 .../op_sys_days.pass.cpp                      |  3 +-
 .../plus_minus_equal_month.pass.cpp           |  3 +-
 .../plus_minus_equal_year.pass.cpp            |  3 +-
 .../time.cal.ymdlast.members/year.pass.cpp    |  3 +-
 .../minus.pass.cpp                            |  3 +-
 .../time.cal.ymdlast.nonmembers/plus.pass.cpp |  3 +-
 .../ctor.local_days.pass.cpp                  |  3 +-
 .../ctor.sys_days.pass.cpp                    |  3 +-
 .../time.cal.ymwd.members/index.pass.cpp      |  3 +-
 .../time.cal.ymwd.members/month.pass.cpp      |  3 +-
 .../time.cal.ymwd.members/ok.pass.cpp         |  3 +-
 .../op.local_days.pass.cpp                    |  3 +-
 .../op.sys_days.pass.cpp                      |  3 +-
 .../plus_minus_equal_month.pass.cpp           |  3 +-
 .../plus_minus_equal_year.pass.cpp            |  3 +-
 .../time.cal.ymwd.members/weekday.pass.cpp    |  3 +-
 .../weekday_indexed.pass.cpp                  |  3 +-
 .../time.cal.ymwd.members/year.pass.cpp       |  3 +-
 .../time.cal.ymwd.nonmembers/minus.pass.cpp   |  3 +-
 .../time.cal.ymwd.nonmembers/plus.pass.cpp    |  3 +-
 .../time.cal.ymwdlast.members/month.pass.cpp  |  3 +-
 .../time.cal.ymwdlast.members/ok.pass.cpp     |  3 +-
 .../op_local_days.pass.cpp                    |  3 +-
 .../op_sys_days.pass.cpp                      |  3 +-
 .../plus_minus_equal_month.pass.cpp           |  3 +-
 .../plus_minus_equal_year.pass.cpp            |  3 +-
 .../weekday.pass.cpp                          |  3 +-
 .../time.cal.ymwdlast.members/year.pass.cpp   |  3 +-
 .../minus.pass.cpp                            |  3 +-
 .../plus.pass.cpp                             |  3 +-
 .../time.zone.db.access/current_zone.pass.cpp |  5 +-
 .../remote_version.pass.cpp                   |  2 +-
 .../types.pass.cpp                            |  1 +
 .../time.zone.leap/members/date.pass.cpp      |  1 +
 .../const_time_zone_default_zone.pass.cpp     |  1 +
 .../const_time_zone_locate_zone.pass.cpp      |  1 +
 .../utilities/charconv/charconv.msvc/test.hpp |  2 +-
 .../charconv.syn/from_chars_result.pass.cpp   |  1 +
 .../charconv.syn/to_chars_result.pass.cpp     |  1 +
 .../formatter.pointer.pass.cpp                |  3 +-
 .../formatter.signed_integral.pass.cpp        |  1 +
 .../escaped_output.unicode.pass.cpp           |  1 +
 .../format_to.locale.pass.cpp                 |  1 +
 .../format_to_n.locale.pass.cpp               |  1 +
 .../formatted_size.locale.pass.cpp            |  1 +
 .../is_bind_expression.pass.cpp               |  2 +
 .../func.bind.isplace/is_placeholder.pass.cpp |  2 +
 .../function.objects/unord.hash/enum.pass.cpp |  8 ++-
 .../unord.hash/integral.pass.cpp              |  3 +-
 .../difference_type.pass.cpp                  |  1 +
 .../allocator.traits.types/size_type.pass.cpp |  1 +
 .../difference_type.compile.pass.cpp          |  1 +
 .../util.smartptr.shared/types.pass.cpp       |  1 +
 .../reset_pointer.pass.cpp                    |  1 +
 .../meta.trans.other/underlying_type.pass.cpp |  1 +
 .../meta.unary.comp/is_bounded_array.pass.cpp |  1 +
 .../is_unbounded_array.pass.cpp               |  1 +
 .../meta.unary.prop/is_signed.pass.cpp        |  2 +
 .../meta.unary.prop/is_unsigned.pass.cpp      |  2 +
 .../bitset.cons/char_ptr_ctor.pass.cpp        |  3 +-
 .../tuple.apply/make_from_tuple.pass.cpp      | 13 +++--
 .../default_type.compile.pass.cpp             |  1 +
 .../special_member_generation_test.pass.cpp   |  1 +
 .../cmp_greater_equal.pass.cpp                |  3 +-
 libcxx/test/support/format.functions.common.h |  3 +-
 libcxx/test/support/hexfloat.h                |  3 +-
 libcxx/test/support/operator_hijacker.h       |  3 +-
 .../c1xx_broken_za_ctor_check.pass.cpp        |  1 +
 libcxx/test/support/test_convertible.h        |  2 +-
 390 files changed, 937 insertions(+), 298 deletions(-)

diff --git a/libcxx/include/__algorithm/copy.h b/libcxx/include/__algorithm/copy.h
index 0890b895f54092..7ae47514d6d27f 100644
--- a/libcxx/include/__algorithm/copy.h
+++ b/libcxx/include/__algorithm/copy.h
@@ -14,8 +14,10 @@
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/min.h>
 #include <__config>
+#include <__iterator/iterator_traits.h>
 #include <__iterator/segmented_iterator.h>
 #include <__type_traits/common_type.h>
+#include <__type_traits/enable_if.h>
 #include <__utility/move.h>
 #include <__utility/pair.h>
 
diff --git a/libcxx/include/__algorithm/copy_backward.h b/libcxx/include/__algorithm/copy_backward.h
index 73dc846a975a44..48a768f577f553 100644
--- a/libcxx/include/__algorithm/copy_backward.h
+++ b/libcxx/include/__algorithm/copy_backward.h
@@ -13,8 +13,10 @@
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/min.h>
 #include <__config>
+#include <__iterator/iterator_traits.h>
 #include <__iterator/segmented_iterator.h>
 #include <__type_traits/common_type.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_constructible.h>
 #include <__utility/move.h>
 #include <__utility/pair.h>
diff --git a/libcxx/include/__algorithm/count.h b/libcxx/include/__algorithm/count.h
index b3489a48c1f160..6910b4f43e9934 100644
--- a/libcxx/include/__algorithm/count.h
+++ b/libcxx/include/__algorithm/count.h
@@ -16,9 +16,10 @@
 #include <__bit/popcount.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__fwd/bit_reference.h>
 #include <__iterator/iterator_traits.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/invoke.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
diff --git a/libcxx/include/__algorithm/equal.h b/libcxx/include/__algorithm/equal.h
index 23ff0641241949..cd8b0673e7a430 100644
--- a/libcxx/include/__algorithm/equal.h
+++ b/libcxx/include/__algorithm/equal.h
@@ -14,12 +14,12 @@
 #include <__algorithm/unwrap_iter.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__iterator/distance.h>
 #include <__iterator/iterator_traits.h>
 #include <__string/constexpr_c_functions.h>
 #include <__type_traits/desugars_to.h>
 #include <__type_traits/enable_if.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_constant_evaluated.h>
 #include <__type_traits/is_equality_comparable.h>
 #include <__type_traits/is_volatile.h>
diff --git a/libcxx/include/__algorithm/equal_range.h b/libcxx/include/__algorithm/equal_range.h
index 28c37cdb24b5c9..4e74ad20aa412d 100644
--- a/libcxx/include/__algorithm/equal_range.h
+++ b/libcxx/include/__algorithm/equal_range.h
@@ -17,11 +17,11 @@
 #include <__algorithm/upper_bound.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__iterator/advance.h>
 #include <__iterator/distance.h>
 #include <__iterator/iterator_traits.h>
 #include <__iterator/next.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_callable.h>
 #include <__type_traits/is_constructible.h>
 #include <__utility/move.h>
diff --git a/libcxx/include/__algorithm/find.h b/libcxx/include/__algorithm/find.h
index 3ab4ab8064183a..6f23ec3f6fc69d 100644
--- a/libcxx/include/__algorithm/find.h
+++ b/libcxx/include/__algorithm/find.h
@@ -17,10 +17,12 @@
 #include <__bit/invert_if.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__fwd/bit_reference.h>
 #include <__iterator/segmented_iterator.h>
 #include <__string/constexpr_c_functions.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/invoke.h>
+#include <__type_traits/is_equality_comparable.h>
 #include <__type_traits/is_integral.h>
 #include <__type_traits/is_same.h>
 #include <__type_traits/is_signed.h>
diff --git a/libcxx/include/__algorithm/find_end.h b/libcxx/include/__algorithm/find_end.h
index 68a9da75ed8642..08d1a295f8e5c0 100644
--- a/libcxx/include/__algorithm/find_end.h
+++ b/libcxx/include/__algorithm/find_end.h
@@ -15,11 +15,11 @@
 #include <__algorithm/search.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__iterator/advance.h>
 #include <__iterator/iterator_traits.h>
 #include <__iterator/next.h>
 #include <__iterator/reverse_iterator.h>
+#include <__type_traits/invoke.h>
 #include <__utility/pair.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__algorithm/fold.h b/libcxx/include/__algorithm/fold.h
index 255658f5232499..1bcb3be9aadabe 100644
--- a/libcxx/include/__algorithm/fold.h
+++ b/libcxx/include/__algorithm/fold.h
@@ -11,6 +11,7 @@
 #define _LIBCPP___ALGORITHM_FOLD_H
 
 #include <__concepts/assignable.h>
+#include <__concepts/constructible.h>
 #include <__concepts/convertible_to.h>
 #include <__concepts/invocable.h>
 #include <__concepts/movable.h>
diff --git a/libcxx/include/__algorithm/includes.h b/libcxx/include/__algorithm/includes.h
index 47b19d408d3a8e..a86102fc6d4a57 100644
--- a/libcxx/include/__algorithm/includes.h
+++ b/libcxx/include/__algorithm/includes.h
@@ -13,8 +13,8 @@
 #include <__algorithm/comp_ref_type.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__iterator/iterator_traits.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_callable.h>
 #include <__utility/move.h>
 
diff --git a/libcxx/include/__algorithm/inplace_merge.h b/libcxx/include/__algorithm/inplace_merge.h
index a6bcc66a2fa47a..faae3e2386732c 100644
--- a/libcxx/include/__algorithm/inplace_merge.h
+++ b/libcxx/include/__algorithm/inplace_merge.h
@@ -26,6 +26,7 @@
 #include <__memory/destruct_n.h>
 #include <__memory/temporary_buffer.h>
 #include <__memory/unique_ptr.h>
+#include <__utility/move.h>
 #include <__utility/pair.h>
 #include <new>
 
diff --git a/libcxx/include/__algorithm/is_permutation.h b/libcxx/include/__algorithm/is_permutation.h
index b7949a5628a388..8753e9fc13f2db 100644
--- a/libcxx/include/__algorithm/is_permutation.h
+++ b/libcxx/include/__algorithm/is_permutation.h
@@ -14,12 +14,14 @@
 #include <__algorithm/iterator_operations.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__iterator/concepts.h>
 #include <__iterator/distance.h>
 #include <__iterator/iterator_traits.h>
 #include <__iterator/next.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_callable.h>
+#include <__type_traits/is_same.h>
 #include <__utility/move.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__algorithm/lexicographical_compare.h b/libcxx/include/__algorithm/lexicographical_compare.h
index 8ea7c177b76033..1de3ca13e1b45c 100644
--- a/libcxx/include/__algorithm/lexicographical_compare.h
+++ b/libcxx/include/__algorithm/lexicographical_compare.h
@@ -19,6 +19,7 @@
 #include <__iterator/iterator_traits.h>
 #include <__string/constexpr_c_functions.h>
 #include <__type_traits/desugars_to.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/invoke.h>
 #include <__type_traits/is_equality_comparable.h>
 #include <__type_traits/is_integral.h>
diff --git a/libcxx/include/__algorithm/lower_bound.h b/libcxx/include/__algorithm/lower_bound.h
index 54a64beff97a63..2144ba962966ee 100644
--- a/libcxx/include/__algorithm/lower_bound.h
+++ b/libcxx/include/__algorithm/lower_bound.h
@@ -14,10 +14,10 @@
 #include <__algorithm/iterator_operations.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__iterator/advance.h>
 #include <__iterator/distance.h>
 #include <__iterator/iterator_traits.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_callable.h>
 #include <__type_traits/remove_reference.h>
 
diff --git a/libcxx/include/__algorithm/make_projected.h b/libcxx/include/__algorithm/make_projected.h
index 5245e523f3df21..22cceb4cb2fb85 100644
--- a/libcxx/include/__algorithm/make_projected.h
+++ b/libcxx/include/__algorithm/make_projected.h
@@ -16,6 +16,7 @@
 #include <__type_traits/decay.h>
 #include <__type_traits/enable_if.h>
 #include <__type_traits/integral_constant.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_member_pointer.h>
 #include <__type_traits/is_same.h>
 #include <__utility/declval.h>
diff --git a/libcxx/include/__algorithm/min_element.h b/libcxx/include/__algorithm/min_element.h
index f40b24a0e85a8e..db996365bf1de1 100644
--- a/libcxx/include/__algorithm/min_element.h
+++ b/libcxx/include/__algorithm/min_element.h
@@ -13,8 +13,8 @@
 #include <__algorithm/comp_ref_type.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__iterator/iterator_traits.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_callable.h>
 #include <__utility/move.h>
 
diff --git a/libcxx/include/__algorithm/minmax_element.h b/libcxx/include/__algorithm/minmax_element.h
index 47e3a68edf2989..dc0c3a818cd579 100644
--- a/libcxx/include/__algorithm/minmax_element.h
+++ b/libcxx/include/__algorithm/minmax_element.h
@@ -12,8 +12,8 @@
 #include <__algorithm/comp.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__iterator/iterator_traits.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_callable.h>
 #include <__utility/pair.h>
 
diff --git a/libcxx/include/__algorithm/mismatch.h b/libcxx/include/__algorithm/mismatch.h
index 0fae7f6e3fe323..cb83347584b1a5 100644
--- a/libcxx/include/__algorithm/mismatch.h
+++ b/libcxx/include/__algorithm/mismatch.h
@@ -17,7 +17,9 @@
 #include <__config>
 #include <__functional/identity.h>
 #include <__iterator/aliasing_iterator.h>
+#include <__iterator/iterator_traits.h>
 #include <__type_traits/desugars_to.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/invoke.h>
 #include <__type_traits/is_constant_evaluated.h>
 #include <__type_traits/is_equality_comparable.h>
diff --git a/libcxx/include/__algorithm/move.h b/libcxx/include/__algorithm/move.h
index 1716d43e2a613d..005099dcac06e3 100644
--- a/libcxx/include/__algorithm/move.h
+++ b/libcxx/include/__algorithm/move.h
@@ -14,8 +14,10 @@
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/min.h>
 #include <__config>
+#include <__iterator/iterator_traits.h>
 #include <__iterator/segmented_iterator.h>
 #include <__type_traits/common_type.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_constructible.h>
 #include <__utility/move.h>
 #include <__utility/pair.h>
diff --git a/libcxx/include/__algorithm/move_backward.h b/libcxx/include/__algorithm/move_backward.h
index 4beb7bdbaac0d0..24a8d9b24527a7 100644
--- a/libcxx/include/__algorithm/move_backward.h
+++ b/libcxx/include/__algorithm/move_backward.h
@@ -13,8 +13,10 @@
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/min.h>
 #include <__config>
+#include <__iterator/iterator_traits.h>
 #include <__iterator/segmented_iterator.h>
 #include <__type_traits/common_type.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_constructible.h>
 #include <__utility/move.h>
 #include <__utility/pair.h>
diff --git a/libcxx/include/__algorithm/partial_sort_copy.h b/libcxx/include/__algorithm/partial_sort_copy.h
index 6d44b4f8f928a4..172f53b290d548 100644
--- a/libcxx/include/__algorithm/partial_sort_copy.h
+++ b/libcxx/include/__algorithm/partial_sort_copy.h
@@ -18,8 +18,8 @@
 #include <__algorithm/sort_heap.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__iterator/iterator_traits.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_callable.h>
 #include <__utility/move.h>
 #include <__utility/pair.h>
diff --git a/libcxx/include/__algorithm/partition.h b/libcxx/include/__algorithm/partition.h
index bd0dccfaf92abe..669aac3b275557 100644
--- a/libcxx/include/__algorithm/partition.h
+++ b/libcxx/include/__algorithm/partition.h
@@ -12,6 +12,7 @@
 #include <__algorithm/iterator_operations.h>
 #include <__config>
 #include <__iterator/iterator_traits.h>
+#include <__type_traits/remove_cvref.h>
 #include <__utility/move.h>
 #include <__utility/pair.h>
 
diff --git a/libcxx/include/__algorithm/ranges_ends_with.h b/libcxx/include/__algorithm/ranges_ends_with.h
index df7fad0bfc70bd..3621bda3891236 100644
--- a/libcxx/include/__algorithm/ranges_ends_with.h
+++ b/libcxx/include/__algorithm/ranges_ends_with.h
@@ -22,6 +22,7 @@
 #include <__iterator/reverse_iterator.h>
 #include <__ranges/access.h>
 #include <__ranges/concepts.h>
+#include <__ranges/size.h>
 #include <__utility/move.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__algorithm/ranges_find_last.h b/libcxx/include/__algorithm/ranges_find_last.h
index 838dd44e5d1072..e7dae1704c2ea6 100644
--- a/libcxx/include/__algorithm/ranges_find_last.h
+++ b/libcxx/include/__algorithm/ranges_find_last.h
@@ -21,6 +21,7 @@
 #include <__ranges/access.h>
 #include <__ranges/concepts.h>
 #include <__ranges/subrange.h>
+#include <__utility/forward.h>
 #include <__utility/move.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__algorithm/ranges_generate.h b/libcxx/include/__algorithm/ranges_generate.h
index b94611d18263a8..04333b358eed26 100644
--- a/libcxx/include/__algorithm/ranges_generate.h
+++ b/libcxx/include/__algorithm/ranges_generate.h
@@ -12,12 +12,12 @@
 #include <__concepts/constructible.h>
 #include <__concepts/invocable.h>
 #include <__config>
-#include <__functional/invoke.h>
 #include <__iterator/concepts.h>
 #include <__iterator/iterator_traits.h>
 #include <__ranges/access.h>
 #include <__ranges/concepts.h>
 #include <__ranges/dangling.h>
+#include <__type_traits/invoke.h>
 #include <__utility/move.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__algorithm/ranges_generate_n.h b/libcxx/include/__algorithm/ranges_generate_n.h
index 702e9a949cb45b..a318994d0eaf8b 100644
--- a/libcxx/include/__algorithm/ranges_generate_n.h
+++ b/libcxx/include/__algorithm/ranges_generate_n.h
@@ -13,12 +13,12 @@
 #include <__concepts/invocable.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__iterator/concepts.h>
 #include <__iterator/incrementable_traits.h>
 #include <__iterator/iterator_traits.h>
 #include <__ranges/access.h>
 #include <__ranges/concepts.h>
+#include <__type_traits/invoke.h>
 #include <__utility/move.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__algorithm/ranges_partition.h b/libcxx/include/__algorithm/ranges_partition.h
index 7058cb0c396968..b9cc3c18937091 100644
--- a/libcxx/include/__algorithm/ranges_partition.h
+++ b/libcxx/include/__algorithm/ranges_partition.h
@@ -24,6 +24,7 @@
 #include <__ranges/access.h>
 #include <__ranges/concepts.h>
 #include <__ranges/subrange.h>
+#include <__type_traits/remove_cvref.h>
 #include <__utility/forward.h>
 #include <__utility/move.h>
 #include <__utility/pair.h>
diff --git a/libcxx/include/__algorithm/search.h b/libcxx/include/__algorithm/search.h
index 24dec22df751e3..161fd39d861a63 100644
--- a/libcxx/include/__algorithm/search.h
+++ b/libcxx/include/__algorithm/search.h
@@ -14,11 +14,11 @@
 #include <__algorithm/iterator_operations.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__iterator/advance.h>
 #include <__iterator/concepts.h>
 #include <__iterator/iterator_traits.h>
 #include <__type_traits/enable_if.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_callable.h>
 #include <__utility/pair.h>
 
diff --git a/libcxx/include/__algorithm/search_n.h b/libcxx/include/__algorithm/search_n.h
index 4019dfb5d8fde5..38474e1b2379dd 100644
--- a/libcxx/include/__algorithm/search_n.h
+++ b/libcxx/include/__algorithm/search_n.h
@@ -14,12 +14,13 @@
 #include <__algorithm/iterator_operations.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__iterator/advance.h>
 #include <__iterator/concepts.h>
 #include <__iterator/distance.h>
 #include <__iterator/iterator_traits.h>
 #include <__ranges/concepts.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_callable.h>
 #include <__utility/convert_to_integral.h>
 #include <__utility/pair.h>
diff --git a/libcxx/include/__algorithm/set_difference.h b/libcxx/include/__algorithm/set_difference.h
index f414bcecb50df1..6230b831aeda21 100644
--- a/libcxx/include/__algorithm/set_difference.h
+++ b/libcxx/include/__algorithm/set_difference.h
@@ -15,7 +15,6 @@
 #include <__algorithm/iterator_operations.h>
 #include <__config>
 #include <__functional/identity.h>
-#include <__functional/invoke.h>
 #include <__iterator/iterator_traits.h>
 #include <__type_traits/remove_cvref.h>
 #include <__utility/move.h>
diff --git a/libcxx/include/__algorithm/set_intersection.h b/libcxx/include/__algorithm/set_intersection.h
index 2335e5087f6f81..6246e24b9ca4e7 100644
--- a/libcxx/include/__algorithm/set_intersection.h
+++ b/libcxx/include/__algorithm/set_intersection.h
@@ -19,6 +19,7 @@
 #include <__iterator/next.h>
 #include <__type_traits/is_same.h>
 #include <__utility/exchange.h>
+#include <__utility/forward.h>
 #include <__utility/move.h>
 #include <__utility/swap.h>
 
diff --git a/libcxx/include/__algorithm/sort.h b/libcxx/include/__algorithm/sort.h
index 77ff1533c79492..39868b8b6a30ae 100644
--- a/libcxx/include/__algorithm/sort.h
+++ b/libcxx/include/__algorithm/sort.h
@@ -29,9 +29,12 @@
 #include <__type_traits/conditional.h>
 #include <__type_traits/desugars_to.h>
 #include <__type_traits/disjunction.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_arithmetic.h>
 #include <__type_traits/is_constant_evaluated.h>
+#include <__type_traits/is_same.h>
 #include <__type_traits/is_trivially_copyable.h>
+#include <__type_traits/remove_cvref.h>
 #include <__utility/move.h>
 #include <__utility/pair.h>
 #include <climits>
diff --git a/libcxx/include/__algorithm/stable_partition.h b/libcxx/include/__algorithm/stable_partition.h
index 8bb1eaf2d22495..bf86952acc8ed9 100644
--- a/libcxx/include/__algorithm/stable_partition.h
+++ b/libcxx/include/__algorithm/stable_partition.h
@@ -18,6 +18,7 @@
 #include <__memory/destruct_n.h>
 #include <__memory/temporary_buffer.h>
 #include <__memory/unique_ptr.h>
+#include <__type_traits/remove_cvref.h>
 #include <__utility/move.h>
 #include <__utility/pair.h>
 #include <new>
diff --git a/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h b/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h
index aef0fbfb7c2842..bc7a8925e12879 100644
--- a/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h
+++ b/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h
@@ -10,7 +10,7 @@
 #define _LIBCPP___ALGORITHM_RANGES_UNIFORM_RANDOM_BIT_GENERATOR_ADAPTOR_H
 
 #include <__config>
-#include <__functional/invoke.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/remove_cvref.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__algorithm/upper_bound.h b/libcxx/include/__algorithm/upper_bound.h
index e8be0ef0564886..d77286c9e5af5a 100644
--- a/libcxx/include/__algorithm/upper_bound.h
+++ b/libcxx/include/__algorithm/upper_bound.h
@@ -18,6 +18,7 @@
 #include <__iterator/advance.h>
 #include <__iterator/distance.h>
 #include <__iterator/iterator_traits.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_callable.h>
 #include <__type_traits/is_constructible.h>
 #include <__utility/move.h>
diff --git a/libcxx/include/__atomic/atomic_ref.h b/libcxx/include/__atomic/atomic_ref.h
index 92e9247e2e50eb..465cd9a77ea792 100644
--- a/libcxx/include/__atomic/atomic_ref.h
+++ b/libcxx/include/__atomic/atomic_ref.h
@@ -20,6 +20,7 @@
 #include <__assert>
 #include <__atomic/atomic_sync.h>
 #include <__atomic/check_memory_order.h>
+#include <__atomic/memory_order.h>
 #include <__atomic/to_gcc_order.h>
 #include <__concepts/arithmetic.h>
 #include <__concepts/same_as.h>
diff --git a/libcxx/include/__chrono/day.h b/libcxx/include/__chrono/day.h
index 7342084b08c886..f5b14689a78acf 100644
--- a/libcxx/include/__chrono/day.h
+++ b/libcxx/include/__chrono/day.h
@@ -11,8 +11,8 @@
 #define _LIBCPP___CHRONO_DAY_H
 
 #include <__chrono/duration.h>
+#include <__compare/ordering.h>
 #include <__config>
-#include <compare>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
diff --git a/libcxx/include/__chrono/formatter.h b/libcxx/include/__chrono/formatter.h
index ff2593f7230292..8389e2cbf9e595 100644
--- a/libcxx/include/__chrono/formatter.h
+++ b/libcxx/include/__chrono/formatter.h
@@ -52,6 +52,7 @@
 #  include <cmath>
 #  include <ctime>
 #  include <limits>
+#  include <locale>
 #  include <sstream>
 #  include <string_view>
 
diff --git a/libcxx/include/__chrono/month.h b/libcxx/include/__chrono/month.h
index ce5cc21aab7d1e..77c67d0954efa8 100644
--- a/libcxx/include/__chrono/month.h
+++ b/libcxx/include/__chrono/month.h
@@ -11,8 +11,8 @@
 #define _LIBCPP___CHRONO_MONTH_H
 
 #include <__chrono/duration.h>
+#include <__compare/ordering.h>
 #include <__config>
-#include <compare>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
diff --git a/libcxx/include/__chrono/monthday.h b/libcxx/include/__chrono/monthday.h
index a89d16e518618e..57712cf0b65a8a 100644
--- a/libcxx/include/__chrono/monthday.h
+++ b/libcxx/include/__chrono/monthday.h
@@ -13,8 +13,8 @@
 #include <__chrono/calendar.h>
 #include <__chrono/day.h>
 #include <__chrono/month.h>
+#include <__compare/ordering.h>
 #include <__config>
-#include <compare>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
diff --git a/libcxx/include/__chrono/ostream.h b/libcxx/include/__chrono/ostream.h
index 196ebd518541c7..3420fb12bcdb0b 100644
--- a/libcxx/include/__chrono/ostream.h
+++ b/libcxx/include/__chrono/ostream.h
@@ -36,6 +36,7 @@
 #  include <__format/format_functions.h>
 #  include <__fwd/ostream.h>
 #  include <ratio>
+#  include <sstream>
 
 #  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #    pragma GCC system_header
diff --git a/libcxx/include/__chrono/tzdb.h b/libcxx/include/__chrono/tzdb.h
index f731f8c318be07..dce97c3adfa1ba 100644
--- a/libcxx/include/__chrono/tzdb.h
+++ b/libcxx/include/__chrono/tzdb.h
@@ -21,7 +21,10 @@
 #  include <__chrono/time_zone.h>
 #  include <__chrono/time_zone_link.h>
 #  include <__config>
+#  include <__memory/addressof.h>
+#  include <stdexcept>
 #  include <string>
+#  include <string_view>
 #  include <vector>
 
 #  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__chrono/tzdb_list.h b/libcxx/include/__chrono/tzdb_list.h
index aeef4fe1aba3c1..18446d9926d9dc 100644
--- a/libcxx/include/__chrono/tzdb_list.h
+++ b/libcxx/include/__chrono/tzdb_list.h
@@ -21,6 +21,7 @@
 #  include <__config>
 #  include <__fwd/string.h>
 #  include <forward_list>
+#  include <string_view>
 
 #  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #    pragma GCC system_header
diff --git a/libcxx/include/__chrono/year.h b/libcxx/include/__chrono/year.h
index 1899d09f38dbdb..2ae5180cb8fc97 100644
--- a/libcxx/include/__chrono/year.h
+++ b/libcxx/include/__chrono/year.h
@@ -11,8 +11,8 @@
 #define _LIBCPP___CHRONO_YEAR_H
 
 #include <__chrono/duration.h>
+#include <__compare/ordering.h>
 #include <__config>
-#include <compare>
 #include <limits>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__chrono/year_month.h b/libcxx/include/__chrono/year_month.h
index 369ea38f7560d9..cf9234bdb4625a 100644
--- a/libcxx/include/__chrono/year_month.h
+++ b/libcxx/include/__chrono/year_month.h
@@ -13,8 +13,8 @@
 #include <__chrono/duration.h>
 #include <__chrono/month.h>
 #include <__chrono/year.h>
+#include <__compare/ordering.h>
 #include <__config>
-#include <compare>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
diff --git a/libcxx/include/__chrono/year_month_day.h b/libcxx/include/__chrono/year_month_day.h
index b06c0be03e0de4..a0510a14f4edeb 100644
--- a/libcxx/include/__chrono/year_month_day.h
+++ b/libcxx/include/__chrono/year_month_day.h
@@ -19,8 +19,8 @@
 #include <__chrono/time_point.h>
 #include <__chrono/year.h>
 #include <__chrono/year_month.h>
+#include <__compare/ordering.h>
 #include <__config>
-#include <compare>
 #include <limits>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__chrono/zoned_time.h b/libcxx/include/__chrono/zoned_time.h
index a16ffcf1192b2e..c7252cb003b8e4 100644
--- a/libcxx/include/__chrono/zoned_time.h
+++ b/libcxx/include/__chrono/zoned_time.h
@@ -22,12 +22,14 @@
 #  include <__chrono/system_clock.h>
 #  include <__chrono/time_zone.h>
 #  include <__chrono/tzdb_list.h>
+#  include <__concepts/constructible.h>
 #  include <__config>
-#  include <__fwd/string_view.h>
 #  include <__type_traits/common_type.h>
 #  include <__type_traits/conditional.h>
 #  include <__type_traits/remove_cvref.h>
+#  include <__utility/declval.h>
 #  include <__utility/move.h>
+#  include <string_view>
 
 #  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #    pragma GCC system_header
diff --git a/libcxx/include/__concepts/predicate.h b/libcxx/include/__concepts/predicate.h
index 00731efc8fcd9e..e0263a878b0650 100644
--- a/libcxx/include/__concepts/predicate.h
+++ b/libcxx/include/__concepts/predicate.h
@@ -12,7 +12,7 @@
 #include <__concepts/boolean_testable.h>
 #include <__concepts/invocable.h>
 #include <__config>
-#include <__functional/invoke.h>
+#include <__type_traits/invoke.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
diff --git a/libcxx/include/__expected/expected.h b/libcxx/include/__expected/expected.h
index 8661d5d6e9b939..f4ad455a19ea5e 100644
--- a/libcxx/include/__expected/expected.h
+++ b/libcxx/include/__expected/expected.h
@@ -17,9 +17,11 @@
 #include <__functional/invoke.h>
 #include <__memory/addressof.h>
 #include <__memory/construct_at.h>
+#include <__type_traits/conditional.h>
 #include <__type_traits/conjunction.h>
 #include <__type_traits/disjunction.h>
 #include <__type_traits/integral_constant.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_assignable.h>
 #include <__type_traits/is_constructible.h>
 #include <__type_traits/is_convertible.h>
diff --git a/libcxx/include/__format/format_arg_store.h b/libcxx/include/__format/format_arg_store.h
index 00de1c30b8733b..68e936acecade7 100644
--- a/libcxx/include/__format/format_arg_store.h
+++ b/libcxx/include/__format/format_arg_store.h
@@ -22,6 +22,7 @@
 #include <__type_traits/conditional.h>
 #include <__type_traits/extent.h>
 #include <__type_traits/remove_const.h>
+#include <cstdint>
 #include <string>
 #include <string_view>
 
diff --git a/libcxx/include/__format/write_escaped.h b/libcxx/include/__format/write_escaped.h
index 052ea98c3c3b8c..9c288a84d0c441 100644
--- a/libcxx/include/__format/write_escaped.h
+++ b/libcxx/include/__format/write_escaped.h
@@ -16,6 +16,7 @@
 #include <__charconv/to_chars_result.h>
 #include <__chrono/statically_widen.h>
 #include <__format/escaped_output_table.h>
+#include <__format/extended_grapheme_cluster_table.h>
 #include <__format/formatter_output.h>
 #include <__format/parser_std_format_spec.h>
 #include <__format/unicode.h>
diff --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h
index b4f46441da5074..4251ef74ab7bd4 100644
--- a/libcxx/include/__functional/bind.h
+++ b/libcxx/include/__functional/bind.h
@@ -11,10 +11,10 @@
 #define _LIBCPP___FUNCTIONAL_BIND_H
 
 #include <__config>
-#include <__functional/invoke.h>
 #include <__functional/weak_result_type.h>
 #include <__fwd/functional.h>
 #include <__type_traits/decay.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_reference_wrapper.h>
 #include <__type_traits/is_void.h>
 #include <cstddef>
diff --git a/libcxx/include/__functional/hash.h b/libcxx/include/__functional/hash.h
index a9e450edd39f53..59dce7ac9cc031 100644
--- a/libcxx/include/__functional/hash.h
+++ b/libcxx/include/__functional/hash.h
@@ -13,6 +13,7 @@
 #include <__functional/unary_function.h>
 #include <__fwd/functional.h>
 #include <__type_traits/conjunction.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/invoke.h>
 #include <__type_traits/is_constructible.h>
 #include <__type_traits/is_enum.h>
diff --git a/libcxx/include/__functional/invoke.h b/libcxx/include/__functional/invoke.h
index ef4bf25f07759f..ab201e94206e10 100644
--- a/libcxx/include/__functional/invoke.h
+++ b/libcxx/include/__functional/invoke.h
@@ -12,6 +12,7 @@
 
 #include <__config>
 #include <__type_traits/invoke.h>
+#include <__type_traits/is_void.h>
 #include <__utility/forward.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__functional/mem_fn.h b/libcxx/include/__functional/mem_fn.h
index ee07a71774f9a9..58dbdf871d747b 100644
--- a/libcxx/include/__functional/mem_fn.h
+++ b/libcxx/include/__functional/mem_fn.h
@@ -12,8 +12,8 @@
 
 #include <__config>
 #include <__functional/binary_function.h>
-#include <__functional/invoke.h>
 #include <__functional/weak_result_type.h>
+#include <__type_traits/invoke.h>
 #include <__utility/forward.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
diff --git a/libcxx/include/__functional/perfect_forward.h b/libcxx/include/__functional/perfect_forward.h
index 74177c789b4ad0..8fd68db3d6eb84 100644
--- a/libcxx/include/__functional/perfect_forward.h
+++ b/libcxx/include/__functional/perfect_forward.h
@@ -11,6 +11,7 @@
 #define _LIBCPP___FUNCTIONAL_PERFECT_FORWARD_H
 
 #include <__config>
+#include <__cstddef/size_t.h>
 #include <__type_traits/enable_if.h>
 #include <__type_traits/invoke.h>
 #include <__type_traits/is_constructible.h>
diff --git a/libcxx/include/__functional/reference_wrapper.h b/libcxx/include/__functional/reference_wrapper.h
index 3570e2673c8005..a4a66a50cf84ca 100644
--- a/libcxx/include/__functional/reference_wrapper.h
+++ b/libcxx/include/__functional/reference_wrapper.h
@@ -13,10 +13,10 @@
 #include <__compare/synth_three_way.h>
 #include <__concepts/boolean_testable.h>
 #include <__config>
-#include <__functional/invoke.h>
 #include <__functional/weak_result_type.h>
 #include <__memory/addressof.h>
 #include <__type_traits/enable_if.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_const.h>
 #include <__type_traits/remove_cvref.h>
 #include <__type_traits/void_t.h>
diff --git a/libcxx/include/__functional/weak_result_type.h b/libcxx/include/__functional/weak_result_type.h
index ad7a8395186cd5..793775a2903e6f 100644
--- a/libcxx/include/__functional/weak_result_type.h
+++ b/libcxx/include/__functional/weak_result_type.h
@@ -12,9 +12,9 @@
 
 #include <__config>
 #include <__functional/binary_function.h>
-#include <__functional/invoke.h>
 #include <__functional/unary_function.h>
 #include <__type_traits/integral_constant.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_same.h>
 #include <__utility/declval.h>
 
diff --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table
index 94554a8f15345c..226b56f2060397 100644
--- a/libcxx/include/__hash_table
+++ b/libcxx/include/__hash_table
@@ -16,7 +16,6 @@
 #include <__bit/countl.h>
 #include <__config>
 #include <__functional/hash.h>
-#include <__functional/invoke.h>
 #include <__iterator/iterator_traits.h>
 #include <__math/rounding_functions.h>
 #include <__memory/addressof.h>
@@ -28,6 +27,8 @@
 #include <__memory/unique_ptr.h>
 #include <__type_traits/can_extract_key.h>
 #include <__type_traits/conditional.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_const.h>
 #include <__type_traits/is_constructible.h>
 #include <__type_traits/is_nothrow_assignable.h>
diff --git a/libcxx/include/__iterator/common_iterator.h b/libcxx/include/__iterator/common_iterator.h
index ff382f32fe8950..31fc8267e5afb2 100644
--- a/libcxx/include/__iterator/common_iterator.h
+++ b/libcxx/include/__iterator/common_iterator.h
@@ -26,6 +26,7 @@
 #include <__iterator/iterator_traits.h>
 #include <__iterator/readable_traits.h>
 #include <__memory/addressof.h>
+#include <__type_traits/conditional.h>
 #include <__type_traits/is_pointer.h>
 #include <__utility/declval.h>
 #include <variant>
diff --git a/libcxx/include/__iterator/concepts.h b/libcxx/include/__iterator/concepts.h
index 93ea7efd495378..1c227933a482a1 100644
--- a/libcxx/include/__iterator/concepts.h
+++ b/libcxx/include/__iterator/concepts.h
@@ -26,7 +26,6 @@
 #include <__concepts/semiregular.h>
 #include <__concepts/totally_ordered.h>
 #include <__config>
-#include <__functional/invoke.h>
 #include <__iterator/incrementable_traits.h>
 #include <__iterator/iter_move.h>
 #include <__iterator/iterator_traits.h>
@@ -35,6 +34,7 @@
 #include <__type_traits/add_pointer.h>
 #include <__type_traits/common_reference.h>
 #include <__type_traits/integral_constant.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_pointer.h>
 #include <__type_traits/is_primary_template.h>
 #include <__type_traits/is_reference.h>
diff --git a/libcxx/include/__iterator/counted_iterator.h b/libcxx/include/__iterator/counted_iterator.h
index a02c61bf34e2f9..d461427ccea3ce 100644
--- a/libcxx/include/__iterator/counted_iterator.h
+++ b/libcxx/include/__iterator/counted_iterator.h
@@ -11,6 +11,7 @@
 #define _LIBCPP___ITERATOR_COUNTED_ITERATOR_H
 
 #include <__assert>
+#include <__compare/ordering.h>
 #include <__concepts/assignable.h>
 #include <__concepts/common_with.h>
 #include <__concepts/constructible.h>
@@ -28,7 +29,6 @@
 #include <__type_traits/add_pointer.h>
 #include <__type_traits/conditional.h>
 #include <__utility/move.h>
-#include <compare>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
diff --git a/libcxx/include/__iterator/ostreambuf_iterator.h b/libcxx/include/__iterator/ostreambuf_iterator.h
index dda0094dc3f535..401b6f3f236032 100644
--- a/libcxx/include/__iterator/ostreambuf_iterator.h
+++ b/libcxx/include/__iterator/ostreambuf_iterator.h
@@ -11,10 +11,13 @@
 #define _LIBCPP___ITERATOR_OSTREAMBUF_ITERATOR_H
 
 #include <__config>
+#include <__fwd/ios.h>
+#include <__fwd/ostream.h>
+#include <__fwd/streambuf.h>
 #include <__iterator/iterator.h>
 #include <__iterator/iterator_traits.h>
 #include <cstddef>
-#include <iosfwd> // for forward declaration of basic_streambuf
+#include <iosfwd> // for forward declaration of ostreambuf_iterator
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
diff --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h
index 082c36d4b8c7ad..f4d9679807ae01 100644
--- a/libcxx/include/__memory/allocator_traits.h
+++ b/libcxx/include/__memory/allocator_traits.h
@@ -11,6 +11,7 @@
 #define _LIBCPP___MEMORY_ALLOCATOR_TRAITS_H
 
 #include <__config>
+#include <__fwd/memory.h>
 #include <__memory/construct_at.h>
 #include <__memory/pointer_traits.h>
 #include <__type_traits/enable_if.h>
diff --git a/libcxx/include/__memory/inout_ptr.h b/libcxx/include/__memory/inout_ptr.h
index e5f3ac5d027e8e..b0e75937927cf2 100644
--- a/libcxx/include/__memory/inout_ptr.h
+++ b/libcxx/include/__memory/inout_ptr.h
@@ -15,6 +15,7 @@
 #include <__memory/pointer_traits.h>
 #include <__memory/shared_ptr.h>
 #include <__memory/unique_ptr.h>
+#include <__type_traits/is_pointer.h>
 #include <__type_traits/is_same.h>
 #include <__type_traits/is_specialization.h>
 #include <__type_traits/is_void.h>
diff --git a/libcxx/include/__memory/out_ptr.h b/libcxx/include/__memory/out_ptr.h
index fd99110790cc89..030a4c3b0ed0b8 100644
--- a/libcxx/include/__memory/out_ptr.h
+++ b/libcxx/include/__memory/out_ptr.h
@@ -15,6 +15,7 @@
 #include <__memory/pointer_traits.h>
 #include <__memory/shared_ptr.h>
 #include <__memory/unique_ptr.h>
+#include <__type_traits/is_pointer.h>
 #include <__type_traits/is_specialization.h>
 #include <__type_traits/is_void.h>
 #include <__utility/forward.h>
diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h
index 8e08eb74413ee5..98961ddf9709f6 100644
--- a/libcxx/include/__memory/pointer_traits.h
+++ b/libcxx/include/__memory/pointer_traits.h
@@ -16,6 +16,7 @@
 #include <__type_traits/conjunction.h>
 #include <__type_traits/decay.h>
 #include <__type_traits/enable_if.h>
+#include <__type_traits/integral_constant.h>
 #include <__type_traits/is_class.h>
 #include <__type_traits/is_function.h>
 #include <__type_traits/is_void.h>
diff --git a/libcxx/include/__random/uniform_random_bit_generator.h b/libcxx/include/__random/uniform_random_bit_generator.h
index 4076f19b2cb2c1..75ffc27f9fcd85 100644
--- a/libcxx/include/__random/uniform_random_bit_generator.h
+++ b/libcxx/include/__random/uniform_random_bit_generator.h
@@ -13,8 +13,8 @@
 #include <__concepts/invocable.h>
 #include <__concepts/same_as.h>
 #include <__config>
-#include <__functional/invoke.h>
 #include <__type_traits/integral_constant.h>
+#include <__type_traits/invoke.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
diff --git a/libcxx/include/__ranges/elements_view.h b/libcxx/include/__ranges/elements_view.h
index 989d36fbcaaae5..ac0d8dbbd52b77 100644
--- a/libcxx/include/__ranges/elements_view.h
+++ b/libcxx/include/__ranges/elements_view.h
@@ -38,6 +38,7 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 #include <cstddef>
+#include <tuple> // std::get
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
diff --git a/libcxx/include/__ranges/range_adaptor.h b/libcxx/include/__ranges/range_adaptor.h
index 2da246f24e1d2f..b20165319bc351 100644
--- a/libcxx/include/__ranges/range_adaptor.h
+++ b/libcxx/include/__ranges/range_adaptor.h
@@ -19,8 +19,10 @@
 #include <__functional/invoke.h>
 #include <__ranges/concepts.h>
 #include <__type_traits/decay.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_class.h>
 #include <__type_traits/is_nothrow_constructible.h>
+#include <__type_traits/remove_cv.h>
 #include <__type_traits/remove_cvref.h>
 #include <__utility/forward.h>
 #include <__utility/move.h>
diff --git a/libcxx/include/__ranges/transform_view.h b/libcxx/include/__ranges/transform_view.h
index 686a2a8fe8c21e..42e9a131f73b15 100644
--- a/libcxx/include/__ranges/transform_view.h
+++ b/libcxx/include/__ranges/transform_view.h
@@ -34,6 +34,7 @@
 #include <__ranges/view_interface.h>
 #include <__type_traits/conditional.h>
 #include <__type_traits/decay.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_nothrow_constructible.h>
 #include <__type_traits/is_object.h>
 #include <__type_traits/is_reference.h>
diff --git a/libcxx/include/__string/char_traits.h b/libcxx/include/__string/char_traits.h
index 2660ac2ede2d5c..9b7d567dd3c278 100644
--- a/libcxx/include/__string/char_traits.h
+++ b/libcxx/include/__string/char_traits.h
@@ -20,6 +20,7 @@
 #include <__functional/hash.h>
 #include <__functional/identity.h>
 #include <__iterator/iterator_traits.h>
+#include <__std_mbstate_t.h>
 #include <__string/constexpr_c_functions.h>
 #include <__type_traits/is_constant_evaluated.h>
 #include <__utility/is_pointer_in_range.h>
diff --git a/libcxx/include/__thread/jthread.h b/libcxx/include/__thread/jthread.h
index 8fac72fff1689b..9f3d41d39132bb 100644
--- a/libcxx/include/__thread/jthread.h
+++ b/libcxx/include/__thread/jthread.h
@@ -11,17 +11,19 @@
 #define _LIBCPP___THREAD_JTHREAD_H
 
 #include <__config>
-#include <__functional/invoke.h>
 #include <__stop_token/stop_source.h>
 #include <__stop_token/stop_token.h>
+#include <__thread/id.h>
 #include <__thread/support.h>
 #include <__thread/thread.h>
 #include <__type_traits/decay.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_constructible.h>
 #include <__type_traits/is_same.h>
 #include <__type_traits/remove_cvref.h>
 #include <__utility/forward.h>
 #include <__utility/move.h>
+#include <__utility/swap.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
diff --git a/libcxx/include/__thread/this_thread.h b/libcxx/include/__thread/this_thread.h
index 2318a9b8795814..c7521c90ed5baa 100644
--- a/libcxx/include/__thread/this_thread.h
+++ b/libcxx/include/__thread/this_thread.h
@@ -10,6 +10,7 @@
 #ifndef _LIBCPP___THREAD_THIS_THREAD_H
 #define _LIBCPP___THREAD_THIS_THREAD_H
 
+#include <__chrono/duration.h>
 #include <__chrono/steady_clock.h>
 #include <__chrono/time_point.h>
 #include <__condition_variable/condition_variable.h>
diff --git a/libcxx/include/__thread/thread.h b/libcxx/include/__thread/thread.h
index 96de12e83b4917..481a3f38b82f0f 100644
--- a/libcxx/include/__thread/thread.h
+++ b/libcxx/include/__thread/thread.h
@@ -21,6 +21,7 @@
 #include <__system_error/system_error.h>
 #include <__thread/id.h>
 #include <__thread/support.h>
+#include <__type_traits/decay.h>
 #include <__utility/forward.h>
 #include <tuple>
 
diff --git a/libcxx/include/__tree b/libcxx/include/__tree
index 6ded2c597f6fa7..f2f5e161427eb9 100644
--- a/libcxx/include/__tree
+++ b/libcxx/include/__tree
@@ -13,7 +13,6 @@
 #include <__algorithm/min.h>
 #include <__assert>
 #include <__config>
-#include <__functional/invoke.h>
 #include <__iterator/distance.h>
 #include <__iterator/iterator_traits.h>
 #include <__iterator/next.h>
@@ -25,6 +24,8 @@
 #include <__memory/unique_ptr.h>
 #include <__type_traits/can_extract_key.h>
 #include <__type_traits/conditional.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_const.h>
 #include <__type_traits/is_constructible.h>
 #include <__type_traits/is_nothrow_assignable.h>
diff --git a/libcxx/include/__type_traits/is_swappable.h b/libcxx/include/__type_traits/is_swappable.h
index f4d687094bbca1..221f017700a2e4 100644
--- a/libcxx/include/__type_traits/is_swappable.h
+++ b/libcxx/include/__type_traits/is_swappable.h
@@ -13,6 +13,7 @@
 #include <__cstddef/size_t.h>
 #include <__type_traits/add_lvalue_reference.h>
 #include <__type_traits/enable_if.h>
+#include <__type_traits/integral_constant.h>
 #include <__type_traits/is_assignable.h>
 #include <__type_traits/is_constructible.h>
 #include <__type_traits/is_nothrow_assignable.h>
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 698e6f5cb7ad1f..36fd035b7e51b3 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -313,6 +313,9 @@ namespace ranges {
   template<class I, class F>
     using for_each_result = in_fun_result<I, F>;                                            // since C++20
 
+  template<class I, class F>
+    using for_each_n_result = in_fun_result<I, F>;                                          // since C++20
+
   template<input_iterator I, sentinel_for<I> S, class Proj = identity,
            indirectly_unary_invocable<projected<I, Proj>> Fun>
     constexpr ranges::for_each_result<I, Fun>
@@ -700,6 +703,12 @@ namespace ranges {
       ranges::lexicographical_compare(R1&& r1, R2&& r2, Comp comp = {},
                                       Proj1 proj1 = {}, Proj2 proj2 = {});                          // since C++20
 
+  template<class I, class O>
+    using move_result = in_out_result<I, O>;                                                        // since C++20
+
+  template<class I, class O>
+    using move_backward_result = in_out_result<I, O>;                                               // since C++20
+
   template<bidirectional_iterator I1, sentinel_for<I1> S1, bidirectional_iterator I2>
     requires indirectly_movable<I1, I2>
     constexpr ranges::move_backward_result<I1, I2>
diff --git a/libcxx/include/array b/libcxx/include/array
index fde7a7011e6432..0e9af4198632d1 100644
--- a/libcxx/include/array
+++ b/libcxx/include/array
@@ -124,6 +124,7 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce
 #include <__tuple/sfinae_helpers.h>
 #include <__type_traits/conditional.h>
 #include <__type_traits/conjunction.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_array.h>
 #include <__type_traits/is_const.h>
 #include <__type_traits/is_constructible.h>
diff --git a/libcxx/include/bitset b/libcxx/include/bitset
index 6bd7bfe585f38a..ce23d522168c4c 100644
--- a/libcxx/include/bitset
+++ b/libcxx/include/bitset
@@ -128,6 +128,7 @@ template <size_t N> struct hash<std::bitset<N>>;
 
 #include <__algorithm/count.h>
 #include <__algorithm/fill.h>
+#include <__algorithm/fill_n.h>
 #include <__algorithm/find.h>
 #include <__bit_reference>
 #include <__config>
diff --git a/libcxx/include/deque b/libcxx/include/deque
index 78e11fdd65d603..bab0526629f0f8 100644
--- a/libcxx/include/deque
+++ b/libcxx/include/deque
@@ -184,7 +184,10 @@ template <class T, class Allocator, class Predicate>
 #include <__algorithm/fill_n.h>
 #include <__algorithm/lexicographical_compare.h>
 #include <__algorithm/lexicographical_compare_three_way.h>
+#include <__algorithm/max.h>
 #include <__algorithm/min.h>
+#include <__algorithm/move.h>
+#include <__algorithm/move_backward.h>
 #include <__algorithm/remove.h>
 #include <__algorithm/remove_if.h>
 #include <__algorithm/unwrap_iter.h>
@@ -195,13 +198,18 @@ template <class T, class Allocator, class Predicate>
 #include <__fwd/deque.h>
 #include <__iterator/distance.h>
 #include <__iterator/iterator_traits.h>
+#include <__iterator/move_iterator.h>
 #include <__iterator/next.h>
 #include <__iterator/prev.h>
 #include <__iterator/reverse_iterator.h>
 #include <__iterator/segmented_iterator.h>
 #include <__memory/addressof.h>
+#include <__memory/allocator.h>
 #include <__memory/allocator_destructor.h>
+#include <__memory/allocator_traits.h>
+#include <__memory/compressed_pair.h>
 #include <__memory/pointer_traits.h>
+#include <__memory/swap_allocator.h>
 #include <__memory/temp_value.h>
 #include <__memory/unique_ptr.h>
 #include <__memory_resource/polymorphic_allocator.h>
@@ -211,10 +219,15 @@ template <class T, class Allocator, class Predicate>
 #include <__ranges/from_range.h>
 #include <__ranges/size.h>
 #include <__split_buffer>
+#include <__type_traits/conditional.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_allocator.h>
 #include <__type_traits/is_convertible.h>
+#include <__type_traits/is_nothrow_assignable.h>
+#include <__type_traits/is_nothrow_constructible.h>
 #include <__type_traits/is_same.h>
 #include <__type_traits/is_swappable.h>
+#include <__type_traits/is_trivially_relocatable.h>
 #include <__type_traits/type_identity.h>
 #include <__utility/forward.h>
 #include <__utility/move.h>
diff --git a/libcxx/include/experimental/iterator b/libcxx/include/experimental/iterator
index edfe6e707bcec9..e3a9c771fe61cf 100644
--- a/libcxx/include/experimental/iterator
+++ b/libcxx/include/experimental/iterator
@@ -54,6 +54,8 @@ namespace std {
 
 #include <__config>
 #include <__memory/addressof.h>
+#include <__ostream/basic_ostream.h>
+#include <__string/char_traits.h>
 #include <__type_traits/decay.h>
 #include <__utility/forward.h>
 #include <__utility/move.h>
diff --git a/libcxx/include/fstream b/libcxx/include/fstream
index 1cc3bd8858e122..de7c614836babd 100644
--- a/libcxx/include/fstream
+++ b/libcxx/include/fstream
@@ -189,6 +189,7 @@ typedef basic_fstream<wchar_t> wfstream;
 #include <__algorithm/max.h>
 #include <__assert>
 #include <__config>
+#include <__filesystem/path.h>
 #include <__fwd/fstream.h>
 #include <__locale>
 #include <__memory/addressof.h>
@@ -198,7 +199,6 @@ typedef basic_fstream<wchar_t> wfstream;
 #include <__utility/swap.h>
 #include <__utility/unreachable.h>
 #include <cstdio>
-#include <filesystem>
 #include <istream>
 #include <ostream>
 #include <typeinfo>
@@ -1576,4 +1576,8 @@ _LIBCPP_POP_MACROS
 #  include <type_traits>
 #endif
 
+#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 23
+#  include <filesystem>
+#endif
+
 #endif // _LIBCPP_FSTREAM
diff --git a/libcxx/include/future b/libcxx/include/future
index e14622e3233009..7dc38a3354bb4b 100644
--- a/libcxx/include/future
+++ b/libcxx/include/future
@@ -384,8 +384,13 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
 #  include <__system_error/error_category.h>
 #  include <__system_error/error_code.h>
 #  include <__system_error/error_condition.h>
+#  include <__type_traits/add_lvalue_reference.h>
 #  include <__type_traits/aligned_storage.h>
+#  include <__type_traits/conditional.h>
+#  include <__type_traits/decay.h>
+#  include <__type_traits/enable_if.h>
 #  include <__type_traits/strip_signature.h>
+#  include <__type_traits/underlying_type.h>
 #  include <__utility/auto_cast.h>
 #  include <__utility/forward.h>
 #  include <__utility/move.h>
diff --git a/libcxx/include/iomanip b/libcxx/include/iomanip
index 70c8c354e86f21..2c4023d4ee44a1 100644
--- a/libcxx/include/iomanip
+++ b/libcxx/include/iomanip
@@ -46,6 +46,8 @@ template <class charT, class traits, class Allocator>
 
 #ifndef _LIBCPP_HAS_NO_LOCALIZATION
 
+#  include <__ostream/basic_ostream.h>
+#  include <ios>
 #  include <istream>
 #  include <version>
 
diff --git a/libcxx/include/map b/libcxx/include/map
index 5d97538c0cfa60..7fca4c8a0872fd 100644
--- a/libcxx/include/map
+++ b/libcxx/include/map
@@ -585,6 +585,9 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);  // C++20
 #include <__iterator/reverse_iterator.h>
 #include <__memory/addressof.h>
 #include <__memory/allocator.h>
+#include <__memory/allocator_traits.h>
+#include <__memory/pointer_traits.h>
+#include <__memory/unique_ptr.h>
 #include <__memory_resource/polymorphic_allocator.h>
 #include <__node_handle>
 #include <__ranges/concepts.h>
@@ -592,9 +595,13 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);  // C++20
 #include <__ranges/from_range.h>
 #include <__tree>
 #include <__type_traits/is_allocator.h>
+#include <__type_traits/remove_const.h>
+#include <__type_traits/type_identity.h>
 #include <__utility/forward.h>
+#include <__utility/pair.h>
 #include <__utility/piecewise_construct.h>
 #include <__utility/swap.h>
+#include <new> // for std::launder
 #include <stdexcept>
 #include <tuple>
 #include <version>
diff --git a/libcxx/include/optional b/libcxx/include/optional
index b0933b59b25d26..7578833685ec1f 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -179,6 +179,7 @@ namespace std {
 
 #include <__assert>
 #include <__compare/compare_three_way_result.h>
+#include <__compare/ordering.h>
 #include <__compare/three_way_comparable.h>
 #include <__concepts/invocable.h>
 #include <__config>
@@ -195,6 +196,8 @@ namespace std {
 #include <__type_traits/conjunction.h>
 #include <__type_traits/decay.h>
 #include <__type_traits/disjunction.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_array.h>
 #include <__type_traits/is_assignable.h>
 #include <__type_traits/is_constructible.h>
diff --git a/libcxx/include/set b/libcxx/include/set
index b614e048e2cfd4..0c2ca64139e0d3 100644
--- a/libcxx/include/set
+++ b/libcxx/include/set
@@ -524,14 +524,23 @@ erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred);  // C++20
 #include <__iterator/ranges_iterator_traits.h>
 #include <__iterator/reverse_iterator.h>
 #include <__memory/allocator.h>
+#include <__memory/allocator_traits.h>
 #include <__memory_resource/polymorphic_allocator.h>
 #include <__node_handle>
 #include <__ranges/concepts.h>
 #include <__ranges/container_compatible_range.h>
 #include <__ranges/from_range.h>
 #include <__tree>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_allocator.h>
+#include <__type_traits/is_nothrow_assignable.h>
+#include <__type_traits/is_nothrow_constructible.h>
+#include <__type_traits/is_same.h>
+#include <__type_traits/is_swappable.h>
+#include <__type_traits/type_identity.h>
 #include <__utility/forward.h>
+#include <__utility/move.h>
+#include <__utility/pair.h>
 #include <version>
 
 // standard-mandated includes
diff --git a/libcxx/include/sstream b/libcxx/include/sstream
index 553cc08b122cfe..c29abab9c5fc3b 100644
--- a/libcxx/include/sstream
+++ b/libcxx/include/sstream
@@ -320,7 +320,9 @@ typedef basic_stringstream<wchar_t> wstringstream;
 #  include <__ostream/basic_ostream.h>
 #  include <__type_traits/is_convertible.h>
 #  include <__utility/swap.h>
+#  include <ios>
 #  include <istream>
+#  include <locale>
 #  include <string>
 #  include <string_view>
 #  include <version>
diff --git a/libcxx/include/tuple b/libcxx/include/tuple
index 5161c2aa97c2ba..e7e14b8d12d42a 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -211,9 +211,9 @@ template <class... Types>
 // clang-format on
 
 #include <__compare/common_comparison_category.h>
+#include <__compare/ordering.h>
 #include <__compare/synth_three_way.h>
 #include <__config>
-#include <__functional/invoke.h>
 #include <__fwd/array.h>
 #include <__fwd/pair.h>
 #include <__fwd/tuple.h>
@@ -234,6 +234,8 @@ template <class... Types>
 #include <__type_traits/conjunction.h>
 #include <__type_traits/copy_cvref.h>
 #include <__type_traits/disjunction.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_arithmetic.h>
 #include <__type_traits/is_assignable.h>
 #include <__type_traits/is_constructible.h>
@@ -254,6 +256,7 @@ template <class... Types>
 #include <__type_traits/remove_cvref.h>
 #include <__type_traits/remove_reference.h>
 #include <__type_traits/unwrap_ref.h>
+#include <__utility/declval.h>
 #include <__utility/forward.h>
 #include <__utility/integer_sequence.h>
 #include <__utility/move.h>
diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map
index 0743b2e35e12a1..0d71a51ee9e729 100644
--- a/libcxx/include/unordered_map
+++ b/libcxx/include/unordered_map
@@ -586,6 +586,7 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
 #include <__algorithm/is_permutation.h>
 #include <__assert>
 #include <__config>
+#include <__functional/hash.h>
 #include <__functional/is_transparent.h>
 #include <__functional/operations.h>
 #include <__hash_table>
@@ -595,6 +596,9 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
 #include <__iterator/ranges_iterator_traits.h>
 #include <__memory/addressof.h>
 #include <__memory/allocator.h>
+#include <__memory/allocator_traits.h>
+#include <__memory/pointer_traits.h>
+#include <__memory/unique_ptr.h>
 #include <__memory_resource/polymorphic_allocator.h>
 #include <__node_handle>
 #include <__ranges/concepts.h>
@@ -603,8 +607,11 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
 #include <__type_traits/enable_if.h>
 #include <__type_traits/is_allocator.h>
 #include <__type_traits/is_integral.h>
+#include <__type_traits/remove_const.h>
 #include <__type_traits/type_identity.h>
 #include <__utility/forward.h>
+#include <__utility/pair.h>
+#include <new> // launder
 #include <stdexcept>
 #include <tuple>
 #include <version>
diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set
index bd8d3ab970ab97..2b09c72b866b03 100644
--- a/libcxx/include/unordered_set
+++ b/libcxx/include/unordered_set
@@ -534,6 +534,7 @@ template <class Value, class Hash, class Pred, class Alloc>
 #include <__algorithm/is_permutation.h>
 #include <__assert>
 #include <__config>
+#include <__functional/hash.h>
 #include <__functional/is_transparent.h>
 #include <__functional/operations.h>
 #include <__hash_table>
@@ -543,6 +544,7 @@ template <class Value, class Hash, class Pred, class Alloc>
 #include <__iterator/ranges_iterator_traits.h>
 #include <__memory/addressof.h>
 #include <__memory/allocator.h>
+#include <__memory/allocator_traits.h>
 #include <__memory_resource/polymorphic_allocator.h>
 #include <__node_handle>
 #include <__ranges/concepts.h>
@@ -551,7 +553,14 @@ template <class Value, class Hash, class Pred, class Alloc>
 #include <__type_traits/enable_if.h>
 #include <__type_traits/is_allocator.h>
 #include <__type_traits/is_integral.h>
+#include <__type_traits/is_nothrow_assignable.h>
+#include <__type_traits/is_nothrow_constructible.h>
+#include <__type_traits/is_same.h>
+#include <__type_traits/is_swappable.h>
+#include <__type_traits/type_identity.h>
 #include <__utility/forward.h>
+#include <__utility/move.h>
+#include <__utility/pair.h>
 #include <version>
 
 // standard-mandated includes
diff --git a/libcxx/include/variant b/libcxx/include/variant
index 2fa5623d4f118a..fd3aebaea0e14a 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -214,11 +214,11 @@ namespace std {
 
 #include <__compare/common_comparison_category.h>
 #include <__compare/compare_three_way_result.h>
+#include <__compare/ordering.h>
 #include <__compare/three_way_comparable.h>
 #include <__config>
 #include <__exception/exception.h>
 #include <__functional/hash.h>
-#include <__functional/invoke.h>
 #include <__functional/operations.h>
 #include <__functional/unary_function.h>
 #include <__fwd/variant.h>
@@ -231,8 +231,12 @@ namespace std {
 #include <__type_traits/add_pointer.h>
 #include <__type_traits/add_volatile.h>
 #include <__type_traits/common_type.h>
+#include <__type_traits/conditional.h>
 #include <__type_traits/conjunction.h>
+#include <__type_traits/decay.h>
 #include <__type_traits/dependent_type.h>
+#include <__type_traits/enable_if.h>
+#include <__type_traits/invoke.h>
 #include <__type_traits/is_array.h>
 #include <__type_traits/is_assignable.h>
 #include <__type_traits/is_constructible.h>
@@ -241,6 +245,7 @@ namespace std {
 #include <__type_traits/is_nothrow_assignable.h>
 #include <__type_traits/is_nothrow_constructible.h>
 #include <__type_traits/is_reference.h>
+#include <__type_traits/is_swappable.h>
 #include <__type_traits/is_trivially_assignable.h>
 #include <__type_traits/is_trivially_constructible.h>
 #include <__type_traits/is_trivially_destructible.h>
@@ -248,6 +253,7 @@ namespace std {
 #include <__type_traits/is_void.h>
 #include <__type_traits/remove_const.h>
 #include <__type_traits/remove_cvref.h>
+#include <__type_traits/remove_reference.h>
 #include <__type_traits/type_identity.h>
 #include <__type_traits/void_t.h>
 #include <__utility/declval.h>
diff --git a/libcxx/include/vector b/libcxx/include/vector
index 2a6484988c3102..7d3aac5989a48c 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -310,6 +310,10 @@ template<class T, class charT> requires is-vector-bool-reference<T> // Since C++
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/lexicographical_compare.h>
 #include <__algorithm/lexicographical_compare_three_way.h>
+#include <__algorithm/max.h>
+#include <__algorithm/min.h>
+#include <__algorithm/move.h>
+#include <__algorithm/move_backward.h>
 #include <__algorithm/remove.h>
 #include <__algorithm/remove_if.h>
 #include <__algorithm/rotate.h>
@@ -329,11 +333,16 @@ template<class T, class charT> requires is-vector-bool-reference<T> // Since C++
 #include <__iterator/bounded_iter.h>
 #include <__iterator/distance.h>
 #include <__iterator/iterator_traits.h>
+#include <__iterator/move_iterator.h>
+#include <__iterator/next.h>
 #include <__iterator/reverse_iterator.h>
 #include <__iterator/wrap_iter.h>
 #include <__memory/addressof.h>
 #include <__memory/allocate_at_least.h>
+#include <__memory/allocator.h>
 #include <__memory/allocator_traits.h>
+#include <__memory/compressed_pair.h>
+#include <__memory/construct_at.h>
 #include <__memory/noexcept_move_assign_container.h>
 #include <__memory/pointer_traits.h>
 #include <__memory/swap_allocator.h>
@@ -346,9 +355,14 @@ template<class T, class charT> requires is-vector-bool-reference<T> // Since C++
 #include <__ranges/from_range.h>
 #include <__ranges/size.h>
 #include <__split_buffer>
+#include <__type_traits/conditional.h>
+#include <__type_traits/enable_if.h>
 #include <__type_traits/is_allocator.h>
 #include <__type_traits/is_constructible.h>
 #include <__type_traits/is_nothrow_assignable.h>
+#include <__type_traits/is_nothrow_constructible.h>
+#include <__type_traits/is_same.h>
+#include <__type_traits/is_trivially_relocatable.h>
 #include <__type_traits/type_identity.h>
 #include <__utility/exception_guard.h>
 #include <__utility/forward.h>
diff --git a/libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/make.heap/complexity.pass.cpp b/libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/make.heap/complexity.pass.cpp
index 81ff96c7295fa1..cc48a81194e36d 100644
--- a/libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/make.heap/complexity.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/make.heap/complexity.pass.cpp
@@ -16,6 +16,7 @@
 #include <algorithm>
 #include <cassert>
 #include <random>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_comparators.pass.cpp b/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_comparators.pass.cpp
index 6bac7deadfa6ed..5a8640a8fc035c 100644
--- a/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_comparators.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_comparators.pass.cpp
@@ -16,6 +16,7 @@
 #include <cassert>
 #include <cstddef>
 #include <deque>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp b/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp
index d20abf3ffc2782..8cdf53c1835124 100644
--- a/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp
@@ -16,6 +16,7 @@
 #include <cassert>
 #include <cstddef>
 #include <deque>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/libcxx/algorithms/robust_against_copying_comparators.pass.cpp b/libcxx/test/libcxx/algorithms/robust_against_copying_comparators.pass.cpp
index 307610dd9b6db4..df656f296bd051 100644
--- a/libcxx/test/libcxx/algorithms/robust_against_copying_comparators.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/robust_against_copying_comparators.pass.cpp
@@ -12,6 +12,7 @@
 #include <cassert>
 #include <compare>
 #include <cstddef>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/libcxx/algorithms/robust_against_cpp20_hostile_iterators.compile.pass.cpp b/libcxx/test/libcxx/algorithms/robust_against_cpp20_hostile_iterators.compile.pass.cpp
index f5ad5a8d3d3eee..03fef57ee259a6 100644
--- a/libcxx/test/libcxx/algorithms/robust_against_cpp20_hostile_iterators.compile.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/robust_against_cpp20_hostile_iterators.compile.pass.cpp
@@ -12,6 +12,7 @@
 
 #include <algorithm>
 #include <functional>
+#include <iterator>
 #include <random>
 
 #include "test_macros.h"
diff --git a/libcxx/test/libcxx/containers/sequences/vector.bool/abi.compile.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector.bool/abi.compile.pass.cpp
index 6e6ea67d9742b3..9920d131da3e26 100644
--- a/libcxx/test/libcxx/containers/sequences/vector.bool/abi.compile.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector.bool/abi.compile.pass.cpp
@@ -9,6 +9,7 @@
 // UNSUPPORTED: libcpp-abi-no-compressed-pair-padding
 
 #include <vector>
+#include <cstdint>
 
 #include "min_allocator.h"
 #include "test_allocator.h"
diff --git a/libcxx/test/libcxx/containers/sequences/vector/abi.compile.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/abi.compile.pass.cpp
index 5dcbdad41968a4..57684951c8e8e9 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/abi.compile.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/abi.compile.pass.cpp
@@ -6,6 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include <cstdint>
 #include <vector>
 
 #include "min_allocator.h"
diff --git a/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp b/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp
index 4aa87d30b3f0bf..0b56c96f8d4e42 100644
--- a/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/next_pow2.pass.cpp
@@ -19,8 +19,9 @@
 // Otherwise, return the next power of 2.
 
 #include <__hash_table>
-#include <unordered_map>
 #include <cassert>
+#include <cstdint>
+#include <unordered_map>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp b/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp
index d19ab1ebb505a2..0efbe0342d0b62 100644
--- a/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/next_prime.pass.cpp
@@ -18,6 +18,7 @@
 
 #include <__hash_table>
 #include <cassert>
+#include <cstddef>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp b/libcxx/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
index 7583c36ba19df1..d212f36bb1ab48 100644
--- a/libcxx/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
@@ -18,6 +18,7 @@
 
 #include <functional>
 #include <cassert>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/libcxx/diagnostics/ranges.nodiscard.verify.cpp b/libcxx/test/libcxx/diagnostics/ranges.nodiscard.verify.cpp
index 60f3974b2b57d4..03b4df735edb54 100644
--- a/libcxx/test/libcxx/diagnostics/ranges.nodiscard.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/ranges.nodiscard.verify.cpp
@@ -13,6 +13,7 @@
 // clang-format off
 
 #include <ranges>
+#include <functional>
 #include <vector>
 
 #include "test_macros.h"
diff --git a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/cpp20_iter_concepts.pass.cpp b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/cpp20_iter_concepts.pass.cpp
index ddd07cefbde64d..d551a551795ff1 100644
--- a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/cpp20_iter_concepts.pass.cpp
+++ b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.concepts/cpp20_iter_concepts.pass.cpp
@@ -19,11 +19,12 @@
 // random_access_iterator_tag.
 // (1.4) -- Otherwise, ITER_CONCEPT(I) does not denote a type.
 
-#include "test_macros.h"
-
 #include <__type_traits/is_valid_expansion.h>
+#include <cstddef>
 #include <iterator>
 
+#include "test_macros.h"
+
 struct OtherTag : std::input_iterator_tag {};
 struct OtherTagTwo : std::output_iterator_tag {};
 
diff --git a/libcxx/test/libcxx/ranges/range.utility.helpers/has_arrow.compile.pass.cpp b/libcxx/test/libcxx/ranges/range.utility.helpers/has_arrow.compile.pass.cpp
index 1e04968446bad1..4f246f414b26b6 100644
--- a/libcxx/test/libcxx/ranges/range.utility.helpers/has_arrow.compile.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.utility.helpers/has_arrow.compile.pass.cpp
@@ -10,6 +10,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 
+#include <cstddef>
 #include <iterator>
 
 #include "test_macros.h"
diff --git a/libcxx/test/libcxx/strings/basic.string/alignof.compile.pass.cpp b/libcxx/test/libcxx/strings/basic.string/alignof.compile.pass.cpp
index 00943ef8762f89..49cbde14c568bb 100644
--- a/libcxx/test/libcxx/strings/basic.string/alignof.compile.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/alignof.compile.pass.cpp
@@ -10,6 +10,7 @@
 
 // UNSUPPORTED: c++03
 
+#include <cstdint>
 #include <iterator>
 #include <string>
 
diff --git a/libcxx/test/libcxx/strings/basic.string/sizeof.compile.pass.cpp b/libcxx/test/libcxx/strings/basic.string/sizeof.compile.pass.cpp
index b85895ffcd837f..31f1a94c732168 100644
--- a/libcxx/test/libcxx/strings/basic.string/sizeof.compile.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/sizeof.compile.pass.cpp
@@ -8,6 +8,7 @@
 
 // Ensure that we never change the size or alignment of `basic_string`
 
+#include <cstdint>
 #include <iterator>
 #include <string>
 
diff --git a/libcxx/test/libcxx/transitive_includes/cxx03.csv b/libcxx/test/libcxx/transitive_includes/cxx03.csv
index 135a5fda93a16b..506b5cd02c4495 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx03.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx03.csv
@@ -577,19 +577,43 @@ expected initializer_list
 expected new
 expected type_traits
 expected version
+experimental/iterator algorithm
+experimental/iterator atomic
+experimental/iterator bit
+experimental/iterator bitset
+experimental/iterator cctype
+experimental/iterator cerrno
+experimental/iterator climits
+experimental/iterator clocale
 experimental/iterator cmath
 experimental/iterator compare
 experimental/iterator concepts
+experimental/iterator cstdarg
 experimental/iterator cstddef
 experimental/iterator cstdint
+experimental/iterator cstdio
 experimental/iterator cstdlib
 experimental/iterator cstring
+experimental/iterator ctime
+experimental/iterator cwchar
+experimental/iterator cwctype
 experimental/iterator exception
 experimental/iterator initializer_list
+experimental/iterator ios
 experimental/iterator iosfwd
 experimental/iterator iterator
 experimental/iterator limits
+experimental/iterator locale
+experimental/iterator memory
+experimental/iterator mutex
 experimental/iterator new
+experimental/iterator optional
+experimental/iterator ratio
+experimental/iterator stdexcept
+experimental/iterator streambuf
+experimental/iterator string
+experimental/iterator string_view
+experimental/iterator system_error
 experimental/iterator tuple
 experimental/iterator type_traits
 experimental/iterator typeinfo
@@ -780,6 +804,7 @@ fstream filesystem
 fstream format
 fstream functional
 fstream initializer_list
+fstream iomanip
 fstream ios
 fstream iosfwd
 fstream istream
diff --git a/libcxx/test/libcxx/transitive_includes/cxx11.csv b/libcxx/test/libcxx/transitive_includes/cxx11.csv
index 135a5fda93a16b..506b5cd02c4495 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx11.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx11.csv
@@ -577,19 +577,43 @@ expected initializer_list
 expected new
 expected type_traits
 expected version
+experimental/iterator algorithm
+experimental/iterator atomic
+experimental/iterator bit
+experimental/iterator bitset
+experimental/iterator cctype
+experimental/iterator cerrno
+experimental/iterator climits
+experimental/iterator clocale
 experimental/iterator cmath
 experimental/iterator compare
 experimental/iterator concepts
+experimental/iterator cstdarg
 experimental/iterator cstddef
 experimental/iterator cstdint
+experimental/iterator cstdio
 experimental/iterator cstdlib
 experimental/iterator cstring
+experimental/iterator ctime
+experimental/iterator cwchar
+experimental/iterator cwctype
 experimental/iterator exception
 experimental/iterator initializer_list
+experimental/iterator ios
 experimental/iterator iosfwd
 experimental/iterator iterator
 experimental/iterator limits
+experimental/iterator locale
+experimental/iterator memory
+experimental/iterator mutex
 experimental/iterator new
+experimental/iterator optional
+experimental/iterator ratio
+experimental/iterator stdexcept
+experimental/iterator streambuf
+experimental/iterator string
+experimental/iterator string_view
+experimental/iterator system_error
 experimental/iterator tuple
 experimental/iterator type_traits
 experimental/iterator typeinfo
@@ -780,6 +804,7 @@ fstream filesystem
 fstream format
 fstream functional
 fstream initializer_list
+fstream iomanip
 fstream ios
 fstream iosfwd
 fstream istream
diff --git a/libcxx/test/libcxx/transitive_includes/cxx14.csv b/libcxx/test/libcxx/transitive_includes/cxx14.csv
index f1add2e07bd0a4..828e1d62c6ec3e 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx14.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx14.csv
@@ -588,19 +588,44 @@ expected initializer_list
 expected new
 expected type_traits
 expected version
+experimental/iterator algorithm
+experimental/iterator atomic
+experimental/iterator bit
+experimental/iterator bitset
+experimental/iterator cctype
+experimental/iterator cerrno
+experimental/iterator climits
+experimental/iterator clocale
 experimental/iterator cmath
 experimental/iterator compare
 experimental/iterator concepts
+experimental/iterator cstdarg
 experimental/iterator cstddef
 experimental/iterator cstdint
+experimental/iterator cstdio
 experimental/iterator cstdlib
 experimental/iterator cstring
+experimental/iterator ctime
+experimental/iterator cwchar
+experimental/iterator cwctype
 experimental/iterator exception
+experimental/iterator execution
 experimental/iterator initializer_list
+experimental/iterator ios
 experimental/iterator iosfwd
 experimental/iterator iterator
 experimental/iterator limits
+experimental/iterator locale
+experimental/iterator memory
+experimental/iterator mutex
 experimental/iterator new
+experimental/iterator optional
+experimental/iterator ratio
+experimental/iterator stdexcept
+experimental/iterator streambuf
+experimental/iterator string
+experimental/iterator string_view
+experimental/iterator system_error
 experimental/iterator tuple
 experimental/iterator type_traits
 experimental/iterator typeinfo
@@ -800,6 +825,7 @@ fstream filesystem
 fstream format
 fstream functional
 fstream initializer_list
+fstream iomanip
 fstream ios
 fstream iosfwd
 fstream istream
diff --git a/libcxx/test/libcxx/transitive_includes/cxx17.csv b/libcxx/test/libcxx/transitive_includes/cxx17.csv
index 11847d3ef6ad48..0bee6e9beb7af1 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx17.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx17.csv
@@ -577,19 +577,43 @@ expected initializer_list
 expected new
 expected type_traits
 expected version
+experimental/iterator algorithm
+experimental/iterator atomic
+experimental/iterator bit
+experimental/iterator bitset
+experimental/iterator cctype
+experimental/iterator cerrno
+experimental/iterator climits
+experimental/iterator clocale
 experimental/iterator cmath
 experimental/iterator compare
 experimental/iterator concepts
+experimental/iterator cstdarg
 experimental/iterator cstddef
 experimental/iterator cstdint
+experimental/iterator cstdio
 experimental/iterator cstdlib
 experimental/iterator cstring
+experimental/iterator ctime
+experimental/iterator cwchar
+experimental/iterator cwctype
 experimental/iterator exception
 experimental/iterator initializer_list
+experimental/iterator ios
 experimental/iterator iosfwd
 experimental/iterator iterator
 experimental/iterator limits
+experimental/iterator locale
+experimental/iterator memory
+experimental/iterator mutex
 experimental/iterator new
+experimental/iterator optional
+experimental/iterator ratio
+experimental/iterator stdexcept
+experimental/iterator streambuf
+experimental/iterator string
+experimental/iterator string_view
+experimental/iterator system_error
 experimental/iterator tuple
 experimental/iterator type_traits
 experimental/iterator typeinfo
diff --git a/libcxx/test/libcxx/transitive_includes/cxx20.csv b/libcxx/test/libcxx/transitive_includes/cxx20.csv
index 72231fd80555d8..026c26f3bd9819 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx20.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx20.csv
@@ -565,19 +565,43 @@ expected initializer_list
 expected new
 expected type_traits
 expected version
+experimental/iterator algorithm
+experimental/iterator atomic
+experimental/iterator bit
+experimental/iterator bitset
+experimental/iterator cctype
+experimental/iterator cerrno
+experimental/iterator climits
+experimental/iterator clocale
 experimental/iterator cmath
 experimental/iterator compare
 experimental/iterator concepts
+experimental/iterator cstdarg
 experimental/iterator cstddef
 experimental/iterator cstdint
+experimental/iterator cstdio
 experimental/iterator cstdlib
 experimental/iterator cstring
+experimental/iterator ctime
+experimental/iterator cwchar
+experimental/iterator cwctype
 experimental/iterator exception
 experimental/iterator initializer_list
+experimental/iterator ios
 experimental/iterator iosfwd
 experimental/iterator iterator
 experimental/iterator limits
+experimental/iterator locale
+experimental/iterator memory
+experimental/iterator mutex
 experimental/iterator new
+experimental/iterator optional
+experimental/iterator ratio
+experimental/iterator stdexcept
+experimental/iterator streambuf
+experimental/iterator string
+experimental/iterator string_view
+experimental/iterator system_error
 experimental/iterator tuple
 experimental/iterator type_traits
 experimental/iterator typeinfo
diff --git a/libcxx/test/libcxx/transitive_includes/cxx23.csv b/libcxx/test/libcxx/transitive_includes/cxx23.csv
index 453f139f542bf3..861fd2bb9ba98f 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx23.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx23.csv
@@ -299,16 +299,35 @@ expected cstdint
 expected initializer_list
 expected new
 expected version
+experimental/iterator bitset
+experimental/iterator cctype
+experimental/iterator cerrno
+experimental/iterator climits
+experimental/iterator clocale
 experimental/iterator compare
 experimental/iterator concepts
 experimental/iterator cstddef
 experimental/iterator cstdint
+experimental/iterator cstdio
+experimental/iterator cstdlib
 experimental/iterator cstring
+experimental/iterator ctime
+experimental/iterator cwchar
+experimental/iterator cwctype
 experimental/iterator initializer_list
+experimental/iterator ios
 experimental/iterator iosfwd
 experimental/iterator iterator
 experimental/iterator limits
+experimental/iterator locale
 experimental/iterator new
+experimental/iterator ratio
+experimental/iterator stdexcept
+experimental/iterator streambuf
+experimental/iterator string
+experimental/iterator string_view
+experimental/iterator tuple
+experimental/iterator typeinfo
 experimental/iterator variant
 experimental/iterator version
 experimental/memory cstddef
diff --git a/libcxx/test/libcxx/transitive_includes/cxx26.csv b/libcxx/test/libcxx/transitive_includes/cxx26.csv
index 453f139f542bf3..a31139f1ee8565 100644
--- a/libcxx/test/libcxx/transitive_includes/cxx26.csv
+++ b/libcxx/test/libcxx/transitive_includes/cxx26.csv
@@ -299,16 +299,35 @@ expected cstdint
 expected initializer_list
 expected new
 expected version
+experimental/iterator bitset
+experimental/iterator cctype
+experimental/iterator cerrno
+experimental/iterator climits
+experimental/iterator clocale
 experimental/iterator compare
 experimental/iterator concepts
 experimental/iterator cstddef
 experimental/iterator cstdint
+experimental/iterator cstdio
+experimental/iterator cstdlib
 experimental/iterator cstring
+experimental/iterator ctime
+experimental/iterator cwchar
+experimental/iterator cwctype
 experimental/iterator initializer_list
+experimental/iterator ios
 experimental/iterator iosfwd
 experimental/iterator iterator
 experimental/iterator limits
+experimental/iterator locale
 experimental/iterator new
+experimental/iterator ratio
+experimental/iterator stdexcept
+experimental/iterator streambuf
+experimental/iterator string
+experimental/iterator string_view
+experimental/iterator tuple
+experimental/iterator typeinfo
 experimental/iterator variant
 experimental/iterator version
 experimental/memory cstddef
@@ -415,7 +434,6 @@ fstream cstring
 fstream ctime
 fstream cwchar
 fstream cwctype
-fstream filesystem
 fstream format
 fstream initializer_list
 fstream iomanip
diff --git a/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/arg_t.compile.pass.cpp b/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/arg_t.compile.pass.cpp
index 88039f7f68f04f..8ecca81cdfe581 100644
--- a/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/arg_t.compile.pass.cpp
+++ b/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/arg_t.compile.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <format>
 
+#include <cstdint>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/libcxx/utilities/format/format.string/format.string.std/escaped_output.pass.cpp b/libcxx/test/libcxx/utilities/format/format.string/format.string.std/escaped_output.pass.cpp
index 298bbe6b0cb3b2..430495e1aba8ee 100644
--- a/libcxx/test/libcxx/utilities/format/format.string/format.string.std/escaped_output.pass.cpp
+++ b/libcxx/test/libcxx/utilities/format/format.string/format.string.std/escaped_output.pass.cpp
@@ -18,9 +18,10 @@
 // assumptions of the size and speed optimizations are still valid.
 
 #include <algorithm>
-#include <numeric>
-#include <format>
 #include <cassert>
+#include <format>
+#include <functional>
+#include <numeric>
 
 // Contains the entries for [format.string.escaped]/2.2.1.2.1
 //   CE is a Unicode encoding and C corresponds to a UCS scalar value whose
diff --git a/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp
index 6d3a9f3856411b..4d1010522f2fb9 100644
--- a/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp
+++ b/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_1_2_3.pass.cpp
@@ -56,8 +56,9 @@
 //       objects that are equally or less cv-qualified.
 
 #include <functional>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 #include "invoke_helpers.h"
diff --git a/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp
index 44b706cdfda357..0df59290824bb3 100644
--- a/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp
+++ b/libcxx/test/libcxx/utilities/function.objects/func.require/bullet_4_5_6.pass.cpp
@@ -38,8 +38,9 @@
 //   8) reference_wrapper's are properly unwrapped before invoking the function.
 
 #include <functional>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 #include "invoke_helpers.h"
diff --git a/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.verify.cpp b/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.verify.cpp
index 31bc53d3aac43b..26ecfe66e3e4dd 100644
--- a/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.verify.cpp
+++ b/libcxx/test/libcxx/utilities/memory/util.smartptr/util.smartptr.shared/function_type_default_deleter.verify.cpp
@@ -9,6 +9,7 @@
 // UNSUPPORTED: c++03
 
 #include <memory>
+#include <cstddef>
 #include <type_traits>
 
 template <int> struct Tag {};
diff --git a/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp b/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp
index 5d0c5586d9b3d5..89f08088921d59 100644
--- a/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp
+++ b/libcxx/test/libcxx/utilities/meta/meta_base.pass.cpp
@@ -16,6 +16,7 @@ TEST_CLANG_DIAGNOSTIC_IGNORED("-Wprivate-header")
 #include <__type_traits/negation.h>
 #include <cassert>
 #include <type_traits>
+#include <utility>
 
 struct Bomb;
 template <int N, class T = Bomb >
diff --git a/libcxx/test/libcxx/utilities/utility/__murmur2_or_cityhash.abi-v1.pass.cpp b/libcxx/test/libcxx/utilities/utility/__murmur2_or_cityhash.abi-v1.pass.cpp
index cdaaacad282eff..649ff18a863f60 100644
--- a/libcxx/test/libcxx/utilities/utility/__murmur2_or_cityhash.abi-v1.pass.cpp
+++ b/libcxx/test/libcxx/utilities/utility/__murmur2_or_cityhash.abi-v1.pass.cpp
@@ -16,6 +16,7 @@
 // REQUIRES: libcpp-abi-version=1
 
 #include <cassert>
+#include <cstdint>
 #include <string>
 #include <utility>
 
diff --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp
index d5f162bced4161..f1ba7d49eed4fa 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp
@@ -13,8 +13,9 @@
 //                  UniformRandomNumberGenerator& g);
 
 #include <algorithm>
-#include <random>
 #include <cassert>
+#include <random>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp
index dd37555ffcce59..2a51127a459146 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/mismatch.pass.cpp
@@ -33,6 +33,8 @@
 #include <algorithm>
 #include <array>
 #include <cassert>
+#include <functional>
+#include <utility>
 #include <vector>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/complexity.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/complexity.pass.cpp
index c7ab3626044748..7e7cc2f9502daf 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/complexity.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/complexity.pass.cpp
@@ -16,6 +16,7 @@
 #include <algorithm>
 #include <cassert>
 #include <random>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp
index ff69f39f6c06dc..e62410e3a948be 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp
@@ -25,8 +25,10 @@
 #include <array>
 #include <concepts>
 #include <functional>
+#include <memory>
 #include <random>
 #include <ranges>
+#include <vector>
 
 #include "almost_satisfies_types.h"
 #include "test_iterators.h"
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
index ebff401cac297d..bcde2323ad1deb 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
@@ -15,9 +15,10 @@
 //   inplace_merge(Iter first, Iter middle, Iter last, Compare comp);
 
 #include <algorithm>
+#include <cassert>
 #include <functional>
 #include <random>
-#include <cassert>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.merge/pstl.merge.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.merge/pstl.merge.pass.cpp
index ade15ce0b70854..099e77e6eab6d6 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.merge/pstl.merge.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.merge/pstl.merge.pass.cpp
@@ -28,6 +28,7 @@
 #include <algorithm>
 #include <array>
 #include <cassert>
+#include <functional>
 #include <iterator>
 #include <numeric>
 #include <vector>
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/pstl.sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/pstl.sort.pass.cpp
index ecde9969001036..0724e746eab4af 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/pstl.sort.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/pstl.sort.pass.cpp
@@ -21,6 +21,7 @@
 
 #include <algorithm>
 #include <cassert>
+#include <functional>
 #include <numeric>
 #include <random>
 #include <vector>
diff --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
index 765e50e72d4aa1..4301d22027de85 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/stable_sort.pass.cpp
@@ -18,6 +18,7 @@
 #include <cassert>
 #include <iterator>
 #include <random>
+#include <vector>
 
 #include "count_new.h"
 #include "test_macros.h"
diff --git a/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp b/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp
index 85fe6fbe10ef59..acd7640b418eb7 100644
--- a/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp
+++ b/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp
@@ -19,6 +19,8 @@
 #include <initializer_list>
 #include <iterator>
 #include <ranges>
+#include <type_traits>
+
 #include "test_macros.h"
 
 struct Foo {
diff --git a/libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp b/libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp
index 0de22022526a6e..c89d6f5a229e8a 100644
--- a/libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp
+++ b/libcxx/test/std/algorithms/robust_against_proxy_iterators_lifetime_bugs.pass.cpp
@@ -16,6 +16,8 @@
 #include <cassert>
 #include <random>
 #include <set>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/algorithms/robust_re_difference_type.compile.pass.cpp b/libcxx/test/std/algorithms/robust_re_difference_type.compile.pass.cpp
index 8016cd7411509b..7d6be484301796 100644
--- a/libcxx/test/std/algorithms/robust_re_difference_type.compile.pass.cpp
+++ b/libcxx/test/std/algorithms/robust_re_difference_type.compile.pass.cpp
@@ -17,6 +17,7 @@
 #include <cstddef>
 #include <functional>
 #include <iterator>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/atomics/atomics.ref/bitwise_and_assign.pass.cpp b/libcxx/test/std/atomics/atomics.ref/bitwise_and_assign.pass.cpp
index 2be1e9962880c3..bfbd69f93845ea 100644
--- a/libcxx/test/std/atomics/atomics.ref/bitwise_and_assign.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.ref/bitwise_and_assign.pass.cpp
@@ -14,6 +14,7 @@
 #include <cassert>
 #include <concepts>
 #include <type_traits>
+#include <utility>
 
 #include "atomic_helpers.h"
 #include "test_macros.h"
diff --git a/libcxx/test/std/atomics/atomics.ref/bitwise_or_assign.pass.cpp b/libcxx/test/std/atomics/atomics.ref/bitwise_or_assign.pass.cpp
index 5c22c8a2b2b6c1..e424da7167518b 100644
--- a/libcxx/test/std/atomics/atomics.ref/bitwise_or_assign.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.ref/bitwise_or_assign.pass.cpp
@@ -14,6 +14,7 @@
 #include <cassert>
 #include <concepts>
 #include <type_traits>
+#include <utility>
 
 #include "atomic_helpers.h"
 #include "test_macros.h"
diff --git a/libcxx/test/std/atomics/atomics.ref/bitwise_xor_assign.pass.cpp b/libcxx/test/std/atomics/atomics.ref/bitwise_xor_assign.pass.cpp
index 4dc4fd307f581b..8a90d241e88e12 100644
--- a/libcxx/test/std/atomics/atomics.ref/bitwise_xor_assign.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.ref/bitwise_xor_assign.pass.cpp
@@ -14,6 +14,7 @@
 #include <cassert>
 #include <concepts>
 #include <type_traits>
+#include <utility>
 
 #include "atomic_helpers.h"
 #include "test_macros.h"
diff --git a/libcxx/test/std/atomics/atomics.ref/fetch_and.pass.cpp b/libcxx/test/std/atomics/atomics.ref/fetch_and.pass.cpp
index 8f0bec21fe7213..9d1fa846a9e66b 100644
--- a/libcxx/test/std/atomics/atomics.ref/fetch_and.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.ref/fetch_and.pass.cpp
@@ -14,6 +14,7 @@
 #include <cassert>
 #include <concepts>
 #include <type_traits>
+#include <utility>
 
 #include "atomic_helpers.h"
 #include "test_macros.h"
diff --git a/libcxx/test/std/atomics/atomics.ref/fetch_or.pass.cpp b/libcxx/test/std/atomics/atomics.ref/fetch_or.pass.cpp
index 2045868fde425a..51500e3a62beae 100644
--- a/libcxx/test/std/atomics/atomics.ref/fetch_or.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.ref/fetch_or.pass.cpp
@@ -11,9 +11,10 @@
 // integral-type fetch_or(integral-type, memory_order = memory_order::seq_cst) const noexcept;
 
 #include <atomic>
-#include <concepts>
 #include <cassert>
+#include <concepts>
 #include <type_traits>
+#include <utility>
 
 #include "atomic_helpers.h"
 #include "test_macros.h"
diff --git a/libcxx/test/std/atomics/atomics.ref/fetch_xor.pass.cpp b/libcxx/test/std/atomics/atomics.ref/fetch_xor.pass.cpp
index aade87f961f1b3..35437cbba31358 100644
--- a/libcxx/test/std/atomics/atomics.ref/fetch_xor.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.ref/fetch_xor.pass.cpp
@@ -11,9 +11,10 @@
 // integral-type fetch_xor(integral-type, memory_order = memory_order::seq_cst) const noexcept;
 
 #include <atomic>
-#include <concepts>
 #include <cassert>
+#include <concepts>
 #include <type_traits>
+#include <utility>
 
 #include "atomic_helpers.h"
 #include "test_macros.h"
diff --git a/libcxx/test/std/atomics/atomics.ref/increment_decrement.pass.cpp b/libcxx/test/std/atomics/atomics.ref/increment_decrement.pass.cpp
index c84c89b4d2b4d3..f26a0bdf3663a5 100644
--- a/libcxx/test/std/atomics/atomics.ref/increment_decrement.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.ref/increment_decrement.pass.cpp
@@ -17,6 +17,7 @@
 #include <cassert>
 #include <concepts>
 #include <type_traits>
+#include <utility>
 
 #include "atomic_helpers.h"
 #include "test_macros.h"
diff --git a/libcxx/test/std/atomics/atomics.ref/member_types.compile.pass.cpp b/libcxx/test/std/atomics/atomics.ref/member_types.compile.pass.cpp
index b085e209492f91..d0e0313434114a 100644
--- a/libcxx/test/std/atomics/atomics.ref/member_types.compile.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.ref/member_types.compile.pass.cpp
@@ -23,6 +23,8 @@
 // };
 
 #include <atomic>
+#include <cstddef>
+#include <cstdint>
 #include <type_traits>
 
 #include "test_macros.h"
@@ -92,34 +94,34 @@ void testall() {
   test<unsigned long>();
   test<unsigned long long>();
   // + any other types needed by the typedefs in the header <cstdint>
-  test<int8_t>();
-  test<int16_t>();
-  test<int32_t>();
-  test<int64_t>();
-  test<int_fast8_t>();
-  test<int_fast16_t>();
-  test<int_fast32_t>();
-  test<int_fast64_t>();
-  test<int_least8_t>();
-  test<int_least16_t>();
-  test<int_least32_t>();
-  test<int_least64_t>();
-  test<intmax_t>();
-  test<intptr_t>();
-  test<uint8_t>();
-  test<uint16_t>();
-  test<uint32_t>();
-  test<uint64_t>();
-  test<uint_fast8_t>();
-  test<uint_fast16_t>();
-  test<uint_fast32_t>();
-  test<uint_fast64_t>();
-  test<uint_least8_t>();
-  test<uint_least16_t>();
-  test<uint_least32_t>();
-  test<uint_least64_t>();
-  test<uintmax_t>();
-  test<uintptr_t>();
+  test<std::int8_t>();
+  test<std::int16_t>();
+  test<std::int32_t>();
+  test<std::int64_t>();
+  test<std::int_fast8_t>();
+  test<std::int_fast16_t>();
+  test<std::int_fast32_t>();
+  test<std::int_fast64_t>();
+  test<std::int_least8_t>();
+  test<std::int_least16_t>();
+  test<std::int_least32_t>();
+  test<std::int_least64_t>();
+  test<std::intmax_t>();
+  test<std::intptr_t>();
+  test<std::uint8_t>();
+  test<std::uint16_t>();
+  test<std::uint32_t>();
+  test<std::uint64_t>();
+  test<std::uint_fast8_t>();
+  test<std::uint_fast16_t>();
+  test<std::uint_fast32_t>();
+  test<std::uint_fast64_t>();
+  test<std::uint_least8_t>();
+  test<std::uint_least16_t>();
+  test<std::uint_least32_t>();
+  test<std::uint_least64_t>();
+  test<std::uintmax_t>();
+  test<std::uintptr_t>();
 
   // Specialization for floating-point types
   // + floating-point types
diff --git a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp
index 55ddaab92f5a3c..2648b2914c1a5c 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/atomics.types.float/load.pass.cpp
@@ -11,10 +11,11 @@
 //  floating-point-type load(memory_order = memory_order::seq_cst) volatile noexcept;
 //  floating-point-type load(memory_order = memory_order::seq_cst) noexcept;
 
-#include <algorithm>
 #include <atomic>
+#include <algorithm>
 #include <cassert>
 #include <concepts>
+#include <memory>
 #include <ranges>
 #include <type_traits>
 #include <vector>
diff --git a/libcxx/test/std/atomics/atomics.types.generic/cstdint_typedefs.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/cstdint_typedefs.pass.cpp
index 0867007b36f1bc..fda0f5f6be0d63 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/cstdint_typedefs.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/cstdint_typedefs.pass.cpp
@@ -34,8 +34,9 @@
 // typedef atomic<uintmax_t> atomic_uintmax_t;
 
 #include <atomic>
-#include <type_traits>
+#include <cstddef>
 #include <cstdint>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/atomics/atomics.types.generic/integral_typedefs.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/integral_typedefs.pass.cpp
index 5e52cdec28cafd..fa13ba1d9560a3 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/integral_typedefs.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/integral_typedefs.pass.cpp
@@ -37,6 +37,7 @@
 // typedef atomic<uint64_t>           atomic_uint64_t;
 
 #include <atomic>
+#include <cstdint>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp b/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
index 29881891ffd11e..85d93379878359 100644
--- a/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
+++ b/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
@@ -114,6 +114,8 @@
 // using std::atomic_signal_fence                         // see below
 
 #include <stdatomic.h>
+#include <cstddef>
+#include <cstdint>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/atomics/types.pass.cpp b/libcxx/test/std/atomics/types.pass.cpp
index cebf66ee7f1af0..33512c037804f8 100644
--- a/libcxx/test/std/atomics/types.pass.cpp
+++ b/libcxx/test/std/atomics/types.pass.cpp
@@ -19,6 +19,7 @@
 
 #include <atomic>
 #include <chrono>
+#include <cstdint>
 #include <memory>
 #include <type_traits>
 
diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp
index 633d9acca162cf..b865888eaf7958 100644
--- a/libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.modifiers/insert_or_assign.pass.cpp
@@ -23,6 +23,7 @@
 
 #include <map>
 #include <cassert>
+#include <iterator>
 #include <tuple>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/containers/associative/map/map.modifiers/try.emplace.pass.cpp b/libcxx/test/std/containers/associative/map/map.modifiers/try.emplace.pass.cpp
index cfa0921d399140..3f7a83c2b5418b 100644
--- a/libcxx/test/std/containers/associative/map/map.modifiers/try.emplace.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.modifiers/try.emplace.pass.cpp
@@ -23,6 +23,7 @@
 
 #include <map>
 #include <cassert>
+#include <iterator>
 #include <tuple>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy.pass.cpp
index fc1a3f57a602a5..9d643199e6b9a7 100644
--- a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <set>
 #include <cassert>
+#include <iterator>
 
 #include "test_macros.h"
 #include "../../../test_compare.h"
diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_alloc.pass.cpp
index 9b6c3d73087814..ece846c63ec8e6 100644
--- a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_alloc.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_alloc.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <set>
 #include <cassert>
+#include <iterator>
 
 #include "test_macros.h"
 #include "../../../test_compare.h"
diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp
index 5a048b05cc4e83..6835020a982232 100644
--- a/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/copy_assign.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <set>
 #include <cassert>
+#include <iterator>
 
 #include "test_macros.h"
 #include "../../../test_compare.h"
diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp
index 5ff3200e1c4025..4abbddb8c15d4f 100644
--- a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare.pass.cpp
@@ -16,6 +16,8 @@
 
 #include <set>
 #include <cassert>
+#include <iterator>
+
 #include "test_macros.h"
 #include "../../../test_compare.h"
 
diff --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp
index 9c69495856bba7..8234fe3ab7fee0 100644
--- a/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/initializer_list_compare_alloc.pass.cpp
@@ -16,6 +16,8 @@
 
 #include <set>
 #include <cassert>
+#include <iterator>
+
 #include "test_macros.h"
 #include "../../../test_compare.h"
 #include "test_allocator.h"
diff --git a/libcxx/test/std/containers/associative/set/set.cons/copy.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/copy.pass.cpp
index 2ce9c9702ad067..1d27cfbd3e722d 100644
--- a/libcxx/test/std/containers/associative/set/set.cons/copy.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/set.cons/copy.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <set>
 #include <cassert>
+#include <iterator>
 
 #include "test_macros.h"
 #include "../../../test_compare.h"
diff --git a/libcxx/test/std/containers/associative/set/set.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/copy_alloc.pass.cpp
index 3fe34bcbd53693..9d988d84a3795c 100644
--- a/libcxx/test/std/containers/associative/set/set.cons/copy_alloc.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/set.cons/copy_alloc.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <set>
 #include <cassert>
+#include <iterator>
 
 #include "test_macros.h"
 #include "../../../test_compare.h"
diff --git a/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp
index 1ddcd85db73395..7d35ab62effa6a 100644
--- a/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/set.cons/copy_assign.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <set>
 #include <cassert>
+#include <iterator>
 
 #include "test_macros.h"
 #include "../../../test_compare.h"
diff --git a/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp
index 2a00aaede1aa27..f097ac85495562 100644
--- a/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare.pass.cpp
@@ -16,6 +16,8 @@
 
 #include <set>
 #include <cassert>
+#include <iterator>
+
 #include "test_macros.h"
 #include "../../../test_compare.h"
 
diff --git a/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp
index 9f9234024c05cb..46785ef3310c1b 100644
--- a/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/set.cons/initializer_list_compare_alloc.pass.cpp
@@ -17,6 +17,8 @@
 
 #include <set>
 #include <cassert>
+#include <iterator>
+
 #include "test_macros.h"
 #include "../../../test_compare.h"
 #include "test_allocator.h"
diff --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/dtor_noexcept.pass.cpp
index 71e806cdd3cea5..147e70ef27b959 100644
--- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/dtor_noexcept.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <queue>
 #include <cassert>
+#include <type_traits>
 
 #include "test_macros.h"
 #include "MoveOnly.h"
diff --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/dtor_noexcept.pass.cpp
index 3486604006400c..0d53f47961f84a 100644
--- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/dtor_noexcept.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <queue>
 #include <cassert>
+#include <type_traits>
 
 #include "test_macros.h"
 #include "MoveOnly.h"
diff --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/dtor_noexcept.pass.cpp
index a73a04b065cbf2..b6015c1e1ac310 100644
--- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/dtor_noexcept.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <stack>
 #include <cassert>
+#include <type_traits>
 
 #include "test_macros.h"
 #include "MoveOnly.h"
diff --git a/libcxx/test/std/containers/views/mdspan/layout_left/properties.pass.cpp b/libcxx/test/std/containers/views/mdspan/layout_left/properties.pass.cpp
index cca1c65f088f17..19f523824cfc48 100644
--- a/libcxx/test/std/containers/views/mdspan/layout_left/properties.pass.cpp
+++ b/libcxx/test/std/containers/views/mdspan/layout_left/properties.pass.cpp
@@ -31,6 +31,7 @@
 #include <concepts>
 #include <span> // dynamic_extent
 #include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/containers/views/mdspan/layout_right/properties.pass.cpp b/libcxx/test/std/containers/views/mdspan/layout_right/properties.pass.cpp
index 120cefd619a3a7..674a7ac98cbf7b 100644
--- a/libcxx/test/std/containers/views/mdspan/layout_right/properties.pass.cpp
+++ b/libcxx/test/std/containers/views/mdspan/layout_right/properties.pass.cpp
@@ -31,6 +31,7 @@
 #include <concepts>
 #include <span> // dynamic_extent
 #include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/containers/views/mdspan/layout_stride/deduction.pass.cpp b/libcxx/test/std/containers/views/mdspan/layout_stride/deduction.pass.cpp
index 45e2a1c10d6ff4..ca88a9f8e0440e 100644
--- a/libcxx/test/std/containers/views/mdspan/layout_stride/deduction.pass.cpp
+++ b/libcxx/test/std/containers/views/mdspan/layout_stride/deduction.pass.cpp
@@ -17,6 +17,7 @@
 #include <cstdint>
 #include <span> // dynamic_extent
 #include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp
index 0f47a513ea0e86..189e9d890e7784 100644
--- a/libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp
+++ b/libcxx/test/std/depr/depr.c.headers/math_h.pass.cpp
@@ -103,7 +103,7 @@ Ambiguous scalbn(Ambiguous, Ambiguous){ return Ambiguous(); }
 Ambiguous tgamma(Ambiguous){ return Ambiguous(); }
 Ambiguous trunc(Ambiguous){ return Ambiguous(); }
 
-template <class T, class = decltype(::abs(std::declval<T>()))>
+template <class T, class = decltype(::abs(T()))>
 std::true_type has_abs_imp(int);
 template <class T>
 std::false_type has_abs_imp(...);
diff --git a/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp b/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
index ee70ed0c34b948..587c6b6e10ddb6 100644
--- a/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
+++ b/libcxx/test/std/depr/depr.c.headers/stdlib_h.pass.cpp
@@ -9,8 +9,9 @@
 // test <stdlib.h>
 
 #include <stdlib.h>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
index 2e07d090d23b43..131193380e58c9 100644
--- a/libcxx/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
+++ b/libcxx/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
@@ -6,16 +6,15 @@
 //
 //===----------------------------------------------------------------------===//
 
-// <functional>
-
-// template <class T>
-// struct hash
-// {
-//     size_t operator()(T val) const;
-// };
+// <system_error>
+//
+// template <>
+// struct hash<error_code>;
 
 #include <system_error>
 #include <cassert>
+#include <cstddef>
+#include <functional>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp
index bf016e1e55837b..0ecb30d11e3d81 100644
--- a/libcxx/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp
+++ b/libcxx/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp
@@ -6,16 +6,15 @@
 //
 //===----------------------------------------------------------------------===//
 
-// <functional>
-
-// template <class T>
-// struct hash
-// {
-//     size_t operator()(T val) const;
-// };
+// <system_error>
+//
+// template <>
+// struct hash<error_condition>;
 
 #include <system_error>
 #include <cassert>
+#include <cstddef>
+#include <functional>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/experimental/memory/memory.observer.ptr/hash.pass.cpp b/libcxx/test/std/experimental/memory/memory.observer.ptr/hash.pass.cpp
index fff5f9bae07337..edf38e5344bac1 100644
--- a/libcxx/test/std/experimental/memory/memory.observer.ptr/hash.pass.cpp
+++ b/libcxx/test/std/experimental/memory/memory.observer.ptr/hash.pass.cpp
@@ -17,6 +17,7 @@
 
 #include <experimental/memory>
 #include <cassert>
+#include <functional>
 
 #include "poisoned_hash_helper.h"
 
diff --git a/libcxx/test/std/experimental/simd/simd.reference/reference_arith_operators.pass.cpp b/libcxx/test/std/experimental/simd/simd.reference/reference_arith_operators.pass.cpp
index 2a4a1346db0bce..43fc48557c49cc 100644
--- a/libcxx/test/std/experimental/simd/simd.reference/reference_arith_operators.pass.cpp
+++ b/libcxx/test/std/experimental/simd/simd.reference/reference_arith_operators.pass.cpp
@@ -17,8 +17,10 @@
 // template<class U> reference/=(U&& x) && noexcept;
 // template<class U> reference%=(U&& x) && noexcept;
 
-#include "../test_utils.h"
 #include <experimental/simd>
+#include <functional>
+
+#include "../test_utils.h"
 
 namespace ex = std::experimental::parallelism_v2;
 
diff --git a/libcxx/test/std/experimental/simd/simd.reference/reference_bitwise_operators.pass.cpp b/libcxx/test/std/experimental/simd/simd.reference/reference_bitwise_operators.pass.cpp
index 340b92c4006dc6..b3c9b953c74483 100644
--- a/libcxx/test/std/experimental/simd/simd.reference/reference_bitwise_operators.pass.cpp
+++ b/libcxx/test/std/experimental/simd/simd.reference/reference_bitwise_operators.pass.cpp
@@ -17,8 +17,10 @@
 // template<class U> reference<<=(U&& x) && noexcept;
 // template<class U> reference>>=(U&& x) && noexcept;
 
-#include "../test_utils.h"
 #include <experimental/simd>
+#include <functional>
+
+#include "../test_utils.h"
 
 namespace ex = std::experimental::parallelism_v2;
 
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign.pass.cpp
index 8614ff87966fdb..17040bcb127799 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign.pass.cpp
@@ -13,9 +13,11 @@
 // template <class U> propagate_const& propagate_const::operator=(propagate_const<U>&&);
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <utility>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible.pass.cpp
index 2e4d1e29bd5c65..d22f3035aee38c 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible.pass.cpp
@@ -13,9 +13,11 @@
 // template <class U> propagate_const& propagate_const::operator=(propagate_const<U>&&);
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <utility>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible_propagate_const.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible_propagate_const.pass.cpp
index d587cb041acd37..a55ef74bb15e3c 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible_propagate_const.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible_propagate_const.pass.cpp
@@ -13,9 +13,11 @@
 // template <class U> constexpr propagate_const& operator=(propagate_const<_Up>&& pu);
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <utility>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.move_ctor.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.move_ctor.pass.cpp
index 81d874fb07d629..9c33d01f80d814 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.move_ctor.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.move_ctor.pass.cpp
@@ -13,9 +13,11 @@
 // template <class U> constexpr propagate_const(propagate_const<_Up>&& pu);
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <utility>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp
index dbf2ef0eaa3db4..a282897f701b6a 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/move_ctor.pass.cpp
@@ -13,9 +13,11 @@
 // propagate_const(propagate_const&&)=default;
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <utility>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp
index 64f939c7cbc1b3..fb0c607b73de0a 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/hash.pass.cpp
@@ -13,9 +13,12 @@
 // template <class T> struct hash<experimental::fundamentals_v2::propagate_const<T>>;
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <cstddef>
+#include <functional>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/equal_to.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/equal_to.pass.cpp
index 16bb27e7cba5f4..477c9401d26227 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/equal_to.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/equal_to.pass.cpp
@@ -13,9 +13,11 @@
 // template <class T> struct equal_to<experimental::fundamentals_v2::propagate_const<T>>;
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <functional>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater.pass.cpp
index ba104b5a21913d..3d0c0634c7bfb9 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater.pass.cpp
@@ -13,9 +13,11 @@
 // template <class T> struct greater<experimental::fundamentals_v2::propagate_const<T>>;
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <functional>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater_equal.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater_equal.pass.cpp
index d256a4ad0514e8..b72fcd7142a59f 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater_equal.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater_equal.pass.cpp
@@ -13,9 +13,11 @@
 // template <class T> struct greater_equal<experimental::fundamentals_v2::propagate_const<T>>;
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <functional>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less.pass.cpp
index c723be4d4473a1..0b81ecb681e656 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less.pass.cpp
@@ -13,9 +13,11 @@
 // template <class T> struct less<experimental::fundamentals_v2::propagate_const<T>>;
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <functional>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less_equal.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less_equal.pass.cpp
index 1960b3f4ddb5f7..7b125a26d93266 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less_equal.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/less_equal.pass.cpp
@@ -13,9 +13,11 @@
 // template <class T> struct less_equal<experimental::fundamentals_v2::propagate_const<T>>;
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <functional>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/not_equal_to.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/not_equal_to.pass.cpp
index 95869e7a073bec..6b3ccbc9bd5663 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/not_equal_to.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/not_equal_to.pass.cpp
@@ -13,9 +13,11 @@
 // template <class T> struct not_equal_to<experimental::fundamentals_v2::propagate_const<T>>;
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <functional>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/equal.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/equal.pass.cpp
index 0c1925390133dd..cd9ff5634dc712 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/equal.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/equal.pass.cpp
@@ -15,9 +15,11 @@
 // template <class T> constexpr bool operator==(const propagate_const<T>& x, const T& y);
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <cstddef>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 using std::nullptr_t;
diff --git a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/not_equal.pass.cpp b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/not_equal.pass.cpp
index a3b85b7cdd7c8e..b22a59632637bb 100644
--- a/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/not_equal.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.relops/not_equal.pass.cpp
@@ -15,9 +15,11 @@
 // template <class T> constexpr bool operator!=(const propagate_const<T>& x, const T& y);
 
 #include <experimental/propagate_const>
+#include <cassert>
+#include <cstddef>
+
 #include "test_macros.h"
 #include "propagate_const_helpers.h"
-#include <cassert>
 
 using std::experimental::propagate_const;
 using std::nullptr_t;
diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.basic/iterator.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.basic/iterator.pass.cpp
index c04f15e60b925b..d588776d5d3df5 100644
--- a/libcxx/test/std/iterators/iterator.primitives/iterator.basic/iterator.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/iterator.basic/iterator.pass.cpp
@@ -22,6 +22,7 @@
 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
 
 #include <iterator>
+#include <cstddef>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_pointer.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_pointer.pass.cpp
index 7090a30a80f9ec..eef05b6a0273e1 100644
--- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_pointer.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_pointer.pass.cpp
@@ -19,6 +19,7 @@
 // };
 
 #include <iterator>
+#include <cstddef>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_volatile_pointer.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_volatile_pointer.pass.cpp
index e410d3d57470e3..0138e368c15f68 100644
--- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_volatile_pointer.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/const_volatile_pointer.pass.cpp
@@ -12,6 +12,7 @@
 // struct iterator_traits<const T*>
 
 #include <iterator>
+#include <cstddef>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/pointer.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/pointer.pass.cpp
index 4cf214a8be87dd..a0ce256fb58c7c 100644
--- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/pointer.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/pointer.pass.cpp
@@ -20,6 +20,7 @@
 // };
 
 #include <iterator>
+#include <cstddef>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/volatile_pointer.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/volatile_pointer.pass.cpp
index c6d5dfc74c432d..6ae502e8c8605e 100644
--- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/volatile_pointer.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/volatile_pointer.pass.cpp
@@ -12,6 +12,7 @@
 // struct iterator_traits<const T*>
 
 #include <iterator>
+#include <cstddef>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/incrementable_traits.compile.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/incrementable_traits.compile.pass.cpp
index b1fe9e370a1cb5..8413f912e57620 100644
--- a/libcxx/test/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/incrementable_traits.compile.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.requirements/iterator.assoc.types/incrementable.traits/incrementable_traits.compile.pass.cpp
@@ -14,6 +14,7 @@
 #include <iterator>
 
 #include <concepts>
+#include <cstddef>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sentinel_for.compile.pass.cpp b/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sentinel_for.compile.pass.cpp
index 368825664e7db2..d60b0b7faa7ba3 100644
--- a/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sentinel_for.compile.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/iterator.concept.sentinel/sentinel_for.compile.pass.cpp
@@ -12,6 +12,7 @@
 // concept sentinel_for;
 
 #include <iterator>
+#include <cstddef>
 
 static_assert(std::sentinel_for<int*, int*>);
 static_assert(!std::sentinel_for<int*, long*>);
diff --git a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/sfinae.compile.pass.cpp b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/sfinae.compile.pass.cpp
index 8ead39231c0ba5..ca3518dfb6388d 100644
--- a/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/sfinae.compile.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.cmp/sfinae.compile.pass.cpp
@@ -43,6 +43,7 @@
 
 #include <iterator>
 #include <cassert>
+#include <cstddef>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable.compile.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable.compile.pass.cpp
index d1114e540052f9..0332f3150aa7c5 100644
--- a/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable.compile.pass.cpp
+++ b/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable.compile.pass.cpp
@@ -12,6 +12,7 @@
 // concept three_way_comparable = // see below
 
 #include <compare>
+#include <cstddef>
 
 #include "compare_types.h"
 #include "test_macros.h"
diff --git a/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable_with.compile.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable_with.compile.pass.cpp
index 50d9722aa29c03..aa2ab1c0e9ef1a 100644
--- a/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable_with.compile.pass.cpp
+++ b/libcxx/test/std/language.support/cmp/cmp.concept/three_way_comparable_with.compile.pass.cpp
@@ -12,6 +12,7 @@
 // concept three_way_comparable_with = // see below
 
 #include <compare>
+#include <cstddef>
 
 #include "compare_types.h"
 
diff --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp
index 852424f966cfc4..521561cd6a2cdc 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp
@@ -16,8 +16,9 @@
 // coroutine_handle& operator=(nullptr_t) noexcept
 
 #include <coroutine>
-#include <type_traits>
 #include <cassert>
+#include <cstddef>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp
index fd078a52fedc13..8b5057880de9bf 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp
@@ -17,8 +17,9 @@
 // constexpr coroutine_handle(nullptr_t) noexcept
 
 #include <coroutine>
-#include <type_traits>
 #include <cassert>
+#include <cstddef>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/language.support/support.dynamic/destroying_delete_t_declaration.pass.cpp b/libcxx/test/std/language.support/support.dynamic/destroying_delete_t_declaration.pass.cpp
index 1270853a1ccabf..6835246c3bcc0c 100644
--- a/libcxx/test/std/language.support/support.dynamic/destroying_delete_t_declaration.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/destroying_delete_t_declaration.pass.cpp
@@ -22,6 +22,8 @@
 #include <new>
 
 #include <cassert>
+#include <type_traits>
+
 #include "test_macros.h"
 #include "test_convertible.h"
 
diff --git a/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp b/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp
index 823417f8a418eb..a1f7e1143a1e9b 100644
--- a/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp
+++ b/libcxx/test/std/language.support/support.runtime/cstdlib.pass.cpp
@@ -9,8 +9,9 @@
 // test <cstdlib>
 
 #include <cstdlib>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/language.support/support.types/nullptr_t.pass.cpp b/libcxx/test/std/language.support/support.types/nullptr_t.pass.cpp
index 768cf6656fe827..2536be8c8b6640 100644
--- a/libcxx/test/std/language.support/support.types/nullptr_t.pass.cpp
+++ b/libcxx/test/std/language.support/support.types/nullptr_t.pass.cpp
@@ -7,8 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #include <cstddef>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp b/libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp
index b26b3970563436..5a2ee189641c74 100644
--- a/libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp
+++ b/libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp
@@ -14,12 +14,14 @@
 
 #include <algorithm>
 #include <concepts>
+#include <functional>
 #include <iterator>
 #include <memory>
 #include <random>
 #include <ranges>
 #include <type_traits>
 #include <utility>
+
 #include "test_macros.h"
 
 // Niebloids, unlike CPOs, are *not* required to be semiregular or even to have
diff --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp
index 90dd81885ac21c..a40c602fb0fc47 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp
@@ -20,8 +20,9 @@
 // XFAIL: no-wide-characters
 
 #include <locale>
-#include <codecvt>
 #include <cassert>
+#include <codecvt>
+#include <type_traits>
 
 #include "test_macros.h"
 #if TEST_STD_VER >= 11
diff --git a/libcxx/test/std/numerics/c.math/cmath.pass.cpp b/libcxx/test/std/numerics/c.math/cmath.pass.cpp
index 34c30fb998f474..fc3dcfd7b48347 100644
--- a/libcxx/test/std/numerics/c.math/cmath.pass.cpp
+++ b/libcxx/test/std/numerics/c.math/cmath.pass.cpp
@@ -12,11 +12,12 @@
 
 // <cmath>
 
-#include <array>
 #include <cmath>
+#include <array>
+#include <cassert>
 #include <limits>
 #include <type_traits>
-#include <cassert>
+#include <utility>
 
 #include "fp_compare.h"
 #include "test_macros.h"
diff --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/result_type.pass.cpp
index 469d3803795781..e712953c52f9b4 100644
--- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/result_type.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.disc/result_type.pass.cpp
@@ -16,6 +16,7 @@
 //     typedef typename Engine::result_type result_type;
 
 #include <random>
+#include <cstdint>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bernoulli/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bernoulli/eval.pass.cpp
index 568bf34f1ea437..a8cda553cdfb19 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bernoulli/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bernoulli/eval.pass.cpp
@@ -13,10 +13,11 @@
 // template<class _URNG> result_type operator()(_URNG& g);
 
 #include <random>
-#include <numeric>
-#include <vector>
 #include <cassert>
+#include <cmath>
 #include <cstddef>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bernoulli/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bernoulli/eval_param.pass.cpp
index dfaa9f1c89f991..1528bff81593e3 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bernoulli/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bernoulli/eval_param.pass.cpp
@@ -13,10 +13,11 @@
 // template<class _URNG> result_type operator()(_URNG& g, const param_type& parm);
 
 #include <random>
-#include <numeric>
-#include <vector>
 #include <cassert>
+#include <cmath>
 #include <cstddef>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.PR44847.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.PR44847.pass.cpp
index a523bb9b194b74..8f7c8eb7ccc0f9 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.PR44847.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.PR44847.pass.cpp
@@ -22,10 +22,11 @@
 // REQUIRES: long_tests
 
 #include <random>
-#include <numeric>
-#include <vector>
 #include <cassert>
+#include <cmath>
+#include <numeric>
 #include <sstream>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
index d8852cc3bd09ed..dcd3c08660e040 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
@@ -16,6 +16,7 @@
 // template<class _URNG> result_type operator()(_URNG& g);
 
 #include <cassert>
+#include <cmath>
 #include <cstdint>
 #include <numeric>
 #include <random>
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp
index adbcb78d10f4f2..18ea053db21f2a 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval_param.pass.cpp
@@ -16,9 +16,10 @@
 // template<class _URNG> result_type operator()(_URNG& g, const param_type& parm);
 
 #include <random>
+#include <cassert>
+#include <cmath>
 #include <numeric>
 #include <vector>
-#include <cassert>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp
index 0cdb7fa6312caf..6a81dd0c7c0113 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp
@@ -15,10 +15,11 @@
 
 // template<class _URNG> result_type operator()(_URNG& g);
 
+#include <random>
 #include <cassert>
+#include <cmath>
 #include <cstdint>
 #include <numeric>
-#include <random>
 #include <vector>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp
index 16a5bd4c7a33e7..4cb885ed93e4f8 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval_param.pass.cpp
@@ -16,9 +16,10 @@
 // template<class _URNG> result_type operator()(_URNG& g, const param_type& parm);
 
 #include <random>
+#include <cassert>
+#include <cmath>
 #include <numeric>
 #include <vector>
-#include <cassert>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
index be08361fc27e21..c877a8ad9205fd 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
@@ -24,9 +24,10 @@
 // template<class _URNG> result_type operator()(_URNG& g);
 
 #include <random>
+#include <cassert>
+#include <cmath>
 #include <numeric>
 #include <vector>
-#include <cassert>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp
index 26bc83382f6850..5abae0e554339b 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval_param.pass.cpp
@@ -16,9 +16,10 @@
 // template<class _URNG> result_type operator()(_URNG& g, const param_type& parm);
 
 #include <random>
+#include <cassert>
+#include <cmath>
 #include <numeric>
 #include <vector>
-#include <cassert>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp
index 559034b2a0ec10..8a92a6ea7f63c9 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.chisq/eval.pass.cpp
@@ -17,9 +17,10 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
-#include <numeric>
+#include <cmath>
 #include <cstddef>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.chisq/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.chisq/eval_param.pass.cpp
index 74454f29626724..a7dae6dea55e6c 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.chisq/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.chisq/eval_param.pass.cpp
@@ -17,9 +17,10 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
-#include <numeric>
+#include <cmath>
 #include <cstddef>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp
index 745103d13d2859..30fdb3508ed5cf 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval.pass.cpp
@@ -17,8 +17,9 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
+#include <cmath>
 #include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp
index f9ea0bbd201ce1..05cb35ee063597 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval_param.pass.cpp
@@ -17,8 +17,9 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
+#include <cmath>
 #include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp
index b869fbde935926..f5a960e7d41d19 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.normal/eval.pass.cpp
@@ -17,9 +17,10 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
-#include <numeric>
+#include <cmath>
 #include <cstddef>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.normal/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.normal/eval_param.pass.cpp
index 3b5cae11f6fe0e..883a0833c46f98 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.normal/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.normal/eval_param.pass.cpp
@@ -17,9 +17,10 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
-#include <numeric>
+#include <cmath>
 #include <cstddef>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp
index 80ed7bab265022..fbd7b727d26d7e 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.t/eval.pass.cpp
@@ -17,8 +17,9 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
+#include <cmath>
 #include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp
index fe3140fb6f555b..b3029e8be3bbf4 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.t/eval_param.pass.cpp
@@ -17,8 +17,9 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
+#include <cmath>
 #include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp
index aee573e5f2467c..be5f650d6b0276 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.exp/eval.pass.cpp
@@ -17,9 +17,10 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
-#include <numeric>
+#include <cmath>
 #include <cstddef>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.exp/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.exp/eval_param.pass.cpp
index dfbedd81e0b976..a221558095eaa5 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.exp/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.exp/eval_param.pass.cpp
@@ -17,9 +17,10 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
-#include <numeric>
+#include <cmath>
 #include <cstddef>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp
index 3cf0feef18ece3..70b9276b3918e4 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.extreme/eval.pass.cpp
@@ -17,8 +17,9 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
+#include <cmath>
 #include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp
index 43a22511589beb..5ac843be624763 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.extreme/eval_param.pass.cpp
@@ -17,8 +17,9 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
+#include <cmath>
 #include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp
index 48cc4df02396f8..4783988a091e37 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.gamma/eval.pass.cpp
@@ -17,8 +17,9 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
+#include <cmath>
 #include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp
index c437983c6bd7b1..ba9d5e178990d7 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.gamma/eval_param.pass.cpp
@@ -17,8 +17,9 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
+#include <cmath>
 #include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp
index e5cabc08658114..b80d6105c72450 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.poisson/eval_param.pass.cpp
@@ -17,8 +17,9 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
+#include <cmath>
 #include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp
index 641f061d15a65a..1cb291b213d331 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.weibull/eval.pass.cpp
@@ -17,9 +17,10 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
-#include <numeric>
+#include <cmath>
 #include <cstddef>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.weibull/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.weibull/eval_param.pass.cpp
index a719819f58964f..6810e605281d92 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.weibull/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.weibull/eval_param.pass.cpp
@@ -17,9 +17,10 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
-#include <numeric>
+#include <cmath>
 #include <cstddef>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp
index 8ab560b15bb17e..4882e5dab72994 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval.pass.cpp
@@ -16,11 +16,12 @@
 // template<class _URNG> result_type operator()(_URNG& g);
 
 #include <random>
-#include <vector>
-#include <iterator>
-#include <numeric>
 #include <algorithm>   // for sort
 #include <cassert>
+#include <cmath>
+#include <iterator>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp
index d3964ce18e1e11..b5b447aa2a02d7 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.pconst/eval_param.pass.cpp
@@ -17,11 +17,12 @@
 
 #include <random>
 #include <algorithm>
-#include <vector>
-#include <iterator>
-#include <numeric>
 #include <cassert>
+#include <cmath>
 #include <cstddef>
+#include <iterator>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp
index 8aad0b8e4a856d..ec7f72edf9ee9b 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval.pass.cpp
@@ -17,11 +17,12 @@
 
 #include <random>
 #include <algorithm>
-#include <vector>
-#include <iterator>
-#include <numeric>
 #include <cassert>
+#include <cmath>
+#include <iterator>
 #include <limits>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp
index 4601c360193019..9bcb2ed3afac12 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.plinear/eval_param.pass.cpp
@@ -16,12 +16,13 @@
 // template<class _URNG> result_type operator()(_URNG& g, const param_type& parm);
 
 #include <random>
-#include <vector>
-#include <iterator>
-#include <numeric>
 #include <algorithm>   // for sort
 #include <cassert>
+#include <cmath>
+#include <iterator>
 #include <limits>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp
index 3a2942b74596a2..2ca213e04a8733 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp
@@ -15,13 +15,14 @@
 
 // template<class _URNG> result_type operator()(_URNG& g);
 
+#include <random>
 #include <cassert>
 #include <climits>
+#include <cmath>
 #include <cstddef>
 #include <cstdint>
 #include <limits>
 #include <numeric>
-#include <random>
 #include <vector>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.int/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.int/eval_param.pass.cpp
index 234cd3655b8337..60fde2d1bb2113 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.int/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.int/eval_param.pass.cpp
@@ -15,9 +15,10 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
-#include <numeric>
+#include <cmath>
 #include <cstddef>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/eval.pass.cpp
index b28bc6fc7c1c35..4137166a4788bf 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/eval.pass.cpp
@@ -17,9 +17,10 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
-#include <numeric>
+#include <cmath>
 #include <cstddef>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/eval_param.pass.cpp
index 2355c5fa105a53..9a9736f9f6a1ad 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/eval_param.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.real/eval_param.pass.cpp
@@ -15,9 +15,10 @@
 
 #include <random>
 #include <cassert>
-#include <vector>
-#include <numeric>
+#include <cmath>
 #include <cstddef>
+#include <numeric>
+#include <vector>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/copy.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/copy.pass.cpp
index 50389ef801397b..ad473bdc58371c 100644
--- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/copy.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/copy.pass.cpp
@@ -15,6 +15,7 @@
 
 #include <random>
 #include <cassert>
+#include <climits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/default.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/default.pass.cpp
index c59afd7a3eb273..a85c63d26ead62 100644
--- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/default.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/default.pass.cpp
@@ -15,6 +15,7 @@
 
 #include <random>
 #include <cassert>
+#include <climits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp
index 98b07e70f247af..66b4e6ab4d6a86 100644
--- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.lcong/values.pass.cpp
@@ -21,8 +21,9 @@
 //     static constexpr result_type default_seed = 1u;
 
 #include <random>
-#include <type_traits>
 #include <cassert>
+#include <climits>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/result_type.pass.cpp
index b407b092d437b1..d8c22fc6c6573e 100644
--- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/result_type.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.mers/result_type.pass.cpp
@@ -18,6 +18,7 @@
 //     typedef UIntType result_type;
 
 #include <random>
+#include <cstdint>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/result_type.pass.cpp
index 2406b775b8ae4e..4d31a106b8dd67 100644
--- a/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/result_type.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.eng/rand.eng.sub/result_type.pass.cpp
@@ -16,6 +16,7 @@
 //     typedef UIntType result_type;
 
 #include <random>
+#include <cstdint>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/generate.mandates.verify.cpp b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/generate.mandates.verify.cpp
index a8ea31b68063a3..926013beaf213d 100644
--- a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/generate.mandates.verify.cpp
+++ b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/generate.mandates.verify.cpp
@@ -23,6 +23,7 @@
 
 #include <random>
 #include <climits>
+#include <cstdint>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/types.pass.cpp b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/types.pass.cpp
index 82a12517c7b9bf..94164d03d6cef0 100644
--- a/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/types.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.util/rand.util.seedseq/types.pass.cpp
@@ -15,6 +15,7 @@
 //     typedef uint_least32_t result_type;
 
 #include <random>
+#include <cstdint>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_token_pred.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_token_pred.pass.cpp
index 7a39d1253a33cf..9a3e7c9bac1e8f 100644
--- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_token_pred.pass.cpp
+++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_token_pred.pass.cpp
@@ -19,6 +19,7 @@
 //   bool wait_for(Lock& lock, stop_token stoken,
 //                 const chrono::duration<Rep, Period>& rel_time, Predicate pred);
 
+#include <atomic>
 #include <cassert>
 #include <chrono>
 #include <concepts>
diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_token_pred.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_token_pred.pass.cpp
index f322d8cfdc68fc..271c67273b272e 100644
--- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_token_pred.pass.cpp
+++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_token_pred.pass.cpp
@@ -18,6 +18,7 @@
 // template<class Lock, class Predicate>
 //   bool wait(Lock& lock, stop_token stoken, Predicate pred);
 
+#include <atomic>
 #include <cassert>
 #include <concepts>
 #include <condition_variable>
diff --git a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until_token_pred.pass.cpp b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until_token_pred.pass.cpp
index e7388b9ce0e176..631ac889b936f3 100644
--- a/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until_token_pred.pass.cpp
+++ b/libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until_token_pred.pass.cpp
@@ -19,6 +19,7 @@
 //   bool wait_until(Lock& lock, stop_token stoken,
 //                   const chrono::time_point<Clock, Duration>& abs_time, Predicate pred);
 
+#include <atomic>
 #include <cassert>
 #include <chrono>
 #include <concepts>
diff --git a/libcxx/test/std/thread/thread.jthread/cons.func.token.pass.cpp b/libcxx/test/std/thread/thread.jthread/cons.func.token.pass.cpp
index 2d029271d75ce8..5236b84b1fd96b 100644
--- a/libcxx/test/std/thread/thread.jthread/cons.func.token.pass.cpp
+++ b/libcxx/test/std/thread/thread.jthread/cons.func.token.pass.cpp
@@ -18,6 +18,7 @@
 #include <stop_token>
 #include <thread>
 #include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp b/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp
index 93137111b676cd..eac3d688a1d9fa 100644
--- a/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp
+++ b/libcxx/test/std/thread/thread.stoptoken/stopcallback/dtor.pass.cpp
@@ -17,6 +17,7 @@
 #include <cassert>
 #include <chrono>
 #include <functional>
+#include <memory>
 #include <optional>
 #include <stop_token>
 #include <type_traits>
diff --git a/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp
index 9e13ab4decd7b2..a2c97607a5e5fe 100644
--- a/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/decrement.pass.cpp
@@ -14,8 +14,9 @@
 //  constexpr day operator--(int) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp
index 3d67558950535c..ea49f42d92fa0a 100644
--- a/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/increment.pass.cpp
@@ -14,8 +14,9 @@
 //  constexpr day operator++(int) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/ok.pass.cpp
index b0309067394e38..d50ab29615df51 100644
--- a/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/ok.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: 1 <= d_ && d_ <= 31
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp
index 28a1529beb7437..dea590a31ac106 100644
--- a/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.members/plus_minus_equal.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr day& operator-=(const days& d) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.nonmembers/minus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.nonmembers/minus.pass.cpp
index f2d29f7050e730..2521170fe914ae 100644
--- a/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.nonmembers/minus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.nonmembers/minus.pass.cpp
@@ -17,8 +17,9 @@
 //   Returns: days{int(unsigned{x}) - int(unsigned{y}).
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.nonmembers/plus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.nonmembers/plus.pass.cpp
index dd6e537ec5d391..04761f4c2e5487 100644
--- a/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.nonmembers/plus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.day/time.cal.day.nonmembers/plus.pass.cpp
@@ -17,8 +17,9 @@
 //   Returns: y + x.
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.members/day.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.members/day.pass.cpp
index e73d7b63c0c038..c2355d1b38b3f8 100644
--- a/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.members/day.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.members/day.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: d_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.members/month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.members/month.pass.cpp
index 4e39b2e7fd9076..342495047304d2 100644
--- a/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.members/month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.members/month.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.members/ok.pass.cpp
index 2bc7a5aadd16c9..22fae5004a406d 100644
--- a/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.md/time.cal.md.members/ok.pass.cpp
@@ -16,8 +16,9 @@
 //  When m_ == February, the number of days is considered to be 29.
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.mdlast/month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.mdlast/month.pass.cpp
index 2e95a0ba2d9ee1..7e43e3cf2e9021 100644
--- a/libcxx/test/std/time/time.cal/time.cal.mdlast/month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.mdlast/month.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: m_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.mdlast/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.mdlast/ok.pass.cpp
index c6bec5d33a5922..808327966c5a55 100644
--- a/libcxx/test/std/time/time.cal/time.cal.mdlast/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.mdlast/ok.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: m_.ok()
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp
index 9299d9e297218f..387ee5ab210034 100644
--- a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/decrement.pass.cpp
@@ -14,8 +14,9 @@
 //  constexpr month operator--(int) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp
index 1f8f7411eb2ebb..5798c1513bd10d 100644
--- a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/increment.pass.cpp
@@ -14,8 +14,9 @@
 //  constexpr month operator++(int) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/ok.pass.cpp
index 988051d02a665d..504ae7344690aa 100644
--- a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/ok.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: 1 <= d_ && d_ <= 12
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp
index d825ef7d6cefa3..f643ce99c49380 100644
--- a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.members/plus_minus_equal.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr month& operator-=(const month& d) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp
index f7fb2b19ba60f2..3653cdba79c81d 100644
--- a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/minus.pass.cpp
@@ -20,8 +20,9 @@
 //   [Example: January - February == months{11}. -end example]
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp
index ee7a33e9e0b860..ae365ad1c0bc15 100644
--- a/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.month/time.cal.month.nonmembers/plus.pass.cpp
@@ -24,8 +24,9 @@
 //   [Example: February + months{11} == January. -end example]
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.members/month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.members/month.pass.cpp
index f6e79f5a90d090..73b191d86de5ee 100644
--- a/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.members/month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.members/month.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.members/ok.pass.cpp
index a46ffabb9b71dd..8ce38277b9a4c4 100644
--- a/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.members/ok.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: m_.ok() && wdi_.ok().
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.members/weekday_indexed.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.members/weekday_indexed.pass.cpp
index 54f6a4c3043ba0..6255bf483ac6da 100644
--- a/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.members/weekday_indexed.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.mwd/time.cal.mwd.members/weekday_indexed.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wdi_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/month.pass.cpp
index d78f038ab6b17f..c57f0bb3fae86d 100644
--- a/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/month.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: m_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ok.pass.cpp
index 9833757d635987..e5cc5dc5a15db6 100644
--- a/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/ok.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: m_.ok() && wdl_.ok().
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/weekday_last.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/weekday_last.pass.cpp
index 6702287db70fe7..c3c2573deab2ed 100644
--- a/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/weekday_last.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.mwdlast/time.cal.mwdlast.members/weekday_last.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wdl_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/index.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/index.pass.cpp
index cfcc21487e379d..821b804ff0a2e6 100644
--- a/libcxx/test/std/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/index.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/index.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: index_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ok.pass.cpp
index 3c96412bcefd14..8e8206962f91be 100644
--- a/libcxx/test/std/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/ok.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_.ok() && 1 <= index_ && index_ <= 5
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/weekday.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/weekday.pass.cpp
index 1077e9511a058d..6404cd557c6baa 100644
--- a/libcxx/test/std/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/weekday.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.wdidx/time.cal.wdidx.members/weekday.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ok.pass.cpp
index db023516adccac..302dd5394434f2 100644
--- a/libcxx/test/std/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/ok.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_.ok()
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/weekday.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/weekday.pass.cpp
index cdaddc2654be77..86e4eb0263c2e5 100644
--- a/libcxx/test/std/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/weekday.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.wdlast/time.cal.wdlast.members/weekday.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/c_encoding.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/c_encoding.pass.cpp
index e80b449f9bc449..f7a2ff896e6a92 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/c_encoding.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/c_encoding.pass.cpp
@@ -13,8 +13,9 @@
 //  constexpr unsigned c_encoding() const noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp
index b2127d3eb17eed..03e698ad17691a 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.local_days.pass.cpp
@@ -24,8 +24,9 @@
 // -end example]
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp
index d8777b7cdc6054..4475e6f7e29039 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ctor.sys_days.pass.cpp
@@ -24,8 +24,9 @@
 // -end example]
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/decrement.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/decrement.pass.cpp
index 16ed968c3b9dc2..f55108c922c3a9 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/decrement.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/decrement.pass.cpp
@@ -14,8 +14,9 @@
 //  constexpr weekday operator--(int) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 #include "../../euclidian.h"
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/increment.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/increment.pass.cpp
index 6c3ad9b21f45df..869c2ea0cfb333 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/increment.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/increment.pass.cpp
@@ -14,8 +14,9 @@
 //  constexpr weekday operator++(int) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 #include "../../euclidian.h"
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/iso_encoding.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/iso_encoding.pass.cpp
index 18d59698fb4e45..a3a621bee991d0 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/iso_encoding.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/iso_encoding.pass.cpp
@@ -15,8 +15,9 @@
 //    See [time.cal.wd.members]
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ok.pass.cpp
index 106f38f2d0e7c5..5792ef5ec9586c 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/ok.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_ <= 6
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/operator[].pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/operator[].pass.cpp
index 290e39b7567a35..1900f00ba76039 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/operator[].pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/operator[].pass.cpp
@@ -15,8 +15,9 @@
 
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 #include "../../euclidian.h"
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/plus_minus_equal.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/plus_minus_equal.pass.cpp
index 8fbc7bd8384070..6273cd0041011c 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/plus_minus_equal.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.members/plus_minus_equal.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr weekday& operator-=(const days& d) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 #include "../../euclidian.h"
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp
index ef5753100f3a94..ecb023c4eb5883 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/minus.pass.cpp
@@ -20,8 +20,9 @@
 // [Example: Sunday - Monday == days{6}. -end example]
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 #include "../../euclidian.h"
diff --git a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp
index 2eb839b0b217ac..ecf7a5ee8709e9 100644
--- a/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.weekday/time.cal.weekday.nonmembers/plus.pass.cpp
@@ -24,8 +24,9 @@
 //   [Example: Monday + days{6} == Sunday. -end example]
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 #include "../../euclidian.h"
diff --git a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp
index b8fd3ba9eaeea6..1190785b1c3b08 100644
--- a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/decrement.pass.cpp
@@ -14,8 +14,9 @@
 //  constexpr year operator--(int) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp
index ea66a5940e765e..aec38c464099a0 100644
--- a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/increment.pass.cpp
@@ -14,8 +14,9 @@
 //  constexpr year operator++(int) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/ok.pass.cpp
index 57e5ed0a9665b9..1350d95657a183 100644
--- a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/ok.pass.cpp
@@ -19,8 +19,9 @@
 //   Returns year{-32767};
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp
index 37dc8e01aac456..c08d23a081e271 100644
--- a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/plus_minus.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr year operator-() const noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp
index 6cccbdb1f2898d..1041c33377f307 100644
--- a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.members/plus_minus_equal.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr year& operator-=(const years& d) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp
index 9c382a2ef77c49..167083a3d7bf16 100644
--- a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/minus.pass.cpp
@@ -20,8 +20,9 @@
 //   [Example: January - February == years{11}. -end example]
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/plus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/plus.pass.cpp
index 138a0e03f88ed9..b85f6e777a877f 100644
--- a/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/plus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.year/time.cal.year.nonmembers/plus.pass.cpp
@@ -17,8 +17,9 @@
 //   Returns: y + x
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/month.pass.cpp
index 9f3181871b5e15..ea596ec86c9853 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/month.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/ok.pass.cpp
index 2893af0fd29b2e..611db55e81133c 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/ok.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: m_.ok() && y_.ok().
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_month.pass.cpp
index cc9fff83a1cff1..a67286b85c04a5 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_month.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr year_month& operator-=(const months& d) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_year.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_year.pass.cpp
index 99b94859aaea21..591f15007b1292 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_year.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/plus_minus_equal_year.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr year_month& operator-=(const years& d) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/year.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/year.pass.cpp
index b09de6454238ab..21f98088bf6dd1 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/year.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.members/year.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: d_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/minus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/minus.pass.cpp
index 977c566e745ac1..22f137f042fd8e 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/minus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/minus.pass.cpp
@@ -21,8 +21,9 @@
 //                                       static_cast<int>(unsigned{y.month()})}
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp
index 60747a29714d11..29049fd98fa7a6 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ym/time.cal.ym.nonmembers/plus.pass.cpp
@@ -24,8 +24,9 @@
 // Returns: ym + dm.
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.local_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.local_days.pass.cpp
index f9de6316df3ff3..2f68fb4fb4346c 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.local_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.local_days.pass.cpp
@@ -24,8 +24,9 @@
 //  constexpr bool             ok() const noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.sys_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.sys_days.pass.cpp
index b0d963a58a4d9a..ec14db489c3428 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.sys_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.sys_days.pass.cpp
@@ -23,8 +23,9 @@
 //  constexpr bool             ok() const noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.year_month_day_last.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.year_month_day_last.pass.cpp
index 4c3875ba77629c..e65da4c412fef1 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.year_month_day_last.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ctor.year_month_day_last.pass.cpp
@@ -21,8 +21,9 @@
 //  constexpr bool             ok() const noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/day.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/day.pass.cpp
index 6e4ac6359d4d10..42e26fdad3fe31 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/day.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/day.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/month.pass.cpp
index 75855dadc20f12..ead060b4e2968a 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/month.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ok.pass.cpp
index 8d38a6f024dc82..45cceca20cbefe 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/ok.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: m_.ok() && y_.ok().
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp
index cc882d7569eaf4..b15caa3f76156c 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.local_days.pass.cpp
@@ -30,8 +30,9 @@
 // -end example]
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp
index ec252eaa11dbdf..ecfc5e828c0c8f 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/op.sys_days.pass.cpp
@@ -30,8 +30,9 @@
 // -end example]
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_month.pass.cpp
index 40db399b110b83..12857a3543d60f 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_month.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr year_month_day& operator-=(const months& m) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_year.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_year.pass.cpp
index e886308f2c6111..80c7283fcd4dbf 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_year.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/plus_minus_equal_year.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr year_month_day& operator-=(const years& d) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/year.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/year.pass.cpp
index 3eba6483c25068..efe142afbf67c5 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/year.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.members/year.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: d_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp
index 5ec0e04f702518..c0032621c901b0 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/minus.pass.cpp
@@ -15,8 +15,9 @@
 
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/plus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/plus.pass.cpp
index b172cb13845704..c724be6b380da5 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/plus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymd/time.cal.ymd.nonmembers/plus.pass.cpp
@@ -24,8 +24,9 @@
 //   Returns: ym + dm.
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/day.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/day.pass.cpp
index cf3c109fb1351c..0e397406277f4c 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/day.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/day.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month.pass.cpp
index d7384f754d498d..eb90391499ef91 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month_day_last.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month_day_last.pass.cpp
index f286c4e2ecc0e3..41c38c1ad6d1f9 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month_day_last.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/month_day_last.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ok.pass.cpp
index 09c52b461dc8cd..972c0995745cdf 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/ok.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: m_.ok() && y_.ok().
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_local_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_local_days.pass.cpp
index 7760cfc027cccb..82a6c91d03cf79 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_local_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_local_days.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: local_days{sys_days{*this}.time_since_epoch()}.
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_sys_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_sys_days.pass.cpp
index e33cec68ae4f72..2f70f090131b98 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_sys_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/op_sys_days.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: sys_days{year()/month()/day()}.
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_month.pass.cpp
index 1c084795960162..c860a73c73a6f3 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_month.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr year_month_day_last& operator-=(const months& m) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_year.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_year.pass.cpp
index cef20fdc10860f..84e77790a655a7 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_year.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/plus_minus_equal_year.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr year_month_day_last& operator-=(const years& d) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/year.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/year.pass.cpp
index 1171687765cb02..fda571c56c6257 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/year.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.members/year.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: d_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp
index 22d1acfbe28278..3069350a13eeec 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/minus.pass.cpp
@@ -21,8 +21,9 @@
 //   Returns: ymdl + (-dy).
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/plus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/plus.pass.cpp
index 1a4609e761baa7..951f61326b91dc 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/plus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymdlast/time.cal.ymdlast.nonmembers/plus.pass.cpp
@@ -32,8 +32,9 @@
 //   Returns: ymdl + dy
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.local_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.local_days.pass.cpp
index 7bc17fd6c2be63..b8c45f1f087ea4 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.local_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.local_days.pass.cpp
@@ -24,8 +24,9 @@
 //  constexpr bool             ok() const noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.sys_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.sys_days.pass.cpp
index a5c544b25991a1..0390b555f8d7af 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.sys_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ctor.sys_days.pass.cpp
@@ -23,8 +23,9 @@
 //  constexpr bool             ok() const noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/index.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/index.pass.cpp
index a9323542170357..8ca7dba40d2cb7 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/index.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/index.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wdi_.index()
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/month.pass.cpp
index d03a5683686db2..7f2ea227ecedbe 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/month.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp
index 5456bbe86e7d7f..85ef09484ffce8 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/ok.pass.cpp
@@ -16,8 +16,9 @@
 //           Otherwise, returns false.
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.local_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.local_days.pass.cpp
index 51d1942d3905b6..da36bdc0b56436 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.local_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.local_days.pass.cpp
@@ -20,8 +20,9 @@
 //
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.sys_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.sys_days.pass.cpp
index 3ca32d926cbabe..db589e0b25af4c 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.sys_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/op.sys_days.pass.cpp
@@ -20,8 +20,9 @@
 //
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_month.pass.cpp
index 6aaab2dbfb31d3..62182cfee363a3 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_month.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr year_month_weekday& operator-=(const months& m) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_year.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_year.pass.cpp
index f77acec1df7337..f792c4cf0d1fad 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_year.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/plus_minus_equal_year.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr year_month_weekday& operator-=(const years& d) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday.pass.cpp
index 16e5fc71150c48..d25644d2b8707b 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wdi_.weekday()
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday_indexed.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday_indexed.pass.cpp
index 2251f1eb294b13..4e38b2b35476be 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday_indexed.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/weekday_indexed.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/year.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/year.pass.cpp
index fe44ff51f2eaa6..a3fcfd883391ec 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/year.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.members/year.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: d_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp
index 5546d34ca22dd0..511fe58d727e5e 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/minus.pass.cpp
@@ -17,8 +17,9 @@
 //   Returns: ymwd + (-dy).
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/plus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/plus.pass.cpp
index 1601e8fecb7a4b..93f3b934d2b181 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/plus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwd/time.cal.ymwd.nonmembers/plus.pass.cpp
@@ -24,8 +24,9 @@
 //   Returns: ym + dm.
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/month.pass.cpp
index 8515e87510a953..ae9090d74374f7 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/month.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wd_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ok.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ok.pass.cpp
index 81bc7912d695ac..37798a7babbe3d 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ok.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/ok.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: y_.ok() && m_.ok() && wdl_.ok().
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_local_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_local_days.pass.cpp
index 397aa29ec83081..91d008fd7f440d 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_local_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_local_days.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: local_days{sys_days{*this}.time_since_epoch()}.
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp
index 0418f5bed1285d..f05fd3f774bda3 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/op_sys_days.pass.cpp
@@ -15,8 +15,9 @@
 //             of year()/month(). Otherwise the returned value is unspecified.
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_month.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_month.pass.cpp
index ff52b1466cefa5..a3fed20a4ac02e 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_month.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_month.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr year_month_weekday_last& operator-=(const months& m) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_year.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_year.pass.cpp
index db8c9f482a16d2..14c1f618ac885e 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_year.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/plus_minus_equal_year.pass.cpp
@@ -14,8 +14,9 @@
 // constexpr year_month_weekday_last& operator-=(const years& d) noexcept;
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/weekday.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/weekday.pass.cpp
index b277e212553c4a..df2c50ea25d556 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/weekday.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/weekday.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: wdi_.weekday()
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/year.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/year.pass.cpp
index 22f82bcb7fc891..867238294fbbdb 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/year.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.members/year.pass.cpp
@@ -14,8 +14,9 @@
 //  Returns: d_
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp
index 6fe2ec3b6606d1..cffe5d1516a2f1 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/minus.pass.cpp
@@ -17,8 +17,9 @@
 //   Returns: ymwdl + (-dy).
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/plus.pass.cpp b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/plus.pass.cpp
index 560b2fcde05568..3acf2c8f69deee 100644
--- a/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/plus.pass.cpp
+++ b/libcxx/test/std/time/time.cal/time.cal.ymwdlast/time.cal.ymwdlast.nonmembers/plus.pass.cpp
@@ -23,8 +23,9 @@
 //   Returns: ymwdl + dy.
 
 #include <chrono>
-#include <type_traits>
 #include <cassert>
+#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/current_zone.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/current_zone.pass.cpp
index f31a679dd6214f..b23a0e5d79b6d2 100644
--- a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/current_zone.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.access/current_zone.pass.cpp
@@ -16,10 +16,11 @@
 
 // const time_zone* current_zone();
 
-#include <cassert>
 #include <chrono>
-#include <string_view>
+#include <cassert>
 #include <stdlib.h>
+#include <string_view>
+#include <string>
 
 #include "test_macros.h"
 #include "assert_macros.h"
diff --git a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/remote_version.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/remote_version.pass.cpp
index 554f259eb5c2af..ae6508913b2dc8 100644
--- a/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/remote_version.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.db/time.zone.db.remote/remote_version.pass.cpp
@@ -17,8 +17,8 @@
 // const string remote_version();
 
 #include <chrono>
-
 #include <cassert>
+#include <string>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.nonexist/types.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.nonexist/types.pass.cpp
index 85ebfab679e02d..f8262e241fa94c 100644
--- a/libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.nonexist/types.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.exception/time.zone.exception.nonexist/types.pass.cpp
@@ -25,6 +25,7 @@
 #include <chrono>
 #include <stdexcept>
 #include <type_traits>
+#include <utility>
 
 // Basic properties
 static_assert(std::is_base_of_v<std::runtime_error, std::chrono::nonexistent_local_time>);
diff --git a/libcxx/test/std/time/time.zone/time.zone.leap/members/date.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.leap/members/date.pass.cpp
index bd148689f96f07..98a7fc73f91744 100644
--- a/libcxx/test/std/time/time.zone/time.zone.leap/members/date.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.leap/members/date.pass.cpp
@@ -20,6 +20,7 @@
 
 #include <cassert>
 #include <chrono>
+#include <concepts>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/time/time.zone/time.zone.zonedtraits/const_time_zone_default_zone.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.zonedtraits/const_time_zone_default_zone.pass.cpp
index c6527094bb6215..930de9d0fec9e3 100644
--- a/libcxx/test/std/time/time.zone/time.zone.zonedtraits/const_time_zone_default_zone.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.zonedtraits/const_time_zone_default_zone.pass.cpp
@@ -20,6 +20,7 @@
 
 #include <chrono>
 #include <cassert>
+#include <concepts>
 
 int main(int, char**) {
   std::same_as<const std::chrono::time_zone*> decltype(auto) tz =
diff --git a/libcxx/test/std/time/time.zone/time.zone.zonedtraits/const_time_zone_locate_zone.pass.cpp b/libcxx/test/std/time/time.zone/time.zone.zonedtraits/const_time_zone_locate_zone.pass.cpp
index 1c8184455f23cf..c565de5a08f2c4 100644
--- a/libcxx/test/std/time/time.zone/time.zone.zonedtraits/const_time_zone_locate_zone.pass.cpp
+++ b/libcxx/test/std/time/time.zone/time.zone.zonedtraits/const_time_zone_locate_zone.pass.cpp
@@ -21,6 +21,7 @@
 #include <chrono>
 #include <cassert>
 #include <concepts>
+#include <string_view>
 
 #include "assert_macros.h"
 
diff --git a/libcxx/test/std/utilities/charconv/charconv.msvc/test.hpp b/libcxx/test/std/utilities/charconv/charconv.msvc/test.hpp
index eb6d6486333e98..aaaf0e8a433c02 100644
--- a/libcxx/test/std/utilities/charconv/charconv.msvc/test.hpp
+++ b/libcxx/test/std/utilities/charconv/charconv.msvc/test.hpp
@@ -5,8 +5,8 @@
 #define TEST_HPP
 
 #include <charconv>
+#include <cstddef>
 #include <limits>
-#include <stddef.h>
 #include <system_error>
 using namespace std;
 
diff --git a/libcxx/test/std/utilities/charconv/charconv.syn/from_chars_result.pass.cpp b/libcxx/test/std/utilities/charconv/charconv.syn/from_chars_result.pass.cpp
index 24484cfe475f91..26d0d366dcc684 100644
--- a/libcxx/test/std/utilities/charconv/charconv.syn/from_chars_result.pass.cpp
+++ b/libcxx/test/std/utilities/charconv/charconv.syn/from_chars_result.pass.cpp
@@ -24,6 +24,7 @@
 #include <compare>
 #include <concepts>
 #include <system_error>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/utilities/charconv/charconv.syn/to_chars_result.pass.cpp b/libcxx/test/std/utilities/charconv/charconv.syn/to_chars_result.pass.cpp
index e746f19b2cd021..a7d9b086e591dc 100644
--- a/libcxx/test/std/utilities/charconv/charconv.syn/to_chars_result.pass.cpp
+++ b/libcxx/test/std/utilities/charconv/charconv.syn/to_chars_result.pass.cpp
@@ -24,6 +24,7 @@
 #include <compare>
 #include <concepts>
 #include <system_error>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp
index 19bb8bf0b47a59..f1d2c7f428bffc 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp
@@ -24,9 +24,10 @@
 
 #include <array>
 #include <cassert>
-#include <cmath>
 #include <charconv>
+#include <cmath>
 #include <concepts>
+#include <cstdint>
 #include <iterator>
 #include <memory>
 #include <string>
diff --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp
index d589a315dc924f..707664ac127856 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp
@@ -30,6 +30,7 @@
 #include <format>
 #include <cassert>
 #include <concepts>
+#include <cstdint>
 #include <iterator>
 #include <memory>
 #include <type_traits>
diff --git a/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp b/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp
index fa3076224f2d13..c4adf601c40af3 100644
--- a/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/escaped_output.unicode.pass.cpp
@@ -24,6 +24,7 @@
 
 #include <cassert>
 #include <concepts>
+#include <cstdint>
 #include <iterator>
 #include <list>
 #include <vector>
diff --git a/libcxx/test/std/utilities/format/format.functions/format_to.locale.pass.cpp b/libcxx/test/std/utilities/format/format.functions/format_to.locale.pass.cpp
index ec21133463a393..01a75b3d466b9a 100644
--- a/libcxx/test/std/utilities/format/format.functions/format_to.locale.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format_to.locale.pass.cpp
@@ -26,6 +26,7 @@
 #include <cassert>
 #include <iterator>
 #include <list>
+#include <locale>
 #include <vector>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/utilities/format/format.functions/format_to_n.locale.pass.cpp b/libcxx/test/std/utilities/format/format.functions/format_to_n.locale.pass.cpp
index 3c266ad756da2b..ec1e466f8a421a 100644
--- a/libcxx/test/std/utilities/format/format.functions/format_to_n.locale.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format_to_n.locale.pass.cpp
@@ -27,6 +27,7 @@
 #include <algorithm>
 #include <cassert>
 #include <list>
+#include <locale>
 #include <vector>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.pass.cpp b/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.pass.cpp
index e5a85826a11fe8..32e6447c006a55 100644
--- a/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.pass.cpp
@@ -23,6 +23,7 @@
 
 #include <format>
 #include <cassert>
+#include <locale>
 #include <vector>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp
index 5940988fd6d1fe..25ee7612d24393 100644
--- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp
@@ -13,6 +13,8 @@
 // template<class T> struct is_bind_expression
 
 #include <functional>
+#include <type_traits>
+
 #include "test_macros.h"
 
 template <bool Expected, class T>
diff --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isplace/is_placeholder.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isplace/is_placeholder.pass.cpp
index 1e85ca79dbb866..48ce625f428b0e 100644
--- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isplace/is_placeholder.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isplace/is_placeholder.pass.cpp
@@ -11,6 +11,8 @@
 // struct is_placeholder
 
 #include <functional>
+#include <type_traits>
+
 #include "test_macros.h"
 
 template <int Expected, class T>
diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp
index 54e9f25275cf24..fd1fbe5f113baa 100644
--- a/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp
@@ -12,12 +12,14 @@
 
 // Make sure that we can hash enumeration values.
 
-#include "test_macros.h"
-
 #include <functional>
 #include <cassert>
-#include <type_traits>
+#include <cstddef>
+#include <cstdint>
 #include <limits>
+#include <type_traits>
+
+#include "test_macros.h"
 
 enum class Colors { red, orange, yellow, green, blue, indigo, violet };
 enum class Cardinals { zero, one, two, three, five=5 };
diff --git a/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
index 4d6bc172fe3865..14af7093c1e366 100644
--- a/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
@@ -19,9 +19,10 @@
 
 #include <functional>
 #include <cassert>
-#include <type_traits>
 #include <cstddef>
+#include <cstdint>
 #include <limits>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/difference_type.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/difference_type.pass.cpp
index 2cb2c670441b07..2ebf5dc627a241 100644
--- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/difference_type.pass.cpp
+++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/difference_type.pass.cpp
@@ -17,6 +17,7 @@
 // };
 
 #include <memory>
+#include <cstddef>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/size_type.pass.cpp b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/size_type.pass.cpp
index d8f15af6acf183..22390cb6cef4c4 100644
--- a/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/size_type.pass.cpp
+++ b/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.types/size_type.pass.cpp
@@ -16,6 +16,7 @@
 // };
 
 #include <memory>
+#include <cstddef>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/difference_type.compile.pass.cpp b/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/difference_type.compile.pass.cpp
index f5fd27cffba84f..ddfbda09291022 100644
--- a/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/difference_type.compile.pass.cpp
+++ b/libcxx/test/std/utilities/memory/pointer.traits/pointer.traits.types/difference_type.compile.pass.cpp
@@ -16,6 +16,7 @@
 // };
 
 #include <memory>
+#include <cstddef>
 #include <type_traits>
 
 #include "test_macros.h"
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/types.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/types.pass.cpp
index c71765891d5552..d043343460f537 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/types.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/types.pass.cpp
@@ -19,6 +19,7 @@
 
 #include <memory>
 #include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp
index d1d19e4562355d..b9d91979b02cb1 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.mod/reset_pointer.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <memory>
 #include <cassert>
+#include <utility>
 
 #include "reset_helper.h"
 #include "test_macros.h"
diff --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp
index 3e08855d6adb90..f076f676be7660 100644
--- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/underlying_type.pass.cpp
@@ -14,6 +14,7 @@
 
 #include <type_traits>
 #include <climits>
+#include <cstddef>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
index 6cade6ae1f07b1..8e57e8913dcbe3 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_bounded_array.pass.cpp
@@ -13,6 +13,7 @@
 // T is an array type of known bound ([dcl.array])
 
 #include <type_traits>
+#include <cstddef>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_unbounded_array.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_unbounded_array.pass.cpp
index ea5383984262da..46dafb64a9cf7c 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_unbounded_array.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.comp/is_unbounded_array.pass.cpp
@@ -13,6 +13,7 @@
 // T is an array type of unknown bound ([dcl.array])
 
 #include <type_traits>
+#include <cstddef>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp
index 6d11561af75474..f500da3ee6317f 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_signed.pass.cpp
@@ -11,6 +11,8 @@
 // is_signed
 
 #include <type_traits>
+#include <cstddef>
+
 #include "test_macros.h"
 
 template <class T>
diff --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp
index abf21e60b59270..e10c377b012d4e 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_unsigned.pass.cpp
@@ -11,6 +11,8 @@
 // is_unsigned
 
 #include <type_traits>
+#include <cstddef>
+
 #include "test_macros.h"
 
 template <class T>
diff --git a/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
index 1ece47ed37457d..86b144ed87b702 100644
--- a/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
+++ b/libcxx/test/std/utilities/template.bitset/bitset.cons/char_ptr_ctor.pass.cpp
@@ -12,9 +12,10 @@
 //                     charT zero = charT('0'), charT one = charT('1')); // constexpr since C++23
 
 #include <bitset>
-#include <cassert>
 #include <algorithm> // for 'min' and 'max'
+#include <cassert>
 #include <stdexcept> // for 'invalid_argument'
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
index accb601dd00365..34b79b38d2b959 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
@@ -14,9 +14,10 @@
 
 #include <tuple>
 #include <array>
-#include <utility>
-#include <string>
 #include <cassert>
+#include <cstdint>
+#include <string>
+#include <utility>
 
 #include "test_macros.h"
 #include "type_id.h"
@@ -197,7 +198,7 @@ void test_noexcept() {
 
 namespace LWG3528 {
 template <class T, class Tuple>
-auto test_make_from_tuple(T&&, Tuple&& t) -> decltype(std::make_from_tuple<T>(t), uint8_t()) {
+auto test_make_from_tuple(T&&, Tuple&& t) -> decltype(std::make_from_tuple<T>(t), std::uint8_t()) {
   return 0;
 }
 template <class T, class Tuple>
@@ -207,14 +208,14 @@ uint32_t test_make_from_tuple(...) {
 
 template <class T, class Tuple>
 static constexpr bool can_make_from_tuple =
-    std::is_same_v<decltype(test_make_from_tuple<T, Tuple>(T{}, Tuple{})), uint8_t>;
+    std::is_same_v<decltype(test_make_from_tuple<T, Tuple>(T{}, Tuple{})), std::uint8_t>;
 
 #ifdef _LIBCPP_VERSION
 template <class T, class Tuple>
 auto test_make_from_tuple_impl(T&&, Tuple&& t)
     -> decltype(std::__make_from_tuple_impl<T>(
                     t, typename std::__make_tuple_indices< std::tuple_size_v<std::remove_reference_t<Tuple>>>::type{}),
-                uint8_t()) {
+                std::uint8_t()) {
   return 0;
 }
 template <class T, class Tuple>
@@ -224,7 +225,7 @@ uint32_t test_make_from_tuple_impl(...) {
 
 template <class T, class Tuple>
 static constexpr bool can_make_from_tuple_impl =
-    std::is_same_v<decltype(test_make_from_tuple_impl<T, Tuple>(T{}, Tuple{})), uint8_t>;
+    std::is_same_v<decltype(test_make_from_tuple_impl<T, Tuple>(T{}, Tuple{})), std::uint8_t>;
 #endif // _LIBCPP_VERSION
 
 struct A {
diff --git a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/default_type.compile.pass.cpp b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/default_type.compile.pass.cpp
index 0e5175c2a4d6bf..d22b33168d65be 100644
--- a/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/default_type.compile.pass.cpp
+++ b/libcxx/test/std/utilities/utility/mem.res/mem.poly.allocator.class/mem.poly.allocator.mem/default_type.compile.pass.cpp
@@ -13,6 +13,7 @@
 // UNSUPPORTED: no-rtti
 
 #include <memory_resource>
+#include <cstddef>
 #include <type_traits>
 
 static_assert(std::is_same_v<std::pmr::polymorphic_allocator<>, std::pmr::polymorphic_allocator<std::byte>>);
diff --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/special_member_generation_test.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/special_member_generation_test.pass.cpp
index f03f8bf895b2c6..4ec2f692e7635b 100644
--- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/special_member_generation_test.pass.cpp
+++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/special_member_generation_test.pass.cpp
@@ -23,6 +23,7 @@
 #include <cassert>
 #include <string>
 #include <tuple>
+#include <utility>
 
 #include "archetypes.h"
 
diff --git a/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.cmp_greater_equal/cmp_greater_equal.pass.cpp b/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.cmp_greater_equal/cmp_greater_equal.pass.cpp
index 90518be22a14dc..c4963458a73f65 100644
--- a/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.cmp_greater_equal/cmp_greater_equal.pass.cpp
+++ b/libcxx/test/std/utilities/utility/utility.intcmp/intcmp.cmp_greater_equal/cmp_greater_equal.pass.cpp
@@ -13,10 +13,11 @@
 //   constexpr bool cmp_greater_equal(T t, U u) noexcept; // C++20
 
 #include <utility>
+#include <cassert>
 #include <limits>
 #include <numeric>
 #include <tuple>
-#include <cassert>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/support/format.functions.common.h b/libcxx/test/support/format.functions.common.h
index 473b4efe690b0c..a6a6635d0945be 100644
--- a/libcxx/test/support/format.functions.common.h
+++ b/libcxx/test/support/format.functions.common.h
@@ -15,11 +15,12 @@
 #include <cctype>
 #include <charconv>
 #include <cstddef>
+#include <cstdint>
 #include <cstdlib>
 #include <format>
 #include <ranges>
-#include <string>
 #include <string_view>
+#include <string>
 #include <vector>
 
 #include "make_string.h"
diff --git a/libcxx/test/support/hexfloat.h b/libcxx/test/support/hexfloat.h
index 23ad9a3f976272..b0285b048daa6a 100644
--- a/libcxx/test/support/hexfloat.h
+++ b/libcxx/test/support/hexfloat.h
@@ -14,8 +14,9 @@
 #ifndef HEXFLOAT_H
 #define HEXFLOAT_H
 
-#include <cmath>
 #include <climits>
+#include <cmath>
+#include <cstddef>
 
 template <class T>
 class hexfloat
diff --git a/libcxx/test/support/operator_hijacker.h b/libcxx/test/support/operator_hijacker.h
index 15add460d37680..fbd8b58ab0f83c 100644
--- a/libcxx/test/support/operator_hijacker.h
+++ b/libcxx/test/support/operator_hijacker.h
@@ -10,9 +10,10 @@
 #define SUPPORT_OPERATOR_HIJACKER_H
 
 #include <cstddef>
-#include <memory>
 #include <functional>
+#include <memory>
 #include <string>
+#include <type_traits>
 
 #include "test_macros.h"
 
diff --git a/libcxx/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp b/libcxx/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp
index 4eb1677e71e63c..4d55c62550422b 100644
--- a/libcxx/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp
+++ b/libcxx/test/support/test.workarounds/c1xx_broken_za_ctor_check.pass.cpp
@@ -11,6 +11,7 @@
 // Verify TEST_WORKAROUND_MSVC_BROKEN_ZA_CTOR_CHECK.
 
 #include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 #include "test_workarounds.h"
diff --git a/libcxx/test/support/test_convertible.h b/libcxx/test/support/test_convertible.h
index becbb2b93336fe..805639716d91d2 100644
--- a/libcxx/test/support/test_convertible.h
+++ b/libcxx/test/support/test_convertible.h
@@ -14,7 +14,7 @@
 // Unlike 'std::is_convertible' which only allows checking for single argument
 // conversions.
 
-#include <type_traits>
+#include <utility>
 
 #include "test_macros.h"
 

>From cf692152febdf759d254dc391f9ac64eb5763bd7 Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Thu, 5 Sep 2024 14:22:38 -0400
Subject: [PATCH 2/2] [libc++][modules] Rewrite the modulemap to have fewer
 top-level modules

This patch rewrites the modulemap to have fewer top-level modules.
Previously, our modulemap had one top level module for each header
in the library, including private headers. This had the well-known
problem of making compilation times terrible, in addition to being
somewhat against the design principles of Clang modules.

This patch provides almost an order of magnitude compilation time
improvement when building modularized code (certainly subject to
variations). For example, including <ccomplex> without a module
cache went from 22.4 seconds to 1.6 seconds, a 14x improvement.

To achieve this, one might be tempted to simply put all the headers in
a single top-level module. Unfortunately, this doesn't work because
libc++ provides C compatibility headers (e.g. stdlib.h) which create
cycles when the C Standard Library headers are modularized too. This
is especially tricky since base systems are usually not modularized:
as far as I know, only Xcode 16 beta contains a modularized SDK that
makes this issue visible. To understand it, imagine we have the
following setup:

   // in libc++'s include/c++/v1/module.modulemap
   module std {
      header stddef.h
      header stdlib.h
   }

   // in the C library's include/module.modulemap
   module clib {
      header stddef.h
      header stdlib.h
   }

Now, imagine that the C library's <stdlib.h> includes <stddef.h>,
perhaps as an implementation detail. When building the `std` module,
libc++'s <stdlib.h> header does `#include_next <stdlib.h>` to get the
C library's <stdlib.h>, so libc++ depends on the `clib` module.

However, remember that the C library's <stdlib.h> header includes
<stddef.h> as an implementation detail. Since the header search paths
for libc++ are (and must be) before the search paths for the C library,
the C library ends up including libc++'s <stddef.h>, which means it
depends on the `std` module. That's a cycle.

To solve this issue, this patch creates one top-level module for each
C compatibility header. The rest of the libc++ headers are located in
a single top-level `std` module, with two main exceptions. First, the
module containing configuration headers (e.g. <__config>) has its own
top-level module too, because those headers are included by the C
compatibility headers.

Second, we create a top-level std_core module that contains several
dependency-free utilities used (directly or indirectly) from the __math
subdirectory. This is needed because __math pulls in a bunch of stuff,
and __math is used from the C compatibility header <math.h>.

As a direct benefit of this change, we don't need to generate an
artificial __std_clang_module header anymore to provide a monolithic
`std` module, since our modulemap does it naturally by construction.

A next step after this change would be to look into whether math.h
really needs to include the contents of __math, and if so, whether
libc++'s math.h truly needs to include the C library's math.h header.
Removing either dependency would break this annoying cycle.

Thanks to Eric Fiselier for pointing out this approach during a recent
meeting. This wasn't viable before some recent refactoring, but wrapping
everything (except the C headers) in a large module is by far the simplest
and the most effective way of doing this.
---
 libcxx/include/CMakeLists.txt                 |    1 -
 libcxx/include/__std_clang_module             |  193 -
 libcxx/include/module.modulemap               | 4191 +++++++++--------
 .../test/libcxx/clang_modules_include.gen.py  |    8 +-
 .../utility/utility.synop/includes.pass.cpp   |   23 -
 libcxx/utils/CMakeLists.txt                   |    5 -
 .../utils/generate_std_clang_module_header.py |   63 -
 7 files changed, 2142 insertions(+), 2342 deletions(-)
 delete mode 100644 libcxx/include/__std_clang_module
 delete mode 100644 libcxx/test/std/experimental/utilities/utility/utility.synop/includes.pass.cpp
 delete mode 100644 libcxx/utils/generate_std_clang_module_header.py

diff --git a/libcxx/include/CMakeLists.txt b/libcxx/include/CMakeLists.txt
index 23d9aa0adddce8..0e1b3801c63ed6 100644
--- a/libcxx/include/CMakeLists.txt
+++ b/libcxx/include/CMakeLists.txt
@@ -686,7 +686,6 @@ set(files
   __ranges/views.h
   __ranges/zip_view.h
   __split_buffer
-  __std_clang_module
   __std_mbstate_t.h
   __stop_token/atomic_unique_lock.h
   __stop_token/intrusive_list_view.h
diff --git a/libcxx/include/__std_clang_module b/libcxx/include/__std_clang_module
deleted file mode 100644
index a21ed26addfe8e..00000000000000
--- a/libcxx/include/__std_clang_module
+++ /dev/null
@@ -1,193 +0,0 @@
-// -*- C++ -*-
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// WARNING, this entire header is generated by
-// utils/generate_std_clang_module_header.py
-// DO NOT MODIFY!
-
-// This header should not be directly included, it's exclusively to import all
-// of the libc++ public clang modules for the `std` clang module to export. In
-// other words, it's to facilitate `@import std;` in Objective-C++ and `import std`
-// in Swift to expose all of the libc++ interfaces. This is generally not
-// recommended, however there are some clients that need to import all of libc++
-// without knowing what "all" is.
-#if !__building_module(std)
-#  error "Do not include this header directly, include individual headers instead"
-#endif
-
-#include <__config>
-
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#  pragma GCC system_header
-#endif
-
-#include <algorithm>
-#include <any>
-#include <array>
-#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
-#  include <atomic>
-#endif
-#include <barrier>
-#include <bit>
-#include <bitset>
-#include <cassert>
-#include <ccomplex>
-#include <cctype>
-#include <cerrno>
-#include <cfenv>
-#include <cfloat>
-#include <charconv>
-#include <chrono>
-#include <cinttypes>
-#include <ciso646>
-#include <climits>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <clocale>
-#endif
-#include <cmath>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <codecvt>
-#endif
-#include <compare>
-#include <complex.h>
-#include <complex>
-#include <concepts>
-#include <condition_variable>
-#include <coroutine>
-#include <csetjmp>
-#include <csignal>
-#include <cstdarg>
-#include <cstdbool>
-#include <cstddef>
-#include <cstdint>
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <ctgmath>
-#include <ctime>
-#include <ctype.h>
-#include <cuchar>
-#include <cwchar>
-#include <cwctype>
-#include <deque>
-#include <errno.h>
-#include <exception>
-#include <execution>
-#include <expected>
-#include <experimental/iterator>
-#include <experimental/memory>
-#include <experimental/propagate_const>
-#include <experimental/simd>
-#include <experimental/type_traits>
-#include <experimental/utility>
-#include <fenv.h>
-#include <filesystem>
-#include <float.h>
-#include <format>
-#include <forward_list>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <fstream>
-#endif
-#include <functional>
-#include <future>
-#include <initializer_list>
-#include <inttypes.h>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <iomanip>
-#endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <ios>
-#endif
-#include <iosfwd>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <iostream>
-#endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <istream>
-#endif
-#include <iterator>
-#include <latch>
-#include <limits>
-#include <list>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <locale.h>
-#endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <locale>
-#endif
-#include <map>
-#include <math.h>
-#include <mdspan>
-#include <memory>
-#include <memory_resource>
-#include <mutex>
-#include <new>
-#include <numbers>
-#include <numeric>
-#include <optional>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <ostream>
-#endif
-#include <print>
-#include <queue>
-#include <random>
-#include <ranges>
-#include <ratio>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <regex>
-#endif
-#include <scoped_allocator>
-#include <semaphore>
-#include <set>
-#include <shared_mutex>
-#include <source_location>
-#include <span>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <sstream>
-#endif
-#include <stack>
-#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
-#  include <stdatomic.h>
-#endif
-#include <stdbool.h>
-#include <stddef.h>
-#include <stdexcept>
-#include <stdint.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <stop_token>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <streambuf>
-#endif
-#include <string.h>
-#include <string>
-#include <string_view>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <strstream>
-#endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
-#  include <syncstream>
-#endif
-#include <system_error>
-#include <tgmath.h>
-#include <thread>
-#include <tuple>
-#include <type_traits>
-#include <typeindex>
-#include <typeinfo>
-#include <uchar.h>
-#include <unordered_map>
-#include <unordered_set>
-#include <utility>
-#include <valarray>
-#include <variant>
-#include <vector>
-#include <version>
-#include <wchar.h>
-#include <wctype.h>
diff --git a/libcxx/include/module.modulemap b/libcxx/include/module.modulemap
index cc419122ed2a64..f9f76c76e03e7d 100644
--- a/libcxx/include/module.modulemap
+++ b/libcxx/include/module.modulemap
@@ -1,2117 +1,2200 @@
-// Main C++ standard library interfaces
-module std_algorithm [system] {
-  header "algorithm"
-  export *
-}
-module std_any [system] {
-  header "any"
-  export *
-}
-module std_array [system] {
-  header "array"
-  export *
-}
-module std_atomic [system] {
-  header "atomic"
-  export *
-}
-module std_barrier [system] {
-  header "barrier"
-  export *
-}
-module std_bit [system] {
-  header "bit"
-  export *
-}
-module std_bitset [system] {
-  header "bitset"
-  export *
-}
-module std_charconv [system] {
-  header "charconv"
-  module chars_format            { header "__charconv/chars_format.h" }
-  module from_chars_integral     { header "__charconv/from_chars_integral.h" }
-  module from_chars_result       { header "__charconv/from_chars_result.h" }
-  module tables                  { header "__charconv/tables.h" }
-  module to_chars                { header "__charconv/to_chars.h" }
-  module to_chars_base_10        { header "__charconv/to_chars_base_10.h" }
-  module to_chars_floating_point { header "__charconv/to_chars_floating_point.h" }
-  module to_chars_integral       { header "__charconv/to_chars_integral.h" }
-  module to_chars_result         { header "__charconv/to_chars_result.h" }
-  module traits                  { header "__charconv/traits.h" }
-  export *
-}
-module std_chrono [system] {
-  header "chrono"
-  export *
-}
-module std_codecvt [system] {
-  header "codecvt"
-  export *
-}
-module std_compare [system] {
-  header "compare"
-  export *
-}
-module std_complex [system] {
-  header "complex"
-  export *
-}
-module std_concepts [system] {
-  header "concepts"
-  export *
-}
-module std_condition_variable [system] {
-  header "condition_variable"
-  module condition_variable { header "__condition_variable/condition_variable.h" }
-  export *
-}
-module std_coroutine [system] {
-  header "coroutine"
-  module coroutine_handle      { header "__coroutine/coroutine_handle.h" }
-  module coroutine_traits      { header "__coroutine/coroutine_traits.h" }
-  module noop_coroutine_handle { header "__coroutine/noop_coroutine_handle.h" }
-  module trivial_awaitables    { header "__coroutine/trivial_awaitables.h" }
-  export *
-}
-module std_deque [system] {
-  header "deque"
-  export *
-}
-module std_exception [system] {
-  header "exception"
-  export *
-}
-module std_execution [system] {
-  header "execution"
-  export *
-}
-module std_expected [system] {
-  header "expected"
-  export *
-}
-module std_filesystem [system] {
-  header "filesystem"
-  module copy_options                 { header "__filesystem/copy_options.h" }
-  module directory_entry              { header "__filesystem/directory_entry.h" }
-  module directory_iterator           { header "__filesystem/directory_iterator.h" }
-  module directory_options            { header "__filesystem/directory_options.h" }
-  module file_status                  { header "__filesystem/file_status.h" }
-  module file_time_type               { header "__filesystem/file_time_type.h" }
-  module file_type                    { header "__filesystem/file_type.h" }
-  module filesystem_error             {
-    header "__filesystem/filesystem_error.h"
-    export std_private_memory_shared_ptr
-  }
-  module operations                   { header "__filesystem/operations.h" }
-  module path                         {
-    header "__filesystem/path.h"
-    export std_string // returned by various methods
-  }
-  module path_iterator                { header "__filesystem/path_iterator.h" }
-  module perm_options                 { header "__filesystem/perm_options.h" }
-  module perms                        { header "__filesystem/perms.h" }
-  module recursive_directory_iterator { header "__filesystem/recursive_directory_iterator.h" }
-  module space_info                   { header "__filesystem/space_info.h" }
-  module u8path                       { header "__filesystem/u8path.h" }
-  export *
-}
-module std_format [system] {
-  header "format"
-  export *
-}
-module std_forward_list [system] {
-  header "forward_list"
-  export *
-}
-module std_fstream [system] {
-  header "fstream"
-  export *
-}
-module std_functional [system] {
-  header "functional"
-  export *
-}
-module std_future [system] {
-  header "future"
-  export *
-}
-module std_initializer_list [system] {
-  header "initializer_list"
-  export *
-}
-module std_iomanip [system] {
-  header "iomanip"
-  export *
-}
-module std_ios [system] {
-  header "ios"
-  export *
-}
-module std_iosfwd [system] {
-  header "iosfwd"
-  export *
-}
-module std_iostream [system] {
-  header "iostream"
-  export *
-}
-module std_istream [system] {
-  header "istream"
-  export *
-}
-module std_iterator [system] {
-  header "iterator"
-  export *
-}
-module std_latch [system] {
-  header "latch"
-  export *
-}
-module std_limits [system] {
-  header "limits"
-  export *
-}
-module std_list [system] {
-  header "list"
-  export *
-}
-module std_locale [system] {
-  header "locale"
-  export *
-}
-module std_map [system] {
-  header "map"
-  export *
+// This module contains headers related to the configuration of the library. These headers
+// are free of any dependency on the rest of libc++.
+module std_config [system] {
+  textual header "__config"
+  textual header "__configuration/abi.h"
+  textual header "__configuration/availability.h"
+  textual header "__configuration/compiler.h"
+  textual header "__configuration/language.h"
+  textual header "__configuration/platform.h"
+  textual header "version"
 }
-module std_mdspan [system] {
-  header "mdspan"
-  module default_accessor { header "__mdspan/default_accessor.h" }
-  module extents          { header "__mdspan/extents.h" }
-  module fwd              { header "__fwd/mdspan.h" }
-  module layout_left      { header "__mdspan/layout_left.h" }
-  module layout_right     { header "__mdspan/layout_right.h" }
-  module layout_stride    { header "__mdspan/layout_stride.h" }
-  module mdspan           {
-    header "__mdspan/mdspan.h"
-    export std_array // for strides()
+
+module std_core [system] {
+  module cstddef {
+    module byte         { header "__cstddef/byte.h" }
+    module max_align_t  { header "__cstddef/max_align_t.h" }
+    module nullptr_t    { header "__cstddef/nullptr_t.h" }
+    module ptrdiff_t    { header "__cstddef/ptrdiff_t.h" }
+    module size_t       { header "__cstddef/size_t.h" }
   }
-  export *
-}
-module std_memory [system] {
-  header "memory"
-  export *
-}
-module std_memory_resource [system] {
-  header "memory_resource"
-  export *
-}
-module std_mutex [system] {
-  header "mutex"
-  export *
-}
-module std_new [system] {
-  header "new"
-  export *
-}
-module std_numbers [system] {
-  header "numbers"
-  export *
-}
-module std_numeric [system] {
-  header "numeric"
-  export *
-}
-module std_optional [system] {
-  header "optional"
-  export *
-}
-module std_ostream [system] {
-  header "ostream"
-  export *
-}
-module std_print [system] {
-  header "print"
-  export *
-}
-module std_queue [system] {
-  header "queue"
-  export *
-}
-module std_random [system] {
-  header "random"
-  export *
-}
-module std_ranges [system] {
-  header "ranges"
-  export *
-}
-module std_ratio [system] {
-  header "ratio"
-  export *
-}
-module std_regex [system] {
-  header "regex"
-  export *
-}
-module std_scoped_allocator [system] {
-  header "scoped_allocator"
-  export *
-}
-module std_semaphore [system] {
-  header "semaphore"
-  export *
-}
-module std_set [system] {
-  header "set"
-  export *
-}
-module std_shared_mutex [system] {
-  header "shared_mutex"
-  export std_version
-}
-module std_source_location [system] {
-  header "source_location"
-  export *
-}
-module std_span [system] {
-  header "span"
-  export std_private_ranges_enable_borrowed_range
-  export std_version
-  export std_private_span_span_fwd
-}
-module std_sstream [system] {
-  header "sstream"
-  export *
-}
-module std_stack [system] {
-  header "stack"
-  export *
-}
-module std_stdexcept [system] {
-  header "stdexcept"
-  export *
-}
-module std_stop_token [system] {
-  header "stop_token"
-  private header "__stop_token/atomic_unique_lock.h"
-  private header "__stop_token/intrusive_list_view.h"
-  private header "__stop_token/intrusive_shared_ptr.h"
-  private header "__stop_token/stop_callback.h"
-  private header "__stop_token/stop_source.h"
-  private header "__stop_token/stop_state.h"
-  private header "__stop_token/stop_token.h"
-  export *
-}
-module std_streambuf [system] {
-  header "streambuf"
-  export *
-}
-module std_string [system] {
-  header "string"
-  export *
-}
-module std_string_view [system] {
-  header "string_view"
-  export *
-}
-module std_strstream [system] {
-  header "strstream"
-  export *
-}
-module std_syncstream [system] {
-  header "syncstream"
-  export *
-}
-module std_system_error [system] {
-  header "system_error"
-  export *
-}
-module std_thread [system] {
-  header "thread"
-  export *
-}
-module std_tuple [system] {
-  header "tuple"
-  export *
-}
-module std_type_traits [system] {
-  header "type_traits"
-  export *
-}
-module std_typeindex [system] {
-  header "typeindex"
-  export *
-}
-module std_typeinfo [system] {
-  header "typeinfo"
-  export *
-}
-module std_unordered_map [system] {
-  header "unordered_map"
-  export *
-}
-module std_unordered_set [system] {
-  header "unordered_set"
-  export *
-}
-module std_utility [system] {
-  header "utility"
-  export *
-}
-module std_valarray [system] {
-  header "valarray"
-  export *
-}
-module std_variant [system] {
-  header "variant"
-  export *
-}
-module std_vector [system] {
-  header "vector"
-  export *
-}
-module std_version [system] {
-  header "version"
-  export *
-}
 
-// C standard library interface wrappers
-module std_cassert [system] {
-  // <cassert>'s use of NDEBUG requires textual inclusion.
-  textual header "cassert"
-}
-module std_ccomplex [system] {
-  header "ccomplex"
-  export *
-}
-module std_cctype [system] {
-  header "cctype"
-  export *
-}
-module std_cerrno [system] {
-  header "cerrno"
-  export *
-}
-module std_cfenv [system] {
-  header "cfenv"
-  export *
-}
-module std_cfloat [system] {
-  header "cfloat"
-  export *
-}
-module std_cinttypes [system] {
-  header "cinttypes"
-  export *
-}
-module std_ciso646 [system] {
-  header "ciso646"
-  export *
-}
-module std_climits [system] {
-  header "climits"
-  export *
-}
-module std_clocale [system] {
-  header "clocale"
-  export *
-}
-module std_cmath [system] {
-  header "cmath"
-  export *
-}
-module std_csetjmp [system] {
-  header "csetjmp"
-  export *
-}
-module std_csignal [system] {
-  header "csignal"
-  export *
-}
-// FIXME: <cstdalign> is missing.
-module std_cstdarg [system] {
-  header "cstdarg"
-  export *
-}
-module std_cstdbool [system] {
-  header "cstdbool"
-  export *
-}
-module std_cstddef [system] {
-  header "cstddef"
-  module byte         { header "__cstddef/byte.h" }
-  module max_align_t  { header "__cstddef/max_align_t.h" }
-  module nullptr_t    { header "__cstddef/nullptr_t.h" }
-  module ptrdiff_t    { header "__cstddef/ptrdiff_t.h" }
-  module size_t       { header "__cstddef/size_t.h" }
-  export *
-}
-module std_cstdint [system] {
-  header "cstdint"
-  export *
-}
-module std_cstdio [system] {
-  header "cstdio"
-  export *
-}
-module std_cstdlib [system] {
-  header "cstdlib"
-  export *
-}
-module std_cstring [system] {
-  header "cstring"
-  export *
-}
-module std_ctgmath [system] {
-  header "ctgmath"
-  export *
-}
-module std_ctime [system] {
-  header "ctime"
-  export *
-}
-module std_cuchar [system] {
-  header "cuchar"
-  export *
-}
-module std_cwchar [system] {
-  header "cwchar"
-  export *
-}
-module std_cwctype [system] {
-  header "cwctype"
-  export *
-}
+  module cstdint {
+    header "cstdint"
+    export *
+  }
 
-// C standard library interfaces augmented/replaced in C++
-// <assert.h> provided by C library.
-module std_complex_h [system] {
-  header "complex.h"
-  export *
-}
-module std_ctype_h [system] {
-  header "ctype.h"
-  export *
-}
-module std_errno_h [system] {
-  header "errno.h"
-  export *
-}
-module std_fenv_h [system] {
-  header "fenv.h"
-  export *
-}
-module std_float_h [system] {
-  header "float.h"
-  export *
-}
-module std_inttypes_h [system] {
-  header "inttypes.h"
-  export *
-}
-// <iso646.h> provided by compiler.
-module std_locale_h [system] {
-  header "locale.h"
-  export *
-}
-module std_math_h [system] {
-  header "math.h"
-  export *
-}
-// <setjmp.h> provided by C library.
-// <signal.h> provided by C library.
-// FIXME: <stdalign.h> is missing.
-// <stdarg.h> provided by compiler.
-module std_stdatomic_h [system] {
-  header "stdatomic.h"
-  export *
-}
-module std_stdbool_h [system] {
-  // <stdbool.h>'s __bool_true_false_are_defined macro requires textual inclusion.
-  textual header "stdbool.h"
-  export *
-}
-module std_stddef_h [system] {
-  // <stddef.h>'s __need_* macros require textual inclusion.
-  textual header "stddef.h"
-  export *
-}
-module std_stdint_h [system] {
-  header "stdint.h"
-  export *
-}
-module std_stdio_h [system] {
-  // <stdio.h>'s __need_* macros require textual inclusion.
-  textual header "stdio.h"
-  export *
-}
-module std_stdlib_h [system] {
-  // <stdlib.h>'s __need_* macros require textual inclusion.
-  textual header "stdlib.h"
-  export *
-}
-module std_string_h [system] {
-  header "string.h"
-  export *
-}
-module std_tgmath_h [system] {
-  header "tgmath.h"
-  export *
-}
-module std_uchar_h [system] {
-  header "uchar.h"
-  export *
-}
-// <time.h> provided by C library.
-module std_wchar_h [system] {
-  // <wchar.h>'s __need_* macros require textual inclusion.
-  textual header "wchar.h"
-  export *
-}
-module std_wctype_h [system] {
-  header "wctype.h"
-  export *
-}
+  module fwd {
+    module byte         { header "__fwd/byte.h" }
+    module functional   { header "__fwd/functional.h" }
+    module pair         { header "__fwd/pair.h" }
+    module tuple        { header "__fwd/tuple.h" }
+  }
+
+  module limits {
+    header "limits"
+    export *
+  }
+
+  module math {
+    module abs                              { header "__math/abs.h" }
+    module copysign                         { header "__math/copysign.h" }
+    module error_functions                  { header "__math/error_functions.h" }
+    module exponential_functions            { header "__math/exponential_functions.h" }
+    module fdim                             { header "__math/fdim.h" }
+    module fma                              { header "__math/fma.h" }
+    module gamma                            { header "__math/gamma.h" }
+    module hyperbolic_functions             { header "__math/hyperbolic_functions.h" }
+    module hypot                            { header "__math/hypot.h" }
+    module inverse_hyperbolic_functions     { header "__math/inverse_hyperbolic_functions.h" }
+    module inverse_trigonometric_functions  { header "__math/inverse_trigonometric_functions.h" }
+    module logarithms                       { header "__math/logarithms.h" }
+    module min_max                          { header "__math/min_max.h" }
+    module modulo                           { header "__math/modulo.h" }
+    module remainder                        { header "__math/remainder.h" }
+    module roots                            { header "__math/roots.h" }
+    module rounding_functions               { header "__math/rounding_functions.h" }
+    module special_functions                { header "__math/special_functions.h" }
+    module traits                           { header "__math/traits.h" }
+    module trigonometric_functions          { header "__math/trigonometric_functions.h" }
+  }
+
+  module type_traits {
+    module add_const                                  { header "__type_traits/add_const.h" }
+    module add_cv                                     { header "__type_traits/add_cv.h" }
+    module add_lvalue_reference                       { header "__type_traits/add_lvalue_reference.h" }
+    module add_pointer                                { header "__type_traits/add_pointer.h" }
+    module add_rvalue_reference                       { header "__type_traits/add_rvalue_reference.h" }
+    module add_volatile                               { header "__type_traits/add_volatile.h" }
+    module aligned_storage                            { header "__type_traits/aligned_storage.h" }
+    module aligned_union                              { header "__type_traits/aligned_union.h" }
+    module alignment_of                               { header "__type_traits/alignment_of.h" }
+    module can_extract_key                            { header "__type_traits/can_extract_key.h" }
+    module common_reference                           { header "__type_traits/common_reference.h" }
+    module common_type                                { header "__type_traits/common_type.h" }
+    module conditional                                { header "__type_traits/conditional.h" }
+    module conjunction                                { header "__type_traits/conjunction.h" }
+    module copy_cv                                    { header "__type_traits/copy_cv.h" }
+    module copy_cvref                                 { header "__type_traits/copy_cvref.h" }
+    module datasizeof                                 { header "__type_traits/datasizeof.h" }
+    module decay                                      { header "__type_traits/decay.h" }
+    module dependent_type                             { header "__type_traits/dependent_type.h" }
+    module desugars_to                                { header "__type_traits/desugars_to.h" }
+    module disjunction                                { header "__type_traits/disjunction.h" }
+    module enable_if                                  { header "__type_traits/enable_if.h" }
+    module extent                                     { header "__type_traits/extent.h" }
+    module has_unique_object_representation           { header "__type_traits/has_unique_object_representation.h" }
+    module has_virtual_destructor                     { header "__type_traits/has_virtual_destructor.h" }
+    module integral_constant                          { header "__type_traits/integral_constant.h" }
+    module invoke                                     { header "__type_traits/invoke.h" }
+    module is_abstract {
+      header "__type_traits/is_abstract.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_aggregate {
+      header "__type_traits/is_aggregate.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_allocator {
+      header "__type_traits/is_allocator.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_always_bitcastable {
+      header "__type_traits/is_always_bitcastable.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_arithmetic {
+      header "__type_traits/is_arithmetic.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_array {
+      header "__type_traits/is_array.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_assignable {
+      header "__type_traits/is_assignable.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_base_of {
+      header "__type_traits/is_base_of.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_bounded_array {
+      header "__type_traits/is_bounded_array.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_callable {
+      header "__type_traits/is_callable.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_char_like_type {
+      header "__type_traits/is_char_like_type.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_class {
+      header "__type_traits/is_class.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_compound {
+      header "__type_traits/is_compound.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_const {
+      header "__type_traits/is_const.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_constant_evaluated {
+      header "__type_traits/is_constant_evaluated.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_constructible {
+      header "__type_traits/is_constructible.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_convertible {
+      header "__type_traits/is_convertible.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_core_convertible {
+      header "__type_traits/is_core_convertible.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_destructible {
+      header "__type_traits/is_destructible.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_empty {
+      header "__type_traits/is_empty.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_enum {
+      header "__type_traits/is_enum.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_equality_comparable {
+      header "__type_traits/is_equality_comparable.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_execution_policy {
+      header "__type_traits/is_execution_policy.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_final {
+      header "__type_traits/is_final.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_floating_point {
+      header "__type_traits/is_floating_point.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_function {
+      header "__type_traits/is_function.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_fundamental {
+      header "__type_traits/is_fundamental.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_implicitly_default_constructible {
+      header "__type_traits/is_implicitly_default_constructible.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_integral {
+      header "__type_traits/is_integral.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_literal_type {
+      header "__type_traits/is_literal_type.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_member_pointer {
+      header "__type_traits/is_member_pointer.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_nothrow_assignable {
+      header "__type_traits/is_nothrow_assignable.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_nothrow_constructible {
+      header "__type_traits/is_nothrow_constructible.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_nothrow_convertible {
+      header "__type_traits/is_nothrow_convertible.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_nothrow_destructible {
+      header "__type_traits/is_nothrow_destructible.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_null_pointer {
+      header "__type_traits/is_null_pointer.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_object {
+      header "__type_traits/is_object.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_pod {
+      header "__type_traits/is_pod.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_pointer {
+      header "__type_traits/is_pointer.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_polymorphic {
+      header "__type_traits/is_polymorphic.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_primary_template {
+      header "__type_traits/is_primary_template.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_reference_wrapper {
+      header "__type_traits/is_reference_wrapper.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_reference {
+      header "__type_traits/is_reference.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_referenceable {
+      header "__type_traits/is_referenceable.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_same {
+      header "__type_traits/is_same.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_scalar {
+      header "__type_traits/is_scalar.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_signed_integer {
+      header "__type_traits/is_signed_integer.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_signed {
+      header "__type_traits/is_signed.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_specialization {
+      header "__type_traits/is_specialization.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_standard_layout {
+      header "__type_traits/is_standard_layout.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_swappable {
+      header "__type_traits/is_swappable.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_trivial {
+      header "__type_traits/is_trivial.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_trivially_assignable {
+      header "__type_traits/is_trivially_assignable.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_trivially_constructible {
+      header "__type_traits/is_trivially_constructible.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_trivially_copyable {
+      header "__type_traits/is_trivially_copyable.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_trivially_destructible {
+      header "__type_traits/is_trivially_destructible.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_trivially_lexicographically_comparable {
+      header "__type_traits/is_trivially_lexicographically_comparable.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_trivially_relocatable {
+      header "__type_traits/is_trivially_relocatable.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_unbounded_array {
+      header "__type_traits/is_unbounded_array.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_union {
+      header "__type_traits/is_union.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_unsigned_integer {
+      header "__type_traits/is_unsigned_integer.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_unsigned {
+      header "__type_traits/is_unsigned.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_valid_expansion {
+      header "__type_traits/is_valid_expansion.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_void {
+      header "__type_traits/is_void.h"
+      export std_core.type_traits.integral_constant
+    }
+    module is_volatile {
+      header "__type_traits/is_volatile.h"
+      export std_core.type_traits.integral_constant
+    }
+    module lazy                                       { header "__type_traits/lazy.h" }
+    module make_32_64_or_128_bit                      { header "__type_traits/make_32_64_or_128_bit.h" }
+    module make_const_lvalue_ref                      { header "__type_traits/make_const_lvalue_ref.h" }
+    module make_signed                                { header "__type_traits/make_signed.h" }
+    module make_unsigned                              { header "__type_traits/make_unsigned.h" }
+    module maybe_const                                { header "__type_traits/maybe_const.h" }
+    module nat                                        { header "__type_traits/nat.h" }
+    module negation                                   { header "__type_traits/negation.h" }
+    module promote                                    { header "__type_traits/promote.h" }
+    module rank                                       { header "__type_traits/rank.h" }
+    module remove_all_extents                         { header "__type_traits/remove_all_extents.h" }
+    module remove_const_ref                           { header "__type_traits/remove_const_ref.h" }
+    module remove_const                               { header "__type_traits/remove_const.h" }
+    module remove_cv                                  { header "__type_traits/remove_cv.h" }
+    module remove_cvref                               { header "__type_traits/remove_cvref.h" }
+    module remove_extent                              { header "__type_traits/remove_extent.h" }
+    module remove_pointer                             { header "__type_traits/remove_pointer.h" }
+    module remove_reference                           { header "__type_traits/remove_reference.h" }
+    module remove_volatile                            { header "__type_traits/remove_volatile.h" }
+    module result_of                                  { header "__type_traits/result_of.h" }
+    module strip_signature                            { header "__type_traits/strip_signature.h" }
+    module type_identity                              { header "__type_traits/type_identity.h" }
+    module type_list                                  { header "__type_traits/type_list.h" }
+    module underlying_type                            { header "__type_traits/underlying_type.h" }
+    module unwrap_ref                                 { header "__type_traits/unwrap_ref.h" }
+    module void_t                                     { header "__type_traits/void_t.h" }
+
+    header "type_traits"
+    export *
+  } // module type_traits
+
+  // Only the truly dependency-free parts of __utility are here
+  module utility_core {
+    module declval  { header "__utility/declval.h" }
+    module forward  { header "__utility/forward.h" }
+  }
+} // module std_core
+
+module std [system] {
+  module algorithm {
+    module adjacent_find                          { header "__algorithm/adjacent_find.h" }
+    module all_of                                 { header "__algorithm/all_of.h" }
+    module any_of                                 { header "__algorithm/any_of.h" }
+    module binary_search                          { header "__algorithm/binary_search.h" }
+    module clamp                                  { header "__algorithm/clamp.h" }
+    module comp_ref_type                          { header "__algorithm/comp_ref_type.h" }
+    module comp                                   { header "__algorithm/comp.h" }
+    module copy_backward                          { header "__algorithm/copy_backward.h" }
+    module copy_if                                { header "__algorithm/copy_if.h" }
+    module copy_move_common                       { header "__algorithm/copy_move_common.h" }
+    module copy_n                                 { header "__algorithm/copy_n.h" }
+    module copy                                   { header "__algorithm/copy.h" }
+    module count_if                               { header "__algorithm/count_if.h" }
+    module count                                  { header "__algorithm/count.h" }
+    module equal_range                            { header "__algorithm/equal_range.h" }
+    module equal                                  { header "__algorithm/equal.h" }
+    module fill_n                                 { header "__algorithm/fill_n.h" }
+    module fill                                   { header "__algorithm/fill.h" }
+    module find_end                               { header "__algorithm/find_end.h" }
+    module find_first_of                          { header "__algorithm/find_first_of.h" }
+    module find_if_not                            { header "__algorithm/find_if_not.h" }
+    module find_if                                { header "__algorithm/find_if.h" }
+    module find_segment_if                        { header "__algorithm/find_segment_if.h" }
+    module find                                   { header "__algorithm/find.h" }
+    module fold                                   { header "__algorithm/fold.h" }
+    module for_each_n                             { header "__algorithm/for_each_n.h" }
+    module for_each_segment                       { header "__algorithm/for_each_segment.h" }
+    module for_each                               { header "__algorithm/for_each.h" }
+    module generate_n                             { header "__algorithm/generate_n.h" }
+    module generate                               { header "__algorithm/generate.h" }
+    module half_positive                          { header "__algorithm/half_positive.h" }
+    module in_found_result                        { header "__algorithm/in_found_result.h" }
+    module in_fun_result                          { header "__algorithm/in_fun_result.h" }
+    module in_in_out_result                       { header "__algorithm/in_in_out_result.h" }
+    module in_in_result                           { header "__algorithm/in_in_result.h" }
+    module in_out_out_result                      { header "__algorithm/in_out_out_result.h" }
+    module in_out_result                          { header "__algorithm/in_out_result.h" }
+    module includes                               { header "__algorithm/includes.h" }
+    module inplace_merge                          { header "__algorithm/inplace_merge.h" }
+    module is_heap_until                          { header "__algorithm/is_heap_until.h" }
+    module is_heap                                { header "__algorithm/is_heap.h" }
+    module is_partitioned                         { header "__algorithm/is_partitioned.h" }
+    module is_permutation                         { header "__algorithm/is_permutation.h" }
+    module is_sorted_until                        { header "__algorithm/is_sorted_until.h" }
+    module is_sorted                              { header "__algorithm/is_sorted.h" }
+    module iter_swap                              { header "__algorithm/iter_swap.h" }
+    module iterator_operations {
+      header "__algorithm/iterator_operations.h"
+      export std.iterator.advance
+      export std.iterator.distance
+      export std.iterator.iter_move
+      export std.iterator.iter_swap
+      export std.iterator.next
+      export std.iterator.prev
+    }
+    module lexicographical_compare_three_way      { header "__algorithm/lexicographical_compare_three_way.h" }
+    module lexicographical_compare                { header "__algorithm/lexicographical_compare.h" }
+    module lower_bound                            { header "__algorithm/lower_bound.h" }
+    module make_heap                              { header "__algorithm/make_heap.h" }
+    module make_projected                         { header "__algorithm/make_projected.h" }
+    module max_element                            { header "__algorithm/max_element.h" }
+    module max                                    { header "__algorithm/max.h" }
+    module merge                                  { header "__algorithm/merge.h" }
+    module min_element                            { header "__algorithm/min_element.h" }
+    module min_max_result                         { header "__algorithm/min_max_result.h" }
+    module min                                    { header "__algorithm/min.h" }
+    module minmax_element                         { header "__algorithm/minmax_element.h" }
+    module minmax {
+      header "__algorithm/minmax.h"
+      export std.utility.pair // return type
+    }
+    module mismatch {
+      header "__algorithm/mismatch.h"
+      export std.utility.pair // return type
+    }
+    module move_backward                          { header "__algorithm/move_backward.h" }
+    module move                                   { header "__algorithm/move.h" }
+    module next_permutation                       { header "__algorithm/next_permutation.h" }
+    module none_of                                { header "__algorithm/none_of.h" }
+    module nth_element                            { header "__algorithm/nth_element.h" }
+    module partial_sort_copy                      { header "__algorithm/partial_sort_copy.h" }
+    module partial_sort                           { header "__algorithm/partial_sort.h" }
+    module partition_copy                         { header "__algorithm/partition_copy.h" }
+    module partition_point                        { header "__algorithm/partition_point.h" }
+    module partition                              { header "__algorithm/partition.h" }
+    module pop_heap                               { header "__algorithm/pop_heap.h" }
+    module prev_permutation                       { header "__algorithm/prev_permutation.h" }
+    module pstl                                   { header "__algorithm/pstl.h" }
+    module push_heap                              { header "__algorithm/push_heap.h" }
+    module ranges_adjacent_find                   { header "__algorithm/ranges_adjacent_find.h" }
+    module ranges_all_of                          { header "__algorithm/ranges_all_of.h" }
+    module ranges_any_of                          { header "__algorithm/ranges_any_of.h" }
+    module ranges_binary_search {
+      header "__algorithm/ranges_binary_search.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_clamp {
+      header "__algorithm/ranges_clamp.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_contains_subrange {
+      header "__algorithm/ranges_contains_subrange.h"
+    }
+    module ranges_contains {
+      header "__algorithm/ranges_contains.h"
+    }
+    module ranges_copy_backward {
+      header "__algorithm/ranges_copy_backward.h"
+      export std.algorithm.in_out_result
+    }
+    module ranges_copy_if {
+      header "__algorithm/ranges_copy_if.h"
+      export std.algorithm.in_out_result
+    }
+    module ranges_copy_n {
+      header "__algorithm/ranges_copy_n.h"
+      export std.algorithm.in_out_result
+    }
+    module ranges_copy {
+      header "__algorithm/ranges_copy.h"
+      export std.algorithm.in_out_result
+    }
+    module ranges_count_if                        { header "__algorithm/ranges_count_if.h" }
+    module ranges_count                           { header "__algorithm/ranges_count.h" }
+    module ranges_ends_with                       { header "__algorithm/ranges_ends_with.h" }
+    module ranges_equal_range {
+      header "__algorithm/ranges_equal_range.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_equal {
+      header "__algorithm/ranges_equal.h"
+      export std.functional.identity
+    }
+    module ranges_fill_n                          { header "__algorithm/ranges_fill_n.h" }
+    module ranges_fill                            { header "__algorithm/ranges_fill.h" }
+    module ranges_find_end                        { header "__algorithm/ranges_find_end.h" }
+    module ranges_find_first_of                   { header "__algorithm/ranges_find_first_of.h" }
+    module ranges_find_if_not                     { header "__algorithm/ranges_find_if_not.h" }
+    module ranges_find_if                         { header "__algorithm/ranges_find_if.h" }
+    module ranges_find_last                       { header "__algorithm/ranges_find_last.h" }
+    module ranges_find                            { header "__algorithm/ranges_find.h" }
+    module ranges_for_each_n {
+      header "__algorithm/ranges_for_each_n.h"
+      export std.algorithm.in_fun_result
+    }
+    module ranges_for_each {
+      header "__algorithm/ranges_for_each.h"
+      export std.algorithm.in_fun_result
+    }
+    module ranges_generate_n {
+      header "__algorithm/ranges_generate_n.h"
+    }
+    module ranges_generate {
+      header "__algorithm/ranges_generate.h"
+    }
+    module ranges_includes {
+      header "__algorithm/ranges_includes.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_inplace_merge {
+      header "__algorithm/ranges_inplace_merge.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_is_heap_until {
+      header "__algorithm/ranges_is_heap_until.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_is_heap {
+      header "__algorithm/ranges_is_heap.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_is_partitioned {
+      header "__algorithm/ranges_is_partitioned.h"
+    }
+    module ranges_is_permutation {
+      header "__algorithm/ranges_is_permutation.h"
+    }
+    module ranges_is_sorted_until {
+      header "__algorithm/ranges_is_sorted_until.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_is_sorted {
+      header "__algorithm/ranges_is_sorted.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_iterator_concept {
+      header "__algorithm/ranges_iterator_concept.h"
+    }
+    module ranges_lexicographical_compare {
+      header "__algorithm/ranges_lexicographical_compare.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_lower_bound {
+      header "__algorithm/ranges_lower_bound.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_make_heap {
+      header "__algorithm/ranges_make_heap.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_max_element {
+      header "__algorithm/ranges_max_element.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_max {
+      header "__algorithm/ranges_max.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_merge {
+      header "__algorithm/ranges_merge.h"
+      export std.functional.ranges_operations
+      export std.algorithm.in_in_out_result
+    }
+    module ranges_min_element {
+      header "__algorithm/ranges_min_element.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_min {
+      header "__algorithm/ranges_min.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_minmax_element {
+      header "__algorithm/ranges_minmax_element.h"
+      export std.functional.ranges_operations
+      export std.algorithm.min_max_result
+    }
+    module ranges_minmax {
+      header "__algorithm/ranges_minmax.h"
+      export std.functional.ranges_operations
+      export std.algorithm.min_max_result
+    }
+    module ranges_mismatch {
+      header "__algorithm/ranges_mismatch.h"
+      export std.algorithm.in_in_result
+    }
+    module ranges_move_backward {
+      header "__algorithm/ranges_move_backward.h"
+      export std.algorithm.in_out_result
+    }
+    module ranges_move {
+      header "__algorithm/ranges_move.h"
+      export std.algorithm.in_out_result
+    }
+    module ranges_next_permutation {
+      header "__algorithm/ranges_next_permutation.h"
+      export std.functional.ranges_operations
+      export std.algorithm.in_found_result
+    }
+    module ranges_none_of {
+      header "__algorithm/ranges_none_of.h"
+    }
+    module ranges_nth_element {
+      header "__algorithm/ranges_nth_element.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_partial_sort_copy {
+      header "__algorithm/ranges_partial_sort_copy.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_partial_sort {
+      header "__algorithm/ranges_partial_sort.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_partition_copy {
+      header "__algorithm/ranges_partition_copy.h"
+      export std.algorithm.in_out_out_result
+    }
+    module ranges_partition_point {
+      header "__algorithm/ranges_partition_point.h"
+    }
+    module ranges_partition {
+      header "__algorithm/ranges_partition.h"
+    }
+    module ranges_pop_heap {
+      header "__algorithm/ranges_pop_heap.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_prev_permutation {
+      header "__algorithm/ranges_prev_permutation.h"
+      export std.functional.ranges_operations
+      export std.algorithm.in_found_result
+    }
+    module ranges_push_heap {
+      header "__algorithm/ranges_push_heap.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_remove_copy_if {
+      header "__algorithm/ranges_remove_copy_if.h"
+      export std.algorithm.in_out_result
+    }
+    module ranges_remove_copy {
+      header "__algorithm/ranges_remove_copy.h"
+      export std.algorithm.in_out_result
+    }
+    module ranges_remove_if {
+      header "__algorithm/ranges_remove_if.h"
+    }
+    module ranges_remove {
+      header "__algorithm/ranges_remove.h"
+    }
+    module ranges_replace_copy_if {
+      header "__algorithm/ranges_replace_copy_if.h"
+      export std.algorithm.in_out_result
+    }
+    module ranges_replace_copy {
+      header "__algorithm/ranges_replace_copy.h"
+      export std.algorithm.in_out_result
+    }
+    module ranges_replace_if {
+      header "__algorithm/ranges_replace_if.h"
+    }
+    module ranges_replace {
+      header "__algorithm/ranges_replace.h"
+    }
+    module ranges_reverse_copy {
+      header "__algorithm/ranges_reverse_copy.h"
+      export std.algorithm.in_out_result
+    }
+    module ranges_reverse {
+      header "__algorithm/ranges_reverse.h"
+    }
+    module ranges_rotate_copy {
+      header "__algorithm/ranges_rotate_copy.h"
+      export std.algorithm.in_out_result
+    }
+    module ranges_rotate                          { header "__algorithm/ranges_rotate.h" }
+    module ranges_sample                          { header "__algorithm/ranges_sample.h" }
+    module ranges_search_n                        { header "__algorithm/ranges_search_n.h" }
+    module ranges_search                          { header "__algorithm/ranges_search.h" }
+    module ranges_set_difference {
+      header "__algorithm/ranges_set_difference.h"
+      export std.functional.ranges_operations
+      export std.algorithm.in_out_result
+    }
+    module ranges_set_intersection {
+      header "__algorithm/ranges_set_intersection.h"
+      export std.functional.ranges_operations
+      export std.algorithm.in_in_out_result
+    }
+    module ranges_set_symmetric_difference {
+      header "__algorithm/ranges_set_symmetric_difference.h"
+      export std.functional.ranges_operations
+      export std.algorithm.in_in_out_result
+    }
+    module ranges_set_union {
+      header "__algorithm/ranges_set_union.h"
+      export std.functional.ranges_operations
+      export std.algorithm.in_in_out_result
+    }
+    module ranges_shuffle {
+      header "__algorithm/ranges_shuffle.h"
+    }
+    module ranges_sort_heap {
+      header "__algorithm/ranges_sort_heap.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_sort {
+      header "__algorithm/ranges_sort.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_stable_partition {
+      header "__algorithm/ranges_stable_partition.h"
+    }
+    module ranges_stable_sort {
+      header "__algorithm/ranges_stable_sort.h"
+      export std.functional.ranges_operations
+    }
+    module ranges_starts_with {
+      header "__algorithm/ranges_starts_with.h"
+    }
+    module ranges_swap_ranges {
+      header "__algorithm/ranges_swap_ranges.h"
+      export std.algorithm.in_in_result
+    }
+    module ranges_transform {
+      header "__algorithm/ranges_transform.h"
+      export std.algorithm.in_out_result
+      export std.algorithm.in_in_out_result
+    }
+    module ranges_unique_copy {
+      header "__algorithm/ranges_unique_copy.h"
+    }
+    module ranges_unique {
+      header "__algorithm/ranges_unique.h"
+    }
+    module ranges_upper_bound {
+      header "__algorithm/ranges_upper_bound.h"
+      export std.functional.ranges_operations
+    }
+    module remove_copy_if                         { header "__algorithm/remove_copy_if.h" }
+    module remove_copy                            { header "__algorithm/remove_copy.h" }
+    module remove_if                              { header "__algorithm/remove_if.h" }
+    module remove                                 { header "__algorithm/remove.h" }
+    module replace_copy_if                        { header "__algorithm/replace_copy_if.h" }
+    module replace_copy                           { header "__algorithm/replace_copy.h" }
+    module replace_if                             { header "__algorithm/replace_if.h" }
+    module replace                                { header "__algorithm/replace.h" }
+    module reverse_copy                           { header "__algorithm/reverse_copy.h" }
+    module reverse                                { header "__algorithm/reverse.h" }
+    module rotate_copy                            { header "__algorithm/rotate_copy.h" }
+    module rotate                                 { header "__algorithm/rotate.h" }
+    module sample                                 { header "__algorithm/sample.h" }
+    module search_n                               { header "__algorithm/search_n.h" }
+    module search                                 { header "__algorithm/search.h" }
+    module set_difference                         { header "__algorithm/set_difference.h" }
+    module set_intersection                       { header "__algorithm/set_intersection.h" }
+    module set_symmetric_difference               { header "__algorithm/set_symmetric_difference.h" }
+    module set_union                              { header "__algorithm/set_union.h" }
+    module shift_left                             { header "__algorithm/shift_left.h" }
+    module shift_right                            { header "__algorithm/shift_right.h" }
+    module shuffle                                { header "__algorithm/shuffle.h" }
+    module sift_down                              { header "__algorithm/sift_down.h" }
+    module simd_utils                             { header "__algorithm/simd_utils.h" }
+    module sort_heap                              { header "__algorithm/sort_heap.h" }
+    module sort                                   { header "__algorithm/sort.h" }
+    module stable_partition                       { header "__algorithm/stable_partition.h" }
+    module stable_sort                            { header "__algorithm/stable_sort.h" }
+    module swap_ranges                            { header "__algorithm/swap_ranges.h" }
+    module three_way_comp_ref_type                { header "__algorithm/three_way_comp_ref_type.h" }
+    module transform                              { header "__algorithm/transform.h" }
+    module uniform_random_bit_generator_adaptor   { header "__algorithm/uniform_random_bit_generator_adaptor.h" }
+    module unique_copy                            { header "__algorithm/unique_copy.h" }
+    module unique                                 { header "__algorithm/unique.h" }
+    module unwrap_iter                            { header "__algorithm/unwrap_iter.h" }
+    module unwrap_range                           { header "__algorithm/unwrap_range.h" }
+    module upper_bound                            { header "__algorithm/upper_bound.h" }
+
+    header "algorithm"
+    export *
+  } // module algorithm
+
+  module any {
+    header "any"
+    export *
+  }
+
+  module array {
+    module fwd { header "__fwd/array.h" }
+
+    header "array"
+    export *
+  }
+
+  module atomic {
+    module aliases                { header "__atomic/aliases.h" }
+    module atomic_base            { header "__atomic/atomic_base.h" }
+    module atomic_flag            { header "__atomic/atomic_flag.h" }
+    module atomic_init            { header "__atomic/atomic_init.h" }
+    module atomic_lock_free       { header "__atomic/atomic_lock_free.h" }
+    module atomic_ref             { header "__atomic/atomic_ref.h" }
+    module atomic_sync            { header "__atomic/atomic_sync.h" }
+    module atomic {
+      header "__atomic/atomic.h"
+      export std.atomic.atomic_base // most of std::atomic methods are defined there
+    }
+    module check_memory_order     { header "__atomic/check_memory_order.h" }
+    module contention_t           { header "__atomic/contention_t.h" }
+    module cxx_atomic_impl        { header "__atomic/cxx_atomic_impl.h" }
+    module fence                  { header "__atomic/fence.h" }
+    module is_always_lock_free    { header "__atomic/is_always_lock_free.h" }
+    module kill_dependency        { header "__atomic/kill_dependency.h" }
+    module memory_order           { header "__atomic/memory_order.h" }
+    module to_gcc_order           { header "__atomic/to_gcc_order.h" }
+
+    header "atomic"
+    export *
+  }
+
+  module barrier {
+    header "barrier"
+    export *
+  }
+
+  module bit {
+    module bit_cast         { header "__bit/bit_cast.h" }
+    module bit_ceil         { header "__bit/bit_ceil.h" }
+    module bit_floor        { header "__bit/bit_floor.h" }
+    module bit_log2         { header "__bit/bit_log2.h" }
+    module bit_width        { header "__bit/bit_width.h" }
+    module blsr             { header "__bit/blsr.h" }
+    module byteswap         { header "__bit/byteswap.h" }
+    module countl           { header "__bit/countl.h" }
+    module countr           { header "__bit/countr.h" }
+    module endian           { header "__bit/endian.h" }
+    module has_single_bit   { header "__bit/has_single_bit.h" }
+    module invert_if        { header "__bit/invert_if.h" }
+    module popcount         { header "__bit/popcount.h" }
+    module rotate           { header "__bit/rotate.h" }
+
+    header "bit"
+    export *
+  }
+
+  module bitset {
+    header "bitset"
+    export *
+  }
+
+  module charconv {
+    module chars_format               { header "__charconv/chars_format.h" }
+    module from_chars_integral        { header "__charconv/from_chars_integral.h" }
+    module from_chars_result          { header "__charconv/from_chars_result.h" }
+    module tables                     { header "__charconv/tables.h" }
+    module to_chars                   { header "__charconv/to_chars.h" }
+    module to_chars_base_10           { header "__charconv/to_chars_base_10.h" }
+    module to_chars_floating_point    { header "__charconv/to_chars_floating_point.h" }
+    module to_chars_integral          { header "__charconv/to_chars_integral.h" }
+    module to_chars_result            { header "__charconv/to_chars_result.h" }
+    module traits                     { header "__charconv/traits.h" }
+
+    header "charconv"
+    export *
+  }
+
+  module chrono {
+    module calendar                   { header "__chrono/calendar.h" }
+    module concepts                   { header "__chrono/concepts.h" }
+    module convert_to_timespec        { header "__chrono/convert_to_timespec.h" }
+    module convert_to_tm              { header "__chrono/convert_to_tm.h" }
+    module day                        { header "__chrono/day.h" }
+    module duration                   { header "__chrono/duration.h" }
+    module exception                  { header "__chrono/exception.h" }
+    module file_clock                 { header "__chrono/file_clock.h" }
+    module formatter                  { header "__chrono/formatter.h" }
+    module hh_mm_ss                   { header "__chrono/hh_mm_ss.h" }
+    module high_resolution_clock {
+      header "__chrono/high_resolution_clock.h"
+      export *
+    }
+    module leap_second {
+      header "__chrono/leap_second.h"
+    }
+    module literals {
+      header "__chrono/literals.h"
+    }
+    module local_info {
+      header "__chrono/local_info.h"
+      export std.chrono.sys_info
+    }
+    module month_weekday              { header "__chrono/month_weekday.h" }
+    module month                      { header "__chrono/month.h" }
+    module monthday                   { header "__chrono/monthday.h" }
+    module ostream                    { header "__chrono/ostream.h" }
+    module parser_std_format_spec     { header "__chrono/parser_std_format_spec.h" }
+    module statically_widen           { header "__chrono/statically_widen.h" }
+    module steady_clock {
+      header "__chrono/steady_clock.h"
+      export std.chrono.time_point
+    }
+    module sys_info {
+      header "__chrono/sys_info.h"
+    }
+    module system_clock {
+      header "__chrono/system_clock.h"
+      export std.chrono.time_point
+    }
+    module time_point                 { header "__chrono/time_point.h" }
+    module time_zone_link             { header "__chrono/time_zone_link.h" }
+    module time_zone                  { header "__chrono/time_zone.h" }
+    module tzdb_list {
+      header "__chrono/tzdb_list.h"
+      export std.forward_list // forward_list iterators are used to implement this API
+      export std.string_view // by-value argument of type std::string_view
+    }
+    module tzdb {
+      header "__chrono/tzdb.h"
+      export std.string // public data member of type std::string
+      export std.vector // public data members of type std::vector
+    }
+    module weekday                    { header "__chrono/weekday.h" }
+    module year_month_day             { header "__chrono/year_month_day.h" }
+    module year_month_weekday         { header "__chrono/year_month_weekday.h" }
+    module year_month                 { header "__chrono/year_month.h" }
+    module year                       { header "__chrono/year.h" }
+    module zoned_time                 { header "__chrono/zoned_time.h" }
+
+    header "chrono"
+    export *
+  } // module chrono
+
+  module codecvt {
+    header "codecvt"
+    export *
+  }
+
+  module compare {
+    module common_comparison_category       { header "__compare/common_comparison_category.h" }
+    module compare_partial_order_fallback   { header "__compare/compare_partial_order_fallback.h" }
+    module compare_strong_order_fallback    { header "__compare/compare_strong_order_fallback.h" }
+    module compare_three_way                { header "__compare/compare_three_way.h" }
+    module compare_three_way_result         { header "__compare/compare_three_way_result.h" }
+    module compare_weak_order_fallback      { header "__compare/compare_weak_order_fallback.h" }
+    module is_eq                            { header "__compare/is_eq.h" }
+    module ordering                         { header "__compare/ordering.h" }
+    module partial_order                    { header "__compare/partial_order.h" }
+    module strong_order                     { header "__compare/strong_order.h" }
+    module synth_three_way                  { header "__compare/synth_three_way.h" }
+    module three_way_comparable             { header "__compare/three_way_comparable.h" }
+    module weak_order                       { header "__compare/weak_order.h" }
+
+    header "compare"
+    export *
+  }
+
+  module complex {
+    module fwd { header "__fwd/complex.h" }
+
+    header "complex"
+    export *
+  }
+
+  module concepts {
+    module arithmetic               { header "__concepts/arithmetic.h" }
+    module assignable               { header "__concepts/assignable.h" }
+    module boolean_testable         { header "__concepts/boolean_testable.h" }
+    module class_or_enum            { header "__concepts/class_or_enum.h" }
+    module common_reference_with    { header "__concepts/common_reference_with.h" }
+    module common_with              { header "__concepts/common_with.h" }
+    module constructible            { header "__concepts/constructible.h" }
+    module convertible_to           { header "__concepts/convertible_to.h" }
+    module copyable                 { header "__concepts/copyable.h" }
+    module derived_from             { header "__concepts/derived_from.h" }
+    module destructible             { header "__concepts/destructible.h" }
+    module different_from           { header "__concepts/different_from.h" }
+    module equality_comparable      { header "__concepts/equality_comparable.h" }
+    module invocable                { header "__concepts/invocable.h" }
+    module movable                  { header "__concepts/movable.h" }
+    module predicate                { header "__concepts/predicate.h" }
+    module regular                  { header "__concepts/regular.h" }
+    module relation                 { header "__concepts/relation.h" }
+    module same_as                  { header "__concepts/same_as.h" }
+    module semiregular              { header "__concepts/semiregular.h" }
+    module swappable                { header "__concepts/swappable.h" }
+    module totally_ordered          { header "__concepts/totally_ordered.h" }
+
+    header "concepts"
+    export *
+  }
+
+  module condition_variable {
+    module condition_variable   { header "__condition_variable/condition_variable.h" }
+
+    header "condition_variable"
+    export *
+  }
+
+  module cassert {
+    textual header "cassert" // NDEBUG requires textual inclusion
+  }
+
+  module ccomplex {
+    header "ccomplex"
+    export *
+  }
+
+  module cctype {
+    header "cctype"
+    export *
+  }
+
+  module cerrno {
+    header "cerrno"
+    export *
+  }
+
+  module cfenv {
+    header "cfenv"
+    export *
+  }
+
+  module cfloat {
+    header "cfloat"
+    export *
+  }
+
+  module cinttypes {
+    header "cinttypes"
+    export *
+  }
+
+  module ciso646 {
+    header "ciso646"
+    export *
+  }
+
+  module climits {
+    header "climits"
+    export *
+  }
+
+  module clocale {
+    header "clocale"
+    export *
+  }
+
+  module cmath {
+    header "cmath"
+    export *
+  }
+
+  module csetjmp {
+    header "csetjmp"
+    export *
+  }
+
+  module csignal {
+    header "csignal"
+    export *
+  }
+
+  module cstdarg {
+    header "cstdarg"
+    export *
+  }
+
+  module cstdbool {
+    header "cstdbool"
+    export *
+  }
+
+  module cstddef {
+    header "cstddef"
+    export *
+  }
+
+  module cstdio {
+    header "cstdio"
+    export *
+  }
+
+  module cstdlib {
+    header "cstdlib"
+    export *
+  }
+
+  module cstring {
+    header "cstring"
+    export *
+  }
+
+  module ctgmath {
+    header "ctgmath"
+    export *
+  }
+
+  module ctime {
+    header "ctime"
+    export *
+  }
+
+  module cuchar {
+    header "cuchar"
+    export *
+  }
+
+  module cwchar {
+    header "cwchar"
+    export *
+  }
+
+  module cwctype {
+    header "cwctype"
+    export *
+  }
+
+  module deque {
+    module fwd { header "__fwd/deque.h" }
+
+    header "deque"
+    export *
+  }
+
+  module exception {
+    module exception          { header "__exception/exception.h" }
+    module exception_ptr      { header "__exception/exception_ptr.h" }
+    module nested_exception   { header "__exception/nested_exception.h" }
+    module operations         { header "__exception/operations.h" }
+    module terminate          { header "__exception/terminate.h" }
+
+    header "exception"
+    export *
+  }
+
+  module execution {
+    header "execution"
+    export *
+  }
+
+  module expected {
+    module bad_expected_access    { header "__expected/bad_expected_access.h" }
+    module expected               { header "__expected/expected.h" }
+    module unexpect               { header "__expected/unexpect.h" }
+    module unexpected             { header "__expected/unexpected.h" }
+
+    header "expected"
+    export *
+  }
+
+  module filesystem {
+    module copy_options                   { header "__filesystem/copy_options.h" }
+    module directory_entry                { header "__filesystem/directory_entry.h" }
+    module directory_iterator             { header "__filesystem/directory_iterator.h" }
+    module directory_options              { header "__filesystem/directory_options.h" }
+    module file_status                    { header "__filesystem/file_status.h" }
+    module file_time_type                 { header "__filesystem/file_time_type.h" }
+    module file_type                      { header "__filesystem/file_type.h" }
+    module filesystem_error               { header "__filesystem/filesystem_error.h" }
+    module operations                     { header "__filesystem/operations.h" }
+    module path_iterator                  { header "__filesystem/path_iterator.h" }
+    module path                           {
+      header "__filesystem/path.h"
+      export std.string // returned by various methods of filesystem::path
+    }
+    module perm_options                   { header "__filesystem/perm_options.h" }
+    module perms                          { header "__filesystem/perms.h" }
+    module recursive_directory_iterator   { header "__filesystem/recursive_directory_iterator.h" }
+    module space_info                     { header "__filesystem/space_info.h" }
+    module u8path                         { header "__filesystem/u8path.h" }
+
+    header "filesystem"
+    export *
+  }
+
+  module format {
+    module buffer                             { header "__format/buffer.h" }
+    module concepts                           { header "__format/concepts.h" }
+    module container_adaptor                  { header "__format/container_adaptor.h" }
+    module enable_insertable                  { header "__format/enable_insertable.h" }
+    module escaped_output_table               { header "__format/escaped_output_table.h" }
+    module extended_grapheme_cluster_table    { header "__format/extended_grapheme_cluster_table.h" }
+    module format_arg                         { header "__format/format_arg.h" }
+    module format_arg_store                   { header "__format/format_arg_store.h" }
+    module format_args                        { header "__format/format_args.h" }
+    module format_context {
+      header "__format/format_context.h"
+      export std.optional // default argument for __format_context_create
+    }
+    module format_error {
+      header "__format/format_error.h"
+    }
+    module format_functions {
+      header "__format/format_functions.h"
+      export std.string // returned by the functions in that header
+    }
+    module format_parse_context               { header "__format/format_parse_context.h" }
+    module format_string                      { header "__format/format_string.h" }
+    module format_to_n_result                 { header "__format/format_to_n_result.h" }
+    module formatter                          { header "__format/formatter.h" }
+    module formatter_bool                     { header "__format/formatter_bool.h" }
+    module formatter_char                     { header "__format/formatter_char.h" }
+    module formatter_floating_point           { header "__format/formatter_floating_point.h" }
+    module formatter_integer                  { header "__format/formatter_integer.h" }
+    module formatter_integral                 { header "__format/formatter_integral.h" }
+    module formatter_output                   { header "__format/formatter_output.h" }
+    module formatter_pointer                  { header "__format/formatter_pointer.h" }
+    module formatter_string                   { header "__format/formatter_string.h" }
+    module formatter_tuple                    { header "__format/formatter_tuple.h" }
+    module fwd                                { header "__fwd/format.h" }
+    module indic_conjunct_break_table         { header "__format/indic_conjunct_break_table.h" }
+    module parser_std_format_spec             { header "__format/parser_std_format_spec.h" }
+    module range_default_formatter            { header "__format/range_default_formatter.h" }
+    module range_formatter                    { header "__format/range_formatter.h" }
+    module unicode                            { header "__format/unicode.h" }
+    module width_estimation_table             { header "__format/width_estimation_table.h" }
+    module write_escaped                      { header "__format/write_escaped.h" }
+
+    header "format"
+    export *
+  } // module format
+
+  module forward_list {
+    header "forward_list"
+    export *
+  }
+
+  module fstream {
+    module fwd { header "__fwd/fstream.h" }
+
+    header "fstream"
+    export *
+  }
+
+  module functional {
+    module binary_function              { header "__functional/binary_function.h" }
+    module binary_negate                { header "__functional/binary_negate.h" }
+    module bind_back {
+      header "__functional/bind_back.h"
+      export std.functional.perfect_forward // inherited from and using its operators
+    }
+    module bind_front {
+      header "__functional/bind_front.h"
+      export std.functional.perfect_forward // inherited from and using its operators
+    }
+    module bind                         { header "__functional/bind.h" }
+    module binder1st                    { header "__functional/binder1st.h" }
+    module binder2nd                    { header "__functional/binder2nd.h" }
+    module boyer_moore_searcher {
+      header "__functional/boyer_moore_searcher.h"
+      export std.memory.shared_ptr
+    }
+    module compose {
+      header "__functional/compose.h"
+      export std.functional.perfect_forward // inherited from and using its operators
+    }
+    module default_searcher             { header "__functional/default_searcher.h" }
+    module function                     { header "__functional/function.h" }
+    module hash                         { header "__functional/hash.h" }
+    module identity                     { header "__functional/identity.h" }
+    module invoke                       { header "__functional/invoke.h" }
+    module is_transparent               { header "__functional/is_transparent.h" }
+    module mem_fn                       { header "__functional/mem_fn.h" }
+    module mem_fun_ref                  { header "__functional/mem_fun_ref.h" }
+    module not_fn {
+      header "__functional/not_fn.h"
+      export std.functional.perfect_forward // inherited from and using its operators
+    }
+    module operations                   { header "__functional/operations.h" }
+    module perfect_forward {
+      header "__functional/perfect_forward.h"
+      export std.tuple
+    }
+    module pointer_to_binary_function   { header "__functional/pointer_to_binary_function.h" }
+    module pointer_to_unary_function    { header "__functional/pointer_to_unary_function.h" }
+    module ranges_operations            { header "__functional/ranges_operations.h" }
+    module reference_wrapper            { header "__functional/reference_wrapper.h" }
+    module unary_function               { header "__functional/unary_function.h" }
+    module unary_negate                 { header "__functional/unary_negate.h" }
+    module weak_result_type             { header "__functional/weak_result_type.h" }
+
+    header "functional"
+    export *
+  } // module functional
+
+  module future {
+    header "future"
+    export *
+  }
+
+  module initializer_list {
+    header "initializer_list"
+    export *
+  }
+
+  module iomanip {
+    header "iomanip"
+    export *
+  }
+
+  module ios {
+    module fwd  { header "__fwd/ios.h" }
+    module fpos { header "__ios/fpos.h" }
+
+    header "ios"
+    export *
+  }
+
+  module iosfwd {
+    header "iosfwd"
+    export *
+  }
+
+  module iostream {
+    header "iostream"
+    export *
+  }
+
+  module istream {
+    module fwd { header "__fwd/istream.h" }
+
+    header "istream"
+    export std.ios // base class
+  }
 
-// Experimental C++ standard library interfaces
-module std_experimental [system] {
   module iterator {
-    header "experimental/iterator"
+    module access                     { header "__iterator/access.h" }
+    module advance                    { header "__iterator/advance.h" }
+    module aliasing_iterator          { header "__iterator/aliasing_iterator.h" }
+    module back_insert_iterator       { header "__iterator/back_insert_iterator.h" }
+    module bounded_iter               { header "__iterator/bounded_iter.h" }
+    module common_iterator            { header "__iterator/common_iterator.h" }
+    module concepts {
+      header "__iterator/concepts.h"
+      export std_core.type_traits.common_reference
+    }
+    module counted_iterator           { header "__iterator/counted_iterator.h" }
+    module cpp17_iterator_concepts    { header "__iterator/cpp17_iterator_concepts.h" }
+    module data                       { header "__iterator/data.h" }
+    module default_sentinel           { header "__iterator/default_sentinel.h" }
+    module distance                   { header "__iterator/distance.h" }
+    module empty                      { header "__iterator/empty.h" }
+    module erase_if_container         { header "__iterator/erase_if_container.h" }
+    module front_insert_iterator      { header "__iterator/front_insert_iterator.h" }
+    module incrementable_traits       { header "__iterator/incrementable_traits.h" }
+    module indirectly_comparable      { header "__iterator/indirectly_comparable.h" }
+    module insert_iterator            { header "__iterator/insert_iterator.h" }
+    module istream_iterator           { header "__iterator/istream_iterator.h" }
+    module istreambuf_iterator        { header "__iterator/istreambuf_iterator.h" }
+    module iter_move                  { header "__iterator/iter_move.h" }
+    module iter_swap                  { header "__iterator/iter_swap.h" }
+    module iterator_traits {
+      header "__iterator/iterator_traits.h"
+      export std_core.type_traits.integral_constant
+    }
+    module iterator_with_data         { header "__iterator/iterator_with_data.h" }
+    module iterator                   { header "__iterator/iterator.h" }
+    module mergeable                  { header "__iterator/mergeable.h" }
+    module move_iterator              { header "__iterator/move_iterator.h" }
+    module move_sentinel              { header "__iterator/move_sentinel.h" }
+    module next                       { header "__iterator/next.h" }
+    module ostream_iterator           { header "__iterator/ostream_iterator.h" }
+    module ostreambuf_iterator {
+      header "__iterator/ostreambuf_iterator.h"
+      export iosfwd // for default template argument of ostreambuf_iterator
+    }
+    module permutable                 { header "__iterator/permutable.h" }
+    module prev                       { header "__iterator/prev.h" }
+    module projected                  { header "__iterator/projected.h" }
+    module ranges_iterator_traits     { header "__iterator/ranges_iterator_traits.h" }
+    module readable_traits            { header "__iterator/readable_traits.h" }
+    module reverse_access             { header "__iterator/reverse_access.h" }
+    module reverse_iterator           { header "__iterator/reverse_iterator.h" }
+    module segmented_iterator         { header "__iterator/segmented_iterator.h" }
+    module size                       { header "__iterator/size.h" }
+    module sortable                   { header "__iterator/sortable.h" }
+    module unreachable_sentinel       { header "__iterator/unreachable_sentinel.h" }
+    module wrap_iter                  { header "__iterator/wrap_iter.h" }
+
+    header "iterator"
+    export *
+  }
+
+  module latch {
+    header "latch"
+    export *
+  }
+
+  module list {
+    header "list"
+    export *
+  }
+
+  module locale {
+    header "locale"
+    header "__locale_dir/locale_base_api.h"
+    header "__locale_dir/locale_base_api/locale_guard.h"
+    module locale_base_api {
+      textual header "__locale_dir/locale_base_api/android.h"
+      textual header "__locale_dir/locale_base_api/bsd_locale_defaults.h"
+      textual header "__locale_dir/locale_base_api/bsd_locale_fallbacks.h"
+      textual header "__locale_dir/locale_base_api/fuchsia.h"
+      textual header "__locale_dir/locale_base_api/ibm.h"
+      textual header "__locale_dir/locale_base_api/musl.h"
+      textual header "__locale_dir/locale_base_api/newlib.h"
+      textual header "__locale_dir/locale_base_api/openbsd.h"
+      textual header "__locale_dir/locale_base_api/win32.h"
+    }
+    export *
+  }
+
+  // TODO: Understand why this needs to live in its own module
+  module locale_base [system] {
+    header "__locale"
+    export *
+  }
+
+  module map {
+    header "map"
+    export *
+  }
+
+  module mdspan {
+    module default_accessor   { header "__mdspan/default_accessor.h" }
+    module extents            { header "__mdspan/extents.h" }
+    module fwd                { header "__fwd/mdspan.h" }
+    module layout_left        { header "__mdspan/layout_left.h" }
+    module layout_right       { header "__mdspan/layout_right.h" }
+    module layout_stride      { header "__mdspan/layout_stride.h" }
+    module mdspan {
+      header "__mdspan/mdspan.h"
+      export std.array // returned by some methods
+    }
+
+    header "mdspan"
     export *
   }
+
   module memory {
-    header "experimental/memory"
+    module addressof                          { header "__memory/addressof.h" }
+    module align                              { header "__memory/align.h" }
+    module aligned_alloc                      { header "__memory/aligned_alloc.h" }
+    module allocate_at_least                  { header "__memory/allocate_at_least.h" }
+    module allocation_guard                   { header "__memory/allocation_guard.h" }
+    module allocator                          { header "__memory/allocator.h" }
+    module allocator_arg_t                    { header "__memory/allocator_arg_t.h" }
+    module allocator_destructor               { header "__memory/allocator_destructor.h" }
+    module allocator_traits                   { header "__memory/allocator_traits.h" }
+    module assume_aligned                     { header "__memory/assume_aligned.h" }
+    module auto_ptr                           { header "__memory/auto_ptr.h" }
+    module builtin_new_allocator              { header "__memory/builtin_new_allocator.h" }
+    module compressed_pair                    { header "__memory/compressed_pair.h" }
+    module concepts                           { header "__memory/concepts.h" }
+    module construct_at                       { header "__memory/construct_at.h" }
+    module destruct_n                         { header "__memory/destruct_n.h" }
+    module fwd                                { header "__fwd/memory.h" }
+    module inout_ptr                          { header "__memory/inout_ptr.h" }
+    module noexcept_move_assign_container     { header "__memory/noexcept_move_assign_container.h" }
+    module out_ptr                            { header "__memory/out_ptr.h" }
+    module pointer_traits                     { header "__memory/pointer_traits.h" }
+    module ranges_construct_at                { header "__memory/ranges_construct_at.h" }
+    module ranges_uninitialized_algorithms {
+      header "__memory/ranges_uninitialized_algorithms.h"
+      export std.algorithm.in_out_result
+    }
+    module raw_storage_iterator               { header "__memory/raw_storage_iterator.h" }
+    module shared_ptr                         { header "__memory/shared_ptr.h" }
+    module swap_allocator                     { header "__memory/swap_allocator.h" }
+    module temp_value                         { header "__memory/temp_value.h" }
+    module temporary_buffer                   {
+      header "__memory/temporary_buffer.h"
+      export std.utility.pair // return type of std::get_temporary_buffer()
+    }
+    module uninitialized_algorithms           { header "__memory/uninitialized_algorithms.h" }
+    module unique_ptr                         { header "__memory/unique_ptr.h" }
+    module uses_allocator                     { header "__memory/uses_allocator.h" }
+    module uses_allocator_construction        { header "__memory/uses_allocator_construction.h" }
+    module voidify                            { header "__memory/voidify.h" }
+
+    header "memory"
     export *
   }
-  module propagate_const {
-    header "experimental/propagate_const"
+
+  module memory_resource {
+    module fwd                            { header "__fwd/memory_resource.h" }
+    module memory_resource                { header "__memory_resource/memory_resource.h" }
+    module monotonic_buffer_resource      { header "__memory_resource/monotonic_buffer_resource.h" }
+    module polymorphic_allocator          { header "__memory_resource/polymorphic_allocator.h" }
+    module pool_options                   { header "__memory_resource/pool_options.h" }
+    module synchronized_pool_resource     { header "__memory_resource/synchronized_pool_resource.h" }
+    module unsynchronized_pool_resource   { header "__memory_resource/unsynchronized_pool_resource.h" }
+
+    header "memory_resource"
     export *
   }
-  module simd {
-    module aligned_tag          { private header "experimental/__simd/aligned_tag.h" }
-    module declaration          { private header "experimental/__simd/declaration.h" }
-    module reference            { private header "experimental/__simd/reference.h" }
-    module scalar               { private header "experimental/__simd/scalar.h" }
-    module simd                 { private header "experimental/__simd/simd.h" }
-    module simd_mask            { private header "experimental/__simd/simd_mask.h" }
-    module traits               { private header "experimental/__simd/traits.h" }
-    module utility              { private header "experimental/__simd/utility.h" }
-    module vec_ext              { private header "experimental/__simd/vec_ext.h" }
 
-    header "experimental/simd"
+  module mutex {
+    module lock_guard     { header "__mutex/lock_guard.h" }
+    module mutex          { header "__mutex/mutex.h" }
+    module once_flag      { header "__mutex/once_flag.h" }
+    module tag_types      { header "__mutex/tag_types.h" }
+    module unique_lock    { header "__mutex/unique_lock.h" }
+
+    header "mutex"
     export *
   }
-  module type_traits {
-    header "experimental/type_traits"
+
+  module new {
+    header "new"
     export *
   }
-  module utility {
-    header "experimental/utility"
+
+  module numbers {
+    header "numbers"
     export *
   }
-}
 
-// Convenience method to get all of the above modules in a single import statement.
-// Importing only the needed modules is likely to be more performant.
-module std [system] {
-  header "__std_clang_module"
-  export *
-}
+  module numeric {
+    module accumulate                 { header "__numeric/accumulate.h" }
+    module adjacent_difference        { header "__numeric/adjacent_difference.h" }
+    module exclusive_scan             { header "__numeric/exclusive_scan.h" }
+    module gcd_lcm                    { header "__numeric/gcd_lcm.h" }
+    module inclusive_scan             { header "__numeric/inclusive_scan.h" }
+    module inner_product              { header "__numeric/inner_product.h" }
+    module iota                       { header "__numeric/iota.h" }
+    module midpoint                   { header "__numeric/midpoint.h" }
+    module partial_sum                { header "__numeric/partial_sum.h" }
+    module pstl                       { header "__numeric/pstl.h" }
+    module reduce                     { header "__numeric/reduce.h" }
+    module saturation_arithmetic      { header "__numeric/saturation_arithmetic.h" }
+    module transform_exclusive_scan   { header "__numeric/transform_exclusive_scan.h" }
+    module transform_inclusive_scan   { header "__numeric/transform_inclusive_scan.h" }
+    module transform_reduce           { header "__numeric/transform_reduce.h" }
 
-// Implementation detail headers that are private to libc++. These modules
-// must not be directly imported.
-module std_private_assert            [system] {
-  header "__assert"
-  export *
-}
-module std_private_bit_reference     [system] {
-  header "__bit_reference"
-  export *
-}
-module std_private_fwd_bit_reference [system] {
-  header "__fwd/bit_reference.h"
-}
-module std_private_fwd_byte [system] {
-  header "__fwd/byte.h"
-}
-module std_private_config            [system] {
-  textual header "__config"
-  textual header "__configuration/abi.h"
-  textual header "__configuration/availability.h"
-  textual header "__configuration/compiler.h"
-  textual header "__configuration/language.h"
-  textual header "__configuration/platform.h"
-  export *
-}
-module std_private_hash_table        [system] {
-  header "__hash_table"
-  export *
-}
-module std_private_locale            [system] {
-  header "__locale"
-  export *
-}
-module std_private_mbstate_t         [system] {
-  header "__mbstate_t.h"
-  export *
-}
-module std_private_node_handle       [system] {
-  header "__node_handle"
-  export *
-}
-module std_private_split_buffer      [system] {
-  header "__split_buffer"
-  export *
-}
-module std_private_std_mbstate_t     [system] {
-  header "__std_mbstate_t.h"
-  export *
-}
-module std_private_tree              [system] {
-  header "__tree"
-  export *
-}
-module std_private_undef_macros      [system] {
-  textual header "__undef_macros"
-  export *
-}
-module std_private_verbose_abort     [system] {
-  header "__verbose_abort"
-  export *
-}
+    header "numeric"
+    export *
+  }
+
+  module optional {
+    header "optional"
+    export *
+  }
+
+  module ostream {
+    module basic_ostream {
+      header "__ostream/basic_ostream.h"
+      export std.ios // base class
+    }
+    module fwd {
+      header "__fwd/ostream.h"
+    }
+    module print {
+      header "__ostream/print.h"
+      export *
+    }
+
+    header "ostream"
+    export *
+  }
+
+  module print {
+    header "print"
+    export *
+  }
+
+  module queue {
+    module fwd { header "__fwd/queue.h" }
+
+    header "queue"
+    export *
+  }
+
+  module random {
+    module bernoulli_distribution             { header "__random/bernoulli_distribution.h" }
+    module binomial_distribution              { header "__random/binomial_distribution.h" }
+    module cauchy_distribution                { header "__random/cauchy_distribution.h" }
+    module chi_squared_distribution           { header "__random/chi_squared_distribution.h" }
+    module clamp_to_integral                  { header "__random/clamp_to_integral.h" }
+    module default_random_engine              { header "__random/default_random_engine.h" }
+    module discard_block_engine               { header "__random/discard_block_engine.h" }
+    module discrete_distribution              { header "__random/discrete_distribution.h" }
+    module exponential_distribution           { header "__random/exponential_distribution.h" }
+    module extreme_value_distribution         { header "__random/extreme_value_distribution.h" }
+    module fisher_f_distribution              { header "__random/fisher_f_distribution.h" }
+    module gamma_distribution                 { header "__random/gamma_distribution.h" }
+    module generate_canonical                 { header "__random/generate_canonical.h" }
+    module geometric_distribution             { header "__random/geometric_distribution.h" }
+    module independent_bits_engine            { header "__random/independent_bits_engine.h" }
+    module is_seed_sequence                   { header "__random/is_seed_sequence.h" }
+    module is_valid {
+      header "__random/is_valid.h"
+      export std_core.type_traits.integral_constant
+    }
+    module knuth_b                            { header "__random/knuth_b.h" }
+    module linear_congruential_engine         { header "__random/linear_congruential_engine.h" }
+    module log2                               { header "__random/log2.h" }
+    module lognormal_distribution             { header "__random/lognormal_distribution.h" }
+    module mersenne_twister_engine            { header "__random/mersenne_twister_engine.h" }
+    module negative_binomial_distribution     { header "__random/negative_binomial_distribution.h" }
+    module normal_distribution                { header "__random/normal_distribution.h" }
+    module piecewise_constant_distribution    { header "__random/piecewise_constant_distribution.h" }
+    module piecewise_linear_distribution      { header "__random/piecewise_linear_distribution.h" }
+    module poisson_distribution               { header "__random/poisson_distribution.h" }
+    module random_device                      { header "__random/random_device.h" }
+    module ranlux                             { header "__random/ranlux.h" }
+    module seed_seq                           { header "__random/seed_seq.h" }
+    module shuffle_order_engine               { header "__random/shuffle_order_engine.h" }
+    module student_t_distribution             { header "__random/student_t_distribution.h" }
+    module subtract_with_carry_engine         { header "__random/subtract_with_carry_engine.h" }
+    module uniform_int_distribution           { header "__random/uniform_int_distribution.h" }
+    module uniform_random_bit_generator       { header "__random/uniform_random_bit_generator.h" }
+    module uniform_real_distribution          { header "__random/uniform_real_distribution.h" }
+    module weibull_distribution               { header "__random/weibull_distribution.h" }
+
+    header "random"
+    export *
+  }
+
+  module ranges {
+    module access                         { header "__ranges/access.h" }
+    module all                            { header "__ranges/all.h" }
+    module as_rvalue_view                 { header "__ranges/as_rvalue_view.h" }
+    module chunk_by_view {
+      header "__ranges/chunk_by_view.h"
+      export std.functional.bind_back
+    }
+    module common_view                    { header "__ranges/common_view.h" }
+    module concepts                       { header "__ranges/concepts.h" }
+    module container_compatible_range     { header "__ranges/container_compatible_range.h" }
+    module counted {
+      header "__ranges/counted.h"
+      export std.span            // return type of views::counted
+      export std.ranges.subrange // return type of views::counted
+    }
+    module dangling {
+      header "__ranges/dangling.h"
+    }
+    module data {
+      header "__ranges/data.h"
+    }
+    module drop_view {
+      header "__ranges/drop_view.h"
+      export std.functional.bind_back
+    }
+    module drop_while_view {
+      header "__ranges/drop_while_view.h"
+      export std.functional.bind_back
+    }
+    module elements_view                  { header "__ranges/elements_view.h" }
+    module empty                          { header "__ranges/empty.h" }
+    module empty_view                     { header "__ranges/empty_view.h" }
+    module enable_borrowed_range          { header "__ranges/enable_borrowed_range.h" }
+    module enable_view                    { header "__ranges/enable_view.h" }
+    module filter_view {
+      header "__ranges/filter_view.h"
+      export std.functional.bind_back
+    }
+    module from_range                     { header "__ranges/from_range.h" }
+    module iota_view                      { header "__ranges/iota_view.h" }
+    module istream_view                   { header "__ranges/istream_view.h" }
+    module join_view                      { header "__ranges/join_view.h" }
+    module lazy_split_view {
+      header "__ranges/lazy_split_view.h"
+      export std.functional.bind_back
+    }
+    module movable_box                    { header "__ranges/movable_box.h" }
+    module non_propagating_cache          { header "__ranges/non_propagating_cache.h" }
+    module owning_view                    { header "__ranges/owning_view.h" }
+    module range_adaptor                  { header "__ranges/range_adaptor.h" }
+    module rbegin                         { header "__ranges/rbegin.h" }
+    module ref_view                       { header "__ranges/ref_view.h" }
+    module rend                           { header "__ranges/rend.h" }
+    module repeat_view                    { header "__ranges/repeat_view.h" }
+    module reverse_view                   { header "__ranges/reverse_view.h" }
+    module single_view                    { header "__ranges/single_view.h" }
+    module size                           { header "__ranges/size.h" }
+    module split_view {
+      header "__ranges/split_view.h"
+      export std.functional.bind_back
+    }
+    module subrange {
+      header "__ranges/subrange.h"
+      export std.ranges.subrange_fwd
+    }
+    module subrange_fwd {
+      header "__fwd/subrange.h"
+    }
+    module take_view {
+      header "__ranges/take_view.h"
+      export std.functional.bind_back
+    }
+    module take_while_view {
+      header "__ranges/take_while_view.h"
+      export std.functional.bind_back
+    }
+    module to {
+      header "__ranges/to.h"
+      export std.functional.bind_back
+    }
+    module transform_view {
+      header "__ranges/transform_view.h"
+      export std.functional.bind_back
+    }
+    module view_interface {
+      header "__ranges/view_interface.h"
+    }
+    module views {
+      header "__ranges/views.h"
+    }
+    module zip_view {
+      header "__ranges/zip_view.h"
+      export std.utility.pair
+    }
+
+    header "ranges"
+    export *
+  } // module ranges
+
+  module ratio {
+    header "ratio"
+    export *
+  }
+
+  module regex {
+    header "regex"
+    export *
+  }
+
+  module scoped_allocator {
+    header "scoped_allocator"
+    export *
+  }
+
+  module semaphore {
+    header "semaphore"
+    export *
+  }
+
+  module set {
+    header "set"
+    export *
+  }
+
+  module shared_mutex {
+    header "shared_mutex"
+    export *
+  }
+
+  module source_location {
+    header "source_location"
+    export *
+  }
+
+  module span {
+    module fwd { header "__fwd/span.h" }
+
+    header "span"
+    export *
+  }
+
+  module sstream {
+    module fwd { header "__fwd/sstream.h" }
+
+    header "sstream"
+    export *
+  }
+
+  module stack {
+    module fwd { header "__fwd/stack.h" }
+
+    header "stack"
+    export *
+  }
+
+  module stdexcept {
+    header "stdexcept"
+    export *
+  }
+
+  module stop_token {
+    module atomic_unique_lock     { header "__stop_token/atomic_unique_lock.h" }
+    module intrusive_list_view    { header "__stop_token/intrusive_list_view.h" }
+    module intrusive_shared_ptr   { header "__stop_token/intrusive_shared_ptr.h" }
+    module stop_callback          { header "__stop_token/stop_callback.h" }
+    module stop_source            { header "__stop_token/stop_source.h" }
+    module stop_state             { header "__stop_token/stop_state.h" }
+    module stop_token             { header "__stop_token/stop_token.h" }
+
+    header "stop_token"
+    export *
+  }
+
+  module streambuf {
+    module fwd { header "__fwd/streambuf.h" }
+
+    header "streambuf"
+    export *
+  }
+
+  module string {
+    module char_traits              { header "__string/char_traits.h" }
+    module constexpr_c_functions    { header "__string/constexpr_c_functions.h" }
+    module extern_template_lists    { header "__string/extern_template_lists.h" }
+    module fwd                      {  header "__fwd/string.h" }
+
+    header "string"
+    export *
+  }
+
+  module string_view {
+    module fwd { header "__fwd/string_view.h" }
+
+    header "string_view"
+    export *
+  }
+
+  module strstream {
+    header "strstream"
+    export *
+  }
+
+  module syncstream {
+    header "syncstream"
+    export *
+  }
+
+  module system_error {
+    module errc               { header "__system_error/errc.h" }
+    module error_category     { header "__system_error/error_category.h" }
+    module error_code {
+      header "__system_error/error_code.h"
+      export std.system_error.error_category // methods of error_code return that type
+    }
+    module error_condition    { header "__system_error/error_condition.h" }
+    module system_error       { header "__system_error/system_error.h" }
+
+    header "system_error"
+    export *
+  }
+
+  module thread {
+    module formatter              { header "__thread/formatter.h" }
+    module id                     { header "__thread/id.h" }
+    module jthread                { header "__thread/jthread.h" }
+    module poll_with_backoff      { header "__thread/poll_with_backoff.h" }
+    module this_thread            { header "__thread/this_thread.h" }
+    module thread                 { header "__thread/thread.h" }
+    module timed_backoff_policy   { header "__thread/timed_backoff_policy.h" }
+
+    module support {
+      header "__thread/support.h"
+      export *
+    }
+    module support_impl {
+      textual header "__thread/support/c11.h"
+      textual header "__thread/support/external.h"
+      textual header "__thread/support/pthread.h"
+      textual header "__thread/support/windows.h"
+    }
+
+    header "thread"
+    export *
+  }
+
+  module tuple {
+    module find_index               { header "__tuple/find_index.h" }
+    module ignore                   { header "__tuple/ignore.h" }
+    module make_tuple_types         { header "__tuple/make_tuple_types.h" }
+    module sfinae_helpers           { header "__tuple/sfinae_helpers.h" }
+    module tuple_element            { header "__tuple/tuple_element.h" }
+    module tuple_indices            { header "__tuple/tuple_indices.h" }
+    module tuple_like_ext           { header "__tuple/tuple_like_ext.h" }
+    module tuple_like_no_subrange   { header "__tuple/tuple_like_no_subrange.h" }
+    module tuple_like               { header "__tuple/tuple_like.h" }
+    module tuple_size               { header "__tuple/tuple_size.h" }
+    module tuple_types              { header "__tuple/tuple_types.h" }
+
+    header "tuple"
+    export *
+  }
+
+  module typeindex {
+    header "typeindex"
+    export *
+  }
+
+  module typeinfo {
+    header "typeinfo"
+    export *
+  }
+
+  module unordered_map {
+    header "unordered_map"
+    export *
+  }
+
+  module unordered_set {
+    header "unordered_set"
+    export *
+  }
+
+  module utility {
+    module as_const                   { header "__utility/as_const.h" }
+    module as_lvalue                  { header "__utility/as_lvalue.h" }
+    module auto_cast                  {
+      header "__utility/auto_cast.h"
+      export std_core.type_traits.decay // the macro expansion uses that trait
+    }
+    module cmp                        { header "__utility/cmp.h" }
+    module convert_to_integral        { header "__utility/convert_to_integral.h" }
+    module empty                      { header "__utility/empty.h" }
+    module exception_guard            { header "__utility/exception_guard.h" }
+    module exchange                   { header "__utility/exchange.h" }
+    module forward_like               { header "__utility/forward_like.h" }
+    module in_place {
+      header "__utility/in_place.h"
+      export std_core.type_traits.integral_constant
+    }
+    module integer_sequence           { header "__utility/integer_sequence.h" }
+    module is_pointer_in_range        { header "__utility/is_pointer_in_range.h" }
+    module is_valid_range             { header "__utility/is_valid_range.h" }
+    module move                       { header "__utility/move.h" }
+    module no_destroy                 { header "__utility/no_destroy.h" }
+    module pair                       { header "__utility/pair.h" }
+    module piecewise_construct        { header "__utility/piecewise_construct.h" }
+    module priority_tag               { header "__utility/priority_tag.h" }
+    module private_constructor_tag    { header "__utility/private_constructor_tag.h" }
+    module rel_ops                    { header "__utility/rel_ops.h" }
+    module small_buffer               { header "__utility/small_buffer.h" }
+    module swap                       { header "__utility/swap.h" }
+    module to_underlying              { header "__utility/to_underlying.h" }
+    module unreachable                { header "__utility/unreachable.h" }
+
+    header "utility"
+    export *
+  }
 
-module std_private_algorithm_adjacent_find                               [system] { header "__algorithm/adjacent_find.h" }
-module std_private_algorithm_all_of                                      [system] { header "__algorithm/all_of.h" }
-module std_private_algorithm_any_of                                      [system] { header "__algorithm/any_of.h" }
-module std_private_algorithm_binary_search                               [system] { header "__algorithm/binary_search.h" }
-module std_private_algorithm_clamp                                       [system] { header "__algorithm/clamp.h" }
-module std_private_algorithm_comp                                        [system] { header "__algorithm/comp.h" }
-module std_private_algorithm_comp_ref_type                               [system] { header "__algorithm/comp_ref_type.h" }
-module std_private_algorithm_copy                                        [system] {
-  header "__algorithm/copy.h"
-  export std_private_algorithm_copy_move_common
-}
-module std_private_algorithm_copy_backward                               [system] { header "__algorithm/copy_backward.h" }
-module std_private_algorithm_copy_if                                     [system] { header "__algorithm/copy_if.h" }
-module std_private_algorithm_copy_move_common                            [system] {
-  header "__algorithm/copy_move_common.h"
-  export std_private_type_traits_is_trivially_copyable
-}
-module std_private_algorithm_copy_n                                      [system] { header "__algorithm/copy_n.h" }
-module std_private_algorithm_count                                       [system] { header "__algorithm/count.h" }
-module std_private_algorithm_count_if                                    [system] { header "__algorithm/count_if.h" }
-module std_private_algorithm_equal                                       [system] { header "__algorithm/equal.h" }
-module std_private_algorithm_equal_range                                 [system] { header "__algorithm/equal_range.h" }
-module std_private_algorithm_fill                                        [system] { header "__algorithm/fill.h" }
-module std_private_algorithm_fill_n                                      [system] { header "__algorithm/fill_n.h" }
-module std_private_algorithm_find                                        [system] {
-  header "__algorithm/find.h"
-  export std_private_algorithm_unwrap_iter
-}
-module std_private_algorithm_find_end                                    [system] { header "__algorithm/find_end.h" }
-module std_private_algorithm_find_first_of                               [system] { header "__algorithm/find_first_of.h" }
-module std_private_algorithm_find_if                                     [system] { header "__algorithm/find_if.h" }
-module std_private_algorithm_find_if_not                                 [system] { header "__algorithm/find_if_not.h" }
-module std_private_algorithm_find_segment_if                             [system] { header "__algorithm/find_segment_if.h" }
-module std_private_algorithm_fold                                        [system] { header "__algorithm/fold.h" }
-module std_private_algorithm_for_each                                    [system] { header "__algorithm/for_each.h" }
-module std_private_algorithm_for_each_n                                  [system] { header "__algorithm/for_each_n.h" }
-module std_private_algorithm_for_each_segment                            [system] { header "__algorithm/for_each_segment.h" }
-module std_private_algorithm_generate                                    [system] { header "__algorithm/generate.h" }
-module std_private_algorithm_generate_n                                  [system] { header "__algorithm/generate_n.h" }
-module std_private_algorithm_half_positive                               [system] { header "__algorithm/half_positive.h" }
-module std_private_algorithm_in_found_result                             [system] { header "__algorithm/in_found_result.h" }
-module std_private_algorithm_in_fun_result                               [system] { header "__algorithm/in_fun_result.h" }
-module std_private_algorithm_in_in_out_result                            [system] { header "__algorithm/in_in_out_result.h" }
-module std_private_algorithm_in_in_result                                [system] { header "__algorithm/in_in_result.h" }
-module std_private_algorithm_in_out_out_result                           [system] { header "__algorithm/in_out_out_result.h" }
-module std_private_algorithm_in_out_result                               [system] { header "__algorithm/in_out_result.h" }
-module std_private_algorithm_includes                                    [system] { header "__algorithm/includes.h" }
-module std_private_algorithm_inplace_merge                               [system] { header "__algorithm/inplace_merge.h" }
-module std_private_algorithm_is_heap                                     [system] { header "__algorithm/is_heap.h" }
-module std_private_algorithm_is_heap_until                               [system] { header "__algorithm/is_heap_until.h" }
-module std_private_algorithm_is_partitioned                              [system] { header "__algorithm/is_partitioned.h" }
-module std_private_algorithm_is_permutation                              [system] { header "__algorithm/is_permutation.h" }
-module std_private_algorithm_is_sorted                                   [system] { header "__algorithm/is_sorted.h" }
-module std_private_algorithm_is_sorted_until                             [system] { header "__algorithm/is_sorted_until.h" }
-module std_private_algorithm_iter_swap                                   [system] { header "__algorithm/iter_swap.h" }
-module std_private_algorithm_iterator_operations                         [system] {
-  header "__algorithm/iterator_operations.h"
-  export *
-}
-module std_private_algorithm_lexicographical_compare                     [system] { header "__algorithm/lexicographical_compare.h" }
-module std_private_algorithm_lexicographical_compare_three_way           [system] { header "__algorithm/lexicographical_compare_three_way.h" }
-module std_private_algorithm_lower_bound                                 [system] { header "__algorithm/lower_bound.h" }
-module std_private_algorithm_make_heap                                   [system] { header "__algorithm/make_heap.h" }
-module std_private_algorithm_make_projected                              [system] { header "__algorithm/make_projected.h" }
-module std_private_algorithm_max                                         [system] { header "__algorithm/max.h" }
-module std_private_algorithm_max_element                                 [system] { header "__algorithm/max_element.h" }
-module std_private_algorithm_merge                                       [system] { header "__algorithm/merge.h" }
-module std_private_algorithm_min                                         [system] { header "__algorithm/min.h" }
-module std_private_algorithm_min_element                                 [system] { header "__algorithm/min_element.h" }
-module std_private_algorithm_min_max_result                              [system] { header "__algorithm/min_max_result.h" }
-module std_private_algorithm_minmax                                      [system] {
-  header "__algorithm/minmax.h"
-  export *
-}
-module std_private_algorithm_minmax_element                              [system] { header "__algorithm/minmax_element.h" }
-module std_private_algorithm_mismatch                                    [system] {
-  header "__algorithm/mismatch.h"
-  export std_private_algorithm_simd_utils
-  export std_private_iterator_aliasing_iterator
-}
-module std_private_algorithm_move                                        [system] { header "__algorithm/move.h" }
-module std_private_algorithm_move_backward                               [system] { header "__algorithm/move_backward.h" }
-module std_private_algorithm_next_permutation                            [system] { header "__algorithm/next_permutation.h" }
-module std_private_algorithm_none_of                                     [system] { header "__algorithm/none_of.h" }
-module std_private_algorithm_nth_element                                 [system] { header "__algorithm/nth_element.h" }
-module std_private_algorithm_partial_sort                                [system] { header "__algorithm/partial_sort.h" }
-module std_private_algorithm_partial_sort_copy                           [system] { header "__algorithm/partial_sort_copy.h" }
-module std_private_algorithm_partition                                   [system] { header "__algorithm/partition.h" }
-module std_private_algorithm_partition_copy                              [system] { header "__algorithm/partition_copy.h" }
-module std_private_algorithm_partition_point                             [system] { header "__algorithm/partition_point.h" }
-module std_private_algorithm_pop_heap                                    [system] { header "__algorithm/pop_heap.h" }
-module std_private_algorithm_prev_permutation                            [system] { header "__algorithm/prev_permutation.h" }
-module std_private_algorithm_pstl                                        [system] {
-  header "__algorithm/pstl.h"
-  export *
-}
-module std_private_algorithm_push_heap                                   [system] { header "__algorithm/push_heap.h" }
-module std_private_algorithm_ranges_adjacent_find                        [system] { header "__algorithm/ranges_adjacent_find.h" }
-module std_private_algorithm_ranges_all_of                               [system] { header "__algorithm/ranges_all_of.h" }
-module std_private_algorithm_ranges_any_of                               [system] { header "__algorithm/ranges_any_of.h" }
-module std_private_algorithm_ranges_binary_search                        [system] {
-  header "__algorithm/ranges_binary_search.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_clamp                                [system] {
-  header "__algorithm/ranges_clamp.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_contains                             [system] { header "__algorithm/ranges_contains.h" }
-module std_private_algorithm_ranges_contains_subrange                    [system] { header "__algorithm/ranges_contains_subrange.h" }
-module std_private_algorithm_ranges_copy                                 [system] {
-  header "__algorithm/ranges_copy.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_copy_backward                        [system] {
-  header "__algorithm/ranges_copy_backward.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_copy_if                              [system] {
-  header "__algorithm/ranges_copy_if.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_copy_n                               [system] {
-  header "__algorithm/ranges_copy_n.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_count                                [system] { header "__algorithm/ranges_count.h" }
-module std_private_algorithm_ranges_count_if                             [system] { header "__algorithm/ranges_count_if.h" }
-module std_private_algorithm_ranges_ends_with                            [system] { header "__algorithm/ranges_ends_with.h" }
-module std_private_algorithm_ranges_equal                                [system] { header "__algorithm/ranges_equal.h" }
-module std_private_algorithm_ranges_equal_range                          [system] {
-  header "__algorithm/ranges_equal_range.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_fill                                 [system] { header "__algorithm/ranges_fill.h" }
-module std_private_algorithm_ranges_fill_n                               [system] { header "__algorithm/ranges_fill_n.h" }
-module std_private_algorithm_ranges_find                                 [system] { header "__algorithm/ranges_find.h" }
-module std_private_algorithm_ranges_find_end                             [system] { header "__algorithm/ranges_find_end.h" }
-module std_private_algorithm_ranges_find_first_of                        [system] { header "__algorithm/ranges_find_first_of.h" }
-module std_private_algorithm_ranges_find_if                              [system] { header "__algorithm/ranges_find_if.h" }
-module std_private_algorithm_ranges_find_if_not                          [system] { header "__algorithm/ranges_find_if_not.h" }
-module std_private_algorithm_ranges_find_last                            [system] { header "__algorithm/ranges_find_last.h" }
-module std_private_algorithm_ranges_for_each                             [system] {
-  header "__algorithm/ranges_for_each.h"
-  export std_private_algorithm_in_fun_result
-}
-module std_private_algorithm_ranges_for_each_n                           [system] {
-  header "__algorithm/ranges_for_each_n.h"
-  export std_private_algorithm_in_fun_result
-}
-module std_private_algorithm_ranges_generate                             [system] { header "__algorithm/ranges_generate.h" }
-module std_private_algorithm_ranges_generate_n                           [system] { header "__algorithm/ranges_generate_n.h" }
-module std_private_algorithm_ranges_includes                             [system] {
-  header "__algorithm/ranges_includes.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_inplace_merge                        [system] {
-  header "__algorithm/ranges_inplace_merge.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_is_heap                              [system] {
-  header "__algorithm/ranges_is_heap.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_is_heap_until                        [system] {
-  header "__algorithm/ranges_is_heap_until.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_is_partitioned                       [system] { header "__algorithm/ranges_is_partitioned.h" }
-module std_private_algorithm_ranges_is_permutation                       [system] { header "__algorithm/ranges_is_permutation.h" }
-module std_private_algorithm_ranges_is_sorted                            [system] {
-  header "__algorithm/ranges_is_sorted.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_is_sorted_until                      [system] {
-  header "__algorithm/ranges_is_sorted_until.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_iterator_concept                     [system] { header "__algorithm/ranges_iterator_concept.h" }
-module std_private_algorithm_ranges_lexicographical_compare              [system] {
-  header "__algorithm/ranges_lexicographical_compare.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_lower_bound                          [system] {
-  header "__algorithm/ranges_lower_bound.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_make_heap                            [system] {
-  header "__algorithm/ranges_make_heap.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_max                                  [system] {
-  header "__algorithm/ranges_max.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_max_element                          [system] {
-  header "__algorithm/ranges_max_element.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_merge                                [system] {
-  header "__algorithm/ranges_merge.h"
-  export std_private_algorithm_in_in_out_result
-}
-module std_private_algorithm_ranges_min                                  [system] {
-  header "__algorithm/ranges_min.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_min_element                          [system] {
-  header "__algorithm/ranges_min_element.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_minmax                               [system] {
-  header "__algorithm/ranges_minmax.h"
-  export std_private_functional_ranges_operations
-  export std_private_algorithm_min_max_result
-}
-module std_private_algorithm_ranges_minmax_element                       [system] {
-  header "__algorithm/ranges_minmax_element.h"
-  export std_private_functional_ranges_operations
-  export std_private_algorithm_min_max_result
-}
-module std_private_algorithm_ranges_mismatch                             [system] {
-  header "__algorithm/ranges_mismatch.h"
-  export std_private_algorithm_in_in_result
-}
-module std_private_algorithm_ranges_move                                 [system] {
-  header "__algorithm/ranges_move.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_move_backward                        [system] {
-  header "__algorithm/ranges_move_backward.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_next_permutation                     [system] {
-  header "__algorithm/ranges_next_permutation.h"
-  export std_private_algorithm_in_found_result
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_none_of                              [system] { header "__algorithm/ranges_none_of.h" }
-module std_private_algorithm_ranges_nth_element                          [system] {
-  header "__algorithm/ranges_nth_element.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_partial_sort                         [system] {
-  header "__algorithm/ranges_partial_sort.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_partial_sort_copy                    [system] {
-  header "__algorithm/ranges_partial_sort_copy.h"
-  export std_private_algorithm_in_out_result
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_partition                            [system] { header "__algorithm/ranges_partition.h" }
-module std_private_algorithm_ranges_partition_copy                       [system] { header "__algorithm/ranges_partition_copy.h" }
-module std_private_algorithm_ranges_partition_point                      [system] { header "__algorithm/ranges_partition_point.h" }
-module std_private_algorithm_ranges_pop_heap                             [system] {
-  header "__algorithm/ranges_pop_heap.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_prev_permutation                     [system] {
-  header "__algorithm/ranges_prev_permutation.h"
-  export std_private_algorithm_in_found_result
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_push_heap                            [system] {
-  header "__algorithm/ranges_push_heap.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_remove                               [system] { header "__algorithm/ranges_remove.h" }
-module std_private_algorithm_ranges_remove_copy                          [system] {
-  header "__algorithm/ranges_remove_copy.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_remove_copy_if                       [system] {
-  header "__algorithm/ranges_remove_copy_if.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_remove_if                            [system] { header "__algorithm/ranges_remove_if.h" }
-module std_private_algorithm_ranges_replace                              [system] { header "__algorithm/ranges_replace.h" }
-module std_private_algorithm_ranges_replace_copy                         [system] {
-  header "__algorithm/ranges_replace_copy.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_replace_copy_if                      [system] {
-  header "__algorithm/ranges_replace_copy_if.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_replace_if                           [system] { header "__algorithm/ranges_replace_if.h" }
-module std_private_algorithm_ranges_reverse                              [system] { header "__algorithm/ranges_reverse.h" }
-module std_private_algorithm_ranges_reverse_copy                         [system] {
-  header "__algorithm/ranges_reverse_copy.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_rotate                               [system] { header "__algorithm/ranges_rotate.h" }
-module std_private_algorithm_ranges_rotate_copy                          [system] {
-  header "__algorithm/ranges_rotate_copy.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_sample                               [system] { header "__algorithm/ranges_sample.h" }
-module std_private_algorithm_ranges_search                               [system] { header "__algorithm/ranges_search.h" }
-module std_private_algorithm_ranges_search_n                             [system] { header "__algorithm/ranges_search_n.h" }
-module std_private_algorithm_ranges_set_difference                       [system] {
-  header "__algorithm/ranges_set_difference.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_set_intersection                     [system] {
-  header "__algorithm/ranges_set_intersection.h"
-  export std_private_algorithm_in_in_out_result
-}
-module std_private_algorithm_ranges_set_symmetric_difference             [system] {
-  header "__algorithm/ranges_set_symmetric_difference.h"
-  export std_private_algorithm_in_in_out_result
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_set_union                            [system] {
-  header "__algorithm/ranges_set_union.h"
-  export std_private_algorithm_in_in_out_result
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_shuffle                              [system] { header "__algorithm/ranges_shuffle.h" }
-module std_private_algorithm_ranges_sort                                 [system] {
-  header "__algorithm/ranges_sort.h"
-  export std_private_algorithm_make_projected
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_sort_heap                            [system] {
-  header "__algorithm/ranges_sort_heap.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_stable_partition                     [system] { header "__algorithm/ranges_stable_partition.h" }
-module std_private_algorithm_ranges_stable_sort                          [system] {
-  header "__algorithm/ranges_stable_sort.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_ranges_starts_with                          [system] { header "__algorithm/ranges_starts_with.h" }
-module std_private_algorithm_ranges_swap_ranges                          [system] {
-  header "__algorithm/ranges_swap_ranges.h"
-  export std_private_algorithm_in_in_result
-}
-module std_private_algorithm_ranges_transform                            [system] {
-  header "__algorithm/ranges_transform.h"
-  export std_private_algorithm_in_in_out_result
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_unique                               [system] { header "__algorithm/ranges_unique.h" }
-module std_private_algorithm_ranges_unique_copy                          [system] {
-  header "__algorithm/ranges_unique_copy.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_algorithm_ranges_upper_bound                          [system] {
-  header "__algorithm/ranges_upper_bound.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_algorithm_remove                                      [system] { header "__algorithm/remove.h" }
-module std_private_algorithm_remove_copy                                 [system] { header "__algorithm/remove_copy.h" }
-module std_private_algorithm_remove_copy_if                              [system] { header "__algorithm/remove_copy_if.h" }
-module std_private_algorithm_remove_if                                   [system] { header "__algorithm/remove_if.h" }
-module std_private_algorithm_replace                                     [system] { header "__algorithm/replace.h" }
-module std_private_algorithm_replace_copy                                [system] { header "__algorithm/replace_copy.h" }
-module std_private_algorithm_replace_copy_if                             [system] { header "__algorithm/replace_copy_if.h" }
-module std_private_algorithm_replace_if                                  [system] { header "__algorithm/replace_if.h" }
-module std_private_algorithm_reverse                                     [system] { header "__algorithm/reverse.h" }
-module std_private_algorithm_reverse_copy                                [system] { header "__algorithm/reverse_copy.h" }
-module std_private_algorithm_rotate                                      [system] { header "__algorithm/rotate.h" }
-module std_private_algorithm_rotate_copy                                 [system] { header "__algorithm/rotate_copy.h" }
-module std_private_algorithm_sample                                      [system] { header "__algorithm/sample.h" }
-module std_private_algorithm_search                                      [system] { header "__algorithm/search.h" }
-module std_private_algorithm_search_n                                    [system] { header "__algorithm/search_n.h" }
-module std_private_algorithm_set_difference                              [system] { header "__algorithm/set_difference.h" }
-module std_private_algorithm_set_intersection                            [system] { header "__algorithm/set_intersection.h" }
-module std_private_algorithm_set_symmetric_difference                    [system] { header "__algorithm/set_symmetric_difference.h" }
-module std_private_algorithm_set_union                                   [system] { header "__algorithm/set_union.h" }
-module std_private_algorithm_shift_left                                  [system] { header "__algorithm/shift_left.h" }
-module std_private_algorithm_shift_right                                 [system] { header "__algorithm/shift_right.h" }
-module std_private_algorithm_shuffle                                     [system] { header "__algorithm/shuffle.h" }
-module std_private_algorithm_sift_down                                   [system] { header "__algorithm/sift_down.h" }
-module std_private_algorithm_sort                                        [system] {
-  header "__algorithm/sort.h"
-  export std_private_debug_utils_strict_weak_ordering_check
-}
-module std_private_algorithm_simd_utils                                  [system] { header "__algorithm/simd_utils.h" }
-module std_private_algorithm_sort_heap                                   [system] { header "__algorithm/sort_heap.h" }
-module std_private_algorithm_stable_partition                            [system] { header "__algorithm/stable_partition.h" }
-module std_private_algorithm_stable_sort                                 [system] { header "__algorithm/stable_sort.h" }
-module std_private_algorithm_swap_ranges                                 [system] {
-  header "__algorithm/swap_ranges.h"
-  export std_private_algorithm_iterator_operations
-}
-module std_private_algorithm_three_way_comp_ref_type                     [system] { header "__algorithm/three_way_comp_ref_type.h" }
-module std_private_algorithm_transform                                   [system] { header "__algorithm/transform.h" }
-module std_private_algorithm_uniform_random_bit_generator_adaptor        [system] { header "__algorithm/uniform_random_bit_generator_adaptor.h" }
-module std_private_algorithm_unique                                      [system] { header "__algorithm/unique.h" }
-module std_private_algorithm_unique_copy                                 [system] { header "__algorithm/unique_copy.h" }
-module std_private_algorithm_unwrap_iter                                 [system] {
-  header "__algorithm/unwrap_iter.h"
-  export std_private_iterator_iterator_traits
-}
-module std_private_algorithm_unwrap_range                                [system] {
-  header "__algorithm/unwrap_range.h"
-  export std_private_utility_pair
-}
-module std_private_algorithm_upper_bound                                 [system] { header "__algorithm/upper_bound.h" }
+  module valarray {
+    header "valarray"
+    export *
+  }
 
-module std_private_array_array_fwd [system] { header "__fwd/array.h" }
+  module variant {
+    module fwd       { header "__fwd/variant.h" }
+    module monostate { header "__variant/monostate.h" }
 
-module std_private_atomic_aliases             [system] {
-  header "__atomic/aliases.h"
-  export std_private_atomic_atomic
-}
-module std_private_atomic_atomic              [system] {
-  header "__atomic/atomic.h"
-  export std_private_atomic_atomic_base
-}
-module std_private_atomic_atomic_base         [system] { header "__atomic/atomic_base.h" }
-module std_private_atomic_atomic_flag         [system] {
-  header "__atomic/atomic_flag.h"
-  export *
-}
-module std_private_atomic_atomic_init         [system] { header "__atomic/atomic_init.h" }
-module std_private_atomic_atomic_lock_free    [system] { header "__atomic/atomic_lock_free.h" }
-module std_private_atomic_atomic_ref          [system] { header "__atomic/atomic_ref.h" }
-module std_private_atomic_atomic_sync         [system] {
-  header "__atomic/atomic_sync.h"
-  export std_private_atomic_to_gcc_order
-}
-module std_private_atomic_check_memory_order  [system] { header "__atomic/check_memory_order.h" }
-module std_private_atomic_contention_t        [system] { header "__atomic/contention_t.h" }
-module std_private_atomic_cxx_atomic_impl     [system] { header "__atomic/cxx_atomic_impl.h" }
-module std_private_atomic_fence               [system] { header "__atomic/fence.h" }
-module std_private_atomic_is_always_lock_free [system] { header "__atomic/is_always_lock_free.h" }
-module std_private_atomic_kill_dependency     [system] { header "__atomic/kill_dependency.h" }
-module std_private_atomic_memory_order        [system] { header "__atomic/memory_order.h" }
-module std_private_atomic_to_gcc_order        [system] {
-  header "__atomic/to_gcc_order.h"
-  export std_private_atomic_memory_order
-}
+    header "variant"
+    export *
+  }
 
-module std_private_bit_bit_cast       [system] { header "__bit/bit_cast.h" }
-module std_private_bit_bit_ceil       [system] { header "__bit/bit_ceil.h" }
-module std_private_bit_bit_floor      [system] { header "__bit/bit_floor.h" }
-module std_private_bit_bit_log2       [system] { header "__bit/bit_log2.h" }
-module std_private_bit_bit_width      [system] { header "__bit/bit_width.h" }
-module std_private_bit_blsr           [system] { header "__bit/blsr.h" }
-module std_private_bit_byteswap       [system] { header "__bit/byteswap.h" }
-module std_private_bit_countl         [system] { header "__bit/countl.h" }
-module std_private_bit_countr         [system] { header "__bit/countr.h" }
-module std_private_bit_endian         [system] { header "__bit/endian.h" }
-module std_private_bit_has_single_bit [system] { header "__bit/has_single_bit.h" }
-module std_private_bit_invert_if      [system] { header "__bit/invert_if.h" }
-module std_private_bit_popcount       [system] { header "__bit/popcount.h" }
-module std_private_bit_rotate         [system] { header "__bit/rotate.h" }
-
-module std_private_chrono_calendar               [system] { header "__chrono/calendar.h" }
-module std_private_chrono_concepts               [system] { header "__chrono/concepts.h" }
-module std_private_chrono_convert_to_timespec    [system] { header "__chrono/convert_to_timespec.h" }
-module std_private_chrono_convert_to_tm          [system] { header "__chrono/convert_to_tm.h" }
-module std_private_chrono_day                    [system] { header "__chrono/day.h" }
-module std_private_chrono_duration               [system] {
-  header "__chrono/duration.h"
-  export std_private_type_traits_is_convertible
-}
-module std_private_chrono_exception              [system] { header "__chrono/exception.h" }
-module std_private_chrono_file_clock             [system] { header "__chrono/file_clock.h" }
-module std_private_chrono_formatter              [system] {
-  header "__chrono/formatter.h"
-}
-module std_private_chrono_hh_mm_ss               [system] { header "__chrono/hh_mm_ss.h" }
-module std_private_chrono_high_resolution_clock  [system] {
-  header "__chrono/high_resolution_clock.h"
-  export std_private_chrono_steady_clock
-  export std_private_chrono_system_clock
-}
-module std_private_chrono_leap_second            [system] { header "__chrono/leap_second.h" }
-module std_private_chrono_literals               [system] { header "__chrono/literals.h" }
-module std_private_chrono_local_info             [system] {
-  header "__chrono/local_info.h"
-  export std_private_chrono_sys_info
-}
-module std_private_chrono_month                  [system] { header "__chrono/month.h" }
-module std_private_chrono_month_weekday          [system] { header "__chrono/month_weekday.h" }
-module std_private_chrono_monthday               [system] { header "__chrono/monthday.h" }
-module std_private_chrono_ostream                [system] {
-  header "__chrono/ostream.h"
-}
-module std_private_chrono_parser_std_format_spec [system] {
-  header "__chrono/parser_std_format_spec.h"
-}
-module std_private_chrono_statically_widen       [system] { header "__chrono/statically_widen.h" }
-module std_private_chrono_steady_clock           [system] {
-  header "__chrono/steady_clock.h"
-  export std_private_chrono_time_point
-}
-module std_private_chrono_time_zone              [system] {
-  header "__chrono/time_zone.h"
-  export std_private_memory_unique_ptr
-}
-module std_private_chrono_time_zone_link         [system] {
-  header "__chrono/time_zone_link.h"
-}
-module std_private_chrono_sys_info               [system] {
-  header "__chrono/sys_info.h"
-}
-module std_private_chrono_system_clock           [system] {
-  header "__chrono/system_clock.h"
-  export std_private_chrono_time_point
-}
-module std_private_chrono_tzdb                   [system] {
-  header "__chrono/tzdb.h"
-  export *
-}
-module std_private_chrono_tzdb_list              [system] {
-  header "__chrono/tzdb_list.h"
-  export *
-}
-module std_private_chrono_time_point             [system] { header "__chrono/time_point.h" }
-module std_private_chrono_weekday                [system] { header "__chrono/weekday.h" }
-module std_private_chrono_year                   [system] { header "__chrono/year.h" }
-module std_private_chrono_year_month             [system] { header "__chrono/year_month.h" }
-module std_private_chrono_year_month_day         [system] { header "__chrono/year_month_day.h" }
-module std_private_chrono_year_month_weekday     [system] { header "__chrono/year_month_weekday.h" }
-module std_private_chrono_zoned_time             [system] { header "__chrono/zoned_time.h" }
-
-module std_private_compare_common_comparison_category     [system] { header "__compare/common_comparison_category.h" }
-module std_private_compare_compare_partial_order_fallback [system] { header "__compare/compare_partial_order_fallback.h" }
-module std_private_compare_compare_strong_order_fallback  [system] { header "__compare/compare_strong_order_fallback.h" }
-module std_private_compare_compare_three_way              [system] { header "__compare/compare_three_way.h" }
-module std_private_compare_compare_three_way_result       [system] { header "__compare/compare_three_way_result.h" }
-module std_private_compare_compare_weak_order_fallback    [system] { header "__compare/compare_weak_order_fallback.h" }
-module std_private_compare_is_eq                          [system] { header "__compare/is_eq.h" }
-module std_private_compare_ordering                       [system] { header "__compare/ordering.h" }
-module std_private_compare_partial_order                  [system] { header "__compare/partial_order.h" }
-module std_private_compare_strong_order                   [system] { header "__compare/strong_order.h" }
-module std_private_compare_synth_three_way                [system] { header "__compare/synth_three_way.h" }
-module std_private_compare_three_way_comparable           [system] { header "__compare/three_way_comparable.h" }
-module std_private_compare_weak_order                     [system] { header "__compare/weak_order.h" }
-
-module std_private_complex_complex_fwd            [system] { header "__fwd/complex.h" }
-
-module std_private_concepts_arithmetic            [system] { header "__concepts/arithmetic.h" }
-module std_private_concepts_assignable            [system] { header "__concepts/assignable.h" }
-module std_private_concepts_boolean_testable      [system] { header "__concepts/boolean_testable.h" }
-module std_private_concepts_class_or_enum         [system] { header "__concepts/class_or_enum.h" }
-module std_private_concepts_common_reference_with [system] { header "__concepts/common_reference_with.h" }
-module std_private_concepts_common_with           [system] { header "__concepts/common_with.h" }
-module std_private_concepts_constructible         [system] {
-  header "__concepts/constructible.h"
-  export std_private_concepts_destructible
-}
-module std_private_concepts_convertible_to        [system] { header "__concepts/convertible_to.h" }
-module std_private_concepts_copyable              [system] { header "__concepts/copyable.h" }
-module std_private_concepts_derived_from          [system] { header "__concepts/derived_from.h" }
-module std_private_concepts_destructible          [system] {
-  header "__concepts/destructible.h"
-  export std_private_type_traits_is_nothrow_destructible
-}
-module std_private_concepts_different_from        [system] { header "__concepts/different_from.h" }
-module std_private_concepts_equality_comparable   [system] {
-  header "__concepts/equality_comparable.h"
-  export std_private_type_traits_common_reference
-}
-module std_private_concepts_invocable             [system] { header "__concepts/invocable.h" }
-module std_private_concepts_movable               [system] {
-  header "__concepts/movable.h"
-  export std_private_type_traits_is_object
-}
-module std_private_concepts_predicate             [system] { header "__concepts/predicate.h" }
-module std_private_concepts_regular               [system] { header "__concepts/regular.h" }
-module std_private_concepts_relation              [system] { header "__concepts/relation.h" }
-module std_private_concepts_same_as               [system] {
-  header "__concepts/same_as.h"
-  export std_private_type_traits_is_same
-}
-module std_private_concepts_semiregular           [system] { header "__concepts/semiregular.h" }
-module std_private_concepts_swappable             [system] { header "__concepts/swappable.h" }
-module std_private_concepts_totally_ordered       [system] { header "__concepts/totally_ordered.h" }
-
-module std_private_debug_utils_randomize_range            [system] { header "__debug_utils/randomize_range.h" }
-module std_private_debug_utils_sanitizers                 [system] { header "__debug_utils/sanitizers.h" }
-module std_private_debug_utils_strict_weak_ordering_check [system] {
-  header "__debug_utils/strict_weak_ordering_check.h"
-  export std_private_type_traits_is_constant_evaluated
-}
+  module vector {
+    module fwd { header "__fwd/vector.h" }
 
-module std_private_deque_fwd [system] { header "__fwd/deque.h" }
+    header "vector"
+    export *
+  }
 
-module std_private_exception_exception        [system] { header "__exception/exception.h" }
-module std_private_exception_exception_ptr    [system] {
-  header "__exception/exception_ptr.h"
-  export std_private_exception_operations
-}
-module std_private_exception_nested_exception [system] { header "__exception/nested_exception.h" }
-module std_private_exception_operations       [system] { header "__exception/operations.h" }
-module std_private_exception_terminate        [system] { header "__exception/terminate.h" }
-
-module std_private_expected_bad_expected_access [system] { header "__expected/bad_expected_access.h" }
-module std_private_expected_expected            [system] { header "__expected/expected.h" }
-module std_private_expected_unexpect            [system] { header "__expected/unexpect.h" }
-module std_private_expected_unexpected          [system] { header "__expected/unexpected.h" }
-
-module std_private_format_buffer                          [system] { header "__format/buffer.h" }
-module std_private_format_concepts                        [system] { header "__format/concepts.h" }
-module std_private_format_container_adaptor               [system] { header "__format/container_adaptor.h" }
-module std_private_format_enable_insertable               [system] { header "__format/enable_insertable.h" }
-module std_private_format_escaped_output_table            [system] { header "__format/escaped_output_table.h" }
-module std_private_format_extended_grapheme_cluster_table [system] { header "__format/extended_grapheme_cluster_table.h" }
-module std_private_format_format_arg                      [system] { header "__format/format_arg.h" }
-module std_private_format_format_arg_store                [system] { header "__format/format_arg_store.h" }
-module std_private_format_format_args                     [system] { header "__format/format_args.h" }
-module std_private_format_format_context                  [system] {
-  header "__format/format_context.h"
-  export *
-}
-module std_private_format_format_error                    [system] { header "__format/format_error.h" }
-module std_private_format_format_functions                [system] {
-  header "__format/format_functions.h"
-  export std_string
-}
-module std_private_format_fwd                             [system] { header "__fwd/format.h" }
-module std_private_format_format_parse_context            [system] { header "__format/format_parse_context.h" }
-module std_private_format_format_string                   [system] { header "__format/format_string.h" }
-module std_private_format_format_to_n_result              [system] {
-  header "__format/format_to_n_result.h"
-  export std_private_iterator_incrementable_traits
-}
-module std_private_format_formatter                       [system] { header "__format/formatter.h" }
-module std_private_format_formatter_bool                  [system] { header "__format/formatter_bool.h" }
-module std_private_format_formatter_char                  [system] { header "__format/formatter_char.h" }
-module std_private_format_formatter_floating_point        [system] { header "__format/formatter_floating_point.h" }
-module std_private_format_formatter_integer               [system] { header "__format/formatter_integer.h" }
-module std_private_format_formatter_integral              [system] { header "__format/formatter_integral.h" }
-module std_private_format_formatter_output                [system] { header "__format/formatter_output.h" }
-module std_private_format_formatter_pointer               [system] { header "__format/formatter_pointer.h" }
-module std_private_format_formatter_string                [system] { header "__format/formatter_string.h" }
-module std_private_format_formatter_tuple                 [system] { header "__format/formatter_tuple.h" }
-module std_private_format_indic_conjunct_break_table      [system] { header "__format/indic_conjunct_break_table.h" }
-module std_private_format_parser_std_format_spec          [system] { header "__format/parser_std_format_spec.h" }
-module std_private_format_range_default_formatter         [system] { header "__format/range_default_formatter.h" }
-module std_private_format_range_formatter                 [system] { header "__format/range_formatter.h" }
-module std_private_format_unicode                         [system] {
-  header "__format/unicode.h"
-  export std_private_format_extended_grapheme_cluster_table
-  export std_private_format_indic_conjunct_break_table
-}
-module std_private_format_width_estimation_table          [system] { header "__format/width_estimation_table.h" }
-module std_private_format_write_escaped                   [system] { header "__format/write_escaped.h" }
-
-module std_private_functional_binary_function            [system] { header "__functional/binary_function.h" }
-module std_private_functional_binary_negate              [system] { header "__functional/binary_negate.h" }
-module std_private_functional_bind                       [system] { header "__functional/bind.h" }
-module std_private_functional_bind_back                  [system] { header "__functional/bind_back.h" }
-module std_private_functional_bind_front                 [system] { header "__functional/bind_front.h" }
-module std_private_functional_binder1st                  [system] { header "__functional/binder1st.h" }
-module std_private_functional_binder2nd                  [system] { header "__functional/binder2nd.h" }
-module std_private_functional_boyer_moore_searcher       [system] {
-  header "__functional/boyer_moore_searcher.h"
-  export std_private_memory_shared_ptr
-}
-module std_private_functional_compose                    [system] {
-  header "__functional/compose.h"
-  export std_private_functional_perfect_forward
-}
-module std_private_functional_default_searcher           [system] { header "__functional/default_searcher.h" }
-module std_private_functional_function                   [system] { header "__functional/function.h" }
-module std_private_functional_hash                       [system] {
-  header "__functional/hash.h"
-  export std_cstdint
-  export std_private_type_traits_underlying_type
-  export std_private_utility_pair
-}
-module std_private_functional_fwd                        [system] { header "__fwd/functional.h" }
-module std_private_functional_identity                   [system] { header "__functional/identity.h" }
-module std_private_functional_invoke                     [system] {
-  header "__functional/invoke.h"
-  export *
-}
-module std_private_functional_is_transparent             [system] { header "__functional/is_transparent.h" }
-module std_private_functional_mem_fn                     [system] { header "__functional/mem_fn.h" }
-module std_private_functional_mem_fun_ref                [system] { header "__functional/mem_fun_ref.h" }
-module std_private_functional_not_fn                     [system] {
-  header "__functional/not_fn.h"
-  export std_private_functional_perfect_forward
-}
-module std_private_functional_operations                 [system] { header "__functional/operations.h" }
-module std_private_functional_perfect_forward            [system] {
-  header "__functional/perfect_forward.h"
-  export *
-}
-module std_private_functional_pointer_to_binary_function [system] { header "__functional/pointer_to_binary_function.h" }
-module std_private_functional_pointer_to_unary_function  [system] { header "__functional/pointer_to_unary_function.h" }
-module std_private_functional_ranges_operations          [system] { header "__functional/ranges_operations.h" }
-module std_private_functional_reference_wrapper          [system] { header "__functional/reference_wrapper.h" }
-module std_private_functional_unary_function             [system] { header "__functional/unary_function.h" }
-module std_private_functional_unary_negate               [system] { header "__functional/unary_negate.h" }
-module std_private_functional_weak_result_type           [system] { header "__functional/weak_result_type.h" }
-
-module std_private_ios_fpos [system] { header "__ios/fpos.h" }
-
-module std_private_iosfwd_fstream_fwd   [system] { header "__fwd/fstream.h" }
-module std_private_iosfwd_ios_fwd       [system] { header "__fwd/ios.h" }
-module std_private_iosfwd_istream_fwd   [system] { header "__fwd/istream.h" }
-module std_private_iosfwd_ostream_fwd   [system] { header "__fwd/ostream.h" }
-module std_private_iosfwd_sstream_fwd   [system] { header "__fwd/sstream.h" }
-module std_private_iosfwd_streambuf_fwd [system] { header "__fwd/streambuf.h" }
-
-module std_private_iterator_access                  [system] { header "__iterator/access.h" }
-module std_private_iterator_advance                 [system] { header "__iterator/advance.h" }
-module std_private_iterator_aliasing_iterator       [system] { header "__iterator/aliasing_iterator.h" }
-module std_private_iterator_back_insert_iterator    [system] { header "__iterator/back_insert_iterator.h" }
-module std_private_iterator_bounded_iter            [system] { header "__iterator/bounded_iter.h" }
-module std_private_iterator_common_iterator         [system] { header "__iterator/common_iterator.h" }
-module std_private_iterator_concepts                [system] {
-  header "__iterator/concepts.h"
-  export std_private_concepts_constructible
-  export std_private_concepts_equality_comparable
-  export std_private_concepts_movable
-  export std_private_type_traits_common_reference
-  export std_private_type_traits_is_reference
-  export std_private_type_traits_remove_cvref
-}
-module std_private_iterator_counted_iterator        [system] { header "__iterator/counted_iterator.h" }
-module std_private_iterator_cpp17_iterator_concepts [system] { header "__iterator/cpp17_iterator_concepts.h" }
-module std_private_iterator_data                    [system] { header "__iterator/data.h" }
-module std_private_iterator_default_sentinel        [system] { header "__iterator/default_sentinel.h" }
-module std_private_iterator_distance                [system] {
-  header "__iterator/distance.h"
-  export std_private_ranges_size
-}
-module std_private_iterator_empty                   [system] { header "__iterator/empty.h" }
-module std_private_iterator_erase_if_container      [system] { header "__iterator/erase_if_container.h" }
-module std_private_iterator_front_insert_iterator   [system] { header "__iterator/front_insert_iterator.h" }
-module std_private_iterator_incrementable_traits    [system] { header "__iterator/incrementable_traits.h" }
-module std_private_iterator_indirectly_comparable   [system] { header "__iterator/indirectly_comparable.h" }
-module std_private_iterator_insert_iterator         [system] { header "__iterator/insert_iterator.h" }
-module std_private_iterator_istream_iterator        [system] { header "__iterator/istream_iterator.h" }
-module std_private_iterator_istreambuf_iterator     [system] { header "__iterator/istreambuf_iterator.h" }
-module std_private_iterator_iter_move               [system] { header "__iterator/iter_move.h" }
-module std_private_iterator_iter_swap               [system] { header "__iterator/iter_swap.h" }
-module std_private_iterator_iterator                [system] { header "__iterator/iterator.h" }
-module std_private_iterator_iterator_traits         [system] {
-  header "__iterator/iterator_traits.h"
-  export std_private_type_traits_is_primary_template
-  export std_private_type_traits_integral_constant
-}
-module std_private_iterator_iterator_with_data      [system] { header "__iterator/iterator_with_data.h" }
-module std_private_iterator_mergeable               [system] {
-  header "__iterator/mergeable.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_iterator_move_iterator           [system] { header "__iterator/move_iterator.h" }
-module std_private_iterator_move_sentinel           [system] { header "__iterator/move_sentinel.h" }
-module std_private_iterator_next                    [system] { header "__iterator/next.h" }
-module std_private_iterator_ostream_iterator        [system] { header "__iterator/ostream_iterator.h" }
-module std_private_iterator_ostreambuf_iterator     [system] {
-  header "__iterator/ostreambuf_iterator.h"
-  export *
-}
-module std_private_iterator_permutable              [system] { header "__iterator/permutable.h" }
-module std_private_iterator_prev                    [system] { header "__iterator/prev.h" }
-module std_private_iterator_projected               [system] { header "__iterator/projected.h" }
-module std_private_iterator_ranges_iterator_traits  [system] { header "__iterator/ranges_iterator_traits.h" }
-module std_private_iterator_readable_traits         [system] { header "__iterator/readable_traits.h" }
-module std_private_iterator_reverse_access          [system] { header "__iterator/reverse_access.h" }
-module std_private_iterator_reverse_iterator        [system] { header "__iterator/reverse_iterator.h" }
-module std_private_iterator_segmented_iterator      [system] { header "__iterator/segmented_iterator.h" }
-module std_private_iterator_size                    [system] { header "__iterator/size.h" }
-module std_private_iterator_sortable                [system] {
-  header "__iterator/sortable.h"
-  export std_private_functional_ranges_operations
-}
-module std_private_iterator_unreachable_sentinel    [system] { header "__iterator/unreachable_sentinel.h" }
-module std_private_iterator_wrap_iter               [system] { header "__iterator/wrap_iter.h" }
-
-module std_private_locale_locale_base_api_android              [system] { textual header "__locale_dir/locale_base_api/android.h" }
-module std_private_locale_locale_base_api_bsd_locale_defaults  [system] { textual header "__locale_dir/locale_base_api/bsd_locale_defaults.h" }
-module std_private_locale_locale_base_api_bsd_locale_fallbacks [system] { textual header "__locale_dir/locale_base_api/bsd_locale_fallbacks.h" }
-module std_private_locale_locale_base_api_fuchsia              [system] { textual header "__locale_dir/locale_base_api/fuchsia.h" }
-module std_private_locale_locale_base_api_ibm                  [system] { textual header "__locale_dir/locale_base_api/ibm.h" }
-module std_private_locale_locale_base_api_locale_guard         [system] { header "__locale_dir/locale_base_api/locale_guard.h" }
-module std_private_locale_locale_base_api_musl                 [system] { textual header "__locale_dir/locale_base_api/musl.h" }
-module std_private_locale_locale_base_api_newlib               [system] { textual header "__locale_dir/locale_base_api/newlib.h" }
-module std_private_locale_locale_base_api_openbsd              [system] { textual header "__locale_dir/locale_base_api/openbsd.h" }
-module std_private_locale_locale_base_api_win32                [system] { textual header "__locale_dir/locale_base_api/win32.h" }
-module std_private_locale_locale_base_api                      [system] {
-  header "__locale_dir/locale_base_api.h"
-  export *
-}
+  // Experimental C++ Standard Library interfaces
+  module experimental {
+    module iterator           { header "experimental/iterator" }
+    module memory             { header "experimental/memory" }
+    module propagate_const    { header "experimental/propagate_const" }
+    module type_traits        { header "experimental/type_traits" }
+    module utility            { header "experimental/utility" }
+    module simd {
+      private header "experimental/__simd/aligned_tag.h"
+      private header "experimental/__simd/declaration.h"
+      private header "experimental/__simd/reference.h"
+      private header "experimental/__simd/scalar.h"
+      private header "experimental/__simd/simd_mask.h"
+      private header "experimental/__simd/simd.h"
+      private header "experimental/__simd/traits.h"
+      private header "experimental/__simd/utility.h"
+      private header "experimental/__simd/vec_ext.h"
+      header "experimental/simd"
+      export *
+    }
+  }
 
-module std_private_math_abs                             [system] { header "__math/abs.h" }
-module std_private_math_copysign                        [system] { header "__math/copysign.h" }
-module std_private_math_error_functions                 [system] { header "__math/error_functions.h" }
-module std_private_math_exponential_functions           [system] { header "__math/exponential_functions.h" }
-module std_private_math_fdim                            [system] { header "__math/fdim.h" }
-module std_private_math_fma                             [system] { header "__math/fma.h" }
-module std_private_math_gamma                           [system] { header "__math/gamma.h" }
-module std_private_math_hyperbolic_functions            [system] { header "__math/hyperbolic_functions.h" }
-module std_private_math_hypot                           [system] { header "__math/hypot.h" }
-module std_private_math_inverse_hyperbolic_functions    [system] { header "__math/inverse_hyperbolic_functions.h" }
-module std_private_math_inverse_trigonometric_functions [system] { header "__math/inverse_trigonometric_functions.h" }
-module std_private_math_logarithms                      [system] { header "__math/logarithms.h" }
-module std_private_math_min_max                         [system] { header "__math/min_max.h" }
-module std_private_math_modulo                          [system] { header "__math/modulo.h" }
-module std_private_math_remainder                       [system] { header "__math/remainder.h" }
-module std_private_math_roots                           [system] { header "__math/roots.h" }
-module std_private_math_rounding_functions              [system] { header "__math/rounding_functions.h" }
-module std_private_math_special_functions               [system] { header "__math/special_functions.h" }
-module std_private_math_traits                          [system] { header "__math/traits.h" }
-module std_private_math_trigonometric_functions         [system] { header "__math/trigonometric_functions.h" }
-
-module std_private_memory_addressof                       [system] { header "__memory/addressof.h" }
-module std_private_memory_align                           [system] { header "__memory/align.h" }
-module std_private_memory_aligned_alloc                   [system] { header "__memory/aligned_alloc.h" }
-module std_private_memory_allocate_at_least               [system] { header "__memory/allocate_at_least.h" }
-module std_private_memory_allocation_guard                [system] { header "__memory/allocation_guard.h" }
-module std_private_memory_allocator                       [system] { header "__memory/allocator.h" }
-module std_private_memory_allocator_arg_t                 [system] { header "__memory/allocator_arg_t.h" }
-module std_private_memory_allocator_destructor            [system] { header "__memory/allocator_destructor.h" }
-module std_private_memory_allocator_traits                [system] { header "__memory/allocator_traits.h" }
-module std_private_memory_assume_aligned                  [system] { header "__memory/assume_aligned.h" }
-module std_private_memory_auto_ptr                        [system] { header "__memory/auto_ptr.h" }
-module std_private_memory_builtin_new_allocator           [system] {
-  header "__memory/builtin_new_allocator.h"
-  export *
-}
-module std_private_memory_compressed_pair                 [system] { header "__memory/compressed_pair.h" }
-module std_private_memory_concepts                        [system] {
-  header "__memory/concepts.h"
-  export std_private_type_traits_remove_reference
-}
-module std_private_memory_construct_at                    [system] { header "__memory/construct_at.h" }
-module std_private_memory_destruct_n                      [system] { header "__memory/destruct_n.h" }
-module std_private_memory_fwd                             [system] { header "__fwd/memory.h" }
-module std_private_memory_inout_ptr                       [system] { header "__memory/inout_ptr.h" }
-module std_private_memory_noexcept_move_assign_container  [system] { header "__memory/noexcept_move_assign_container.h" }
-module std_private_memory_out_ptr                         [system] { header "__memory/out_ptr.h" }
-module std_private_memory_pointer_traits                  [system] { header "__memory/pointer_traits.h" }
-module std_private_memory_ranges_construct_at             [system] { header "__memory/ranges_construct_at.h" }
-module std_private_memory_ranges_uninitialized_algorithms [system] {
-  header "__memory/ranges_uninitialized_algorithms.h"
-  export std_private_algorithm_in_out_result
-}
-module std_private_memory_raw_storage_iterator            [system] { header "__memory/raw_storage_iterator.h" }
-module std_private_memory_shared_ptr                      [system] {
-  header "__memory/shared_ptr.h"
-  export std_private_memory_uninitialized_algorithms
-}
-module std_private_memory_swap_allocator                  [system] { header "__memory/swap_allocator.h" }
-module std_private_memory_temp_value                      [system] { header "__memory/temp_value.h" }
-module std_private_memory_temporary_buffer                [system] {
-  header "__memory/temporary_buffer.h"
-  export std_private_utility_pair
-}
-module std_private_memory_uninitialized_algorithms        [system] {
-  header "__memory/uninitialized_algorithms.h"
-  export std_private_algorithm_copy
-}
-module std_private_memory_unique_ptr                      [system] {
-  header "__memory/unique_ptr.h"
-  export std_private_type_traits_add_lvalue_reference
-  export std_private_type_traits_is_pointer
-  export std_private_type_traits_type_identity
-}
-module std_private_memory_uses_allocator                  [system] { header "__memory/uses_allocator.h" }
-module std_private_memory_uses_allocator_construction     [system] { header "__memory/uses_allocator_construction.h" }
-module std_private_memory_voidify                         [system] { header "__memory/voidify.h" }
-
-module std_private_memory_resource_memory_resource              [system] { header "__memory_resource/memory_resource.h" }
-module std_private_memory_resource_memory_resource_fwd          [system] { header "__fwd/memory_resource.h" }
-module std_private_memory_resource_monotonic_buffer_resource    [system] { header "__memory_resource/monotonic_buffer_resource.h" }
-module std_private_memory_resource_polymorphic_allocator        [system] { header "__memory_resource/polymorphic_allocator.h" }
-module std_private_memory_resource_pool_options                 [system] { header "__memory_resource/pool_options.h" }
-module std_private_memory_resource_synchronized_pool_resource   [system] {
-  header "__memory_resource/synchronized_pool_resource.h"
-  export *
-}
-module std_private_memory_resource_unsynchronized_pool_resource [system] { header "__memory_resource/unsynchronized_pool_resource.h" }
-
-module std_private_mutex_lock_guard  [system] { header "__mutex/lock_guard.h" }
-module std_private_mutex_mutex       [system] { header "__mutex/mutex.h" }
-module std_private_mutex_once_flag  [system]  { header "__mutex/once_flag.h" }
-module std_private_mutex_tag_types   [system] { header "__mutex/tag_types.h" }
-module std_private_mutex_unique_lock [system] { header "__mutex/unique_lock.h" }
-
-module std_private_numeric_accumulate               [system] { header "__numeric/accumulate.h" }
-module std_private_numeric_adjacent_difference      [system] { header "__numeric/adjacent_difference.h" }
-module std_private_numeric_exclusive_scan           [system] { header "__numeric/exclusive_scan.h" }
-module std_private_numeric_gcd_lcm                  [system] { header "__numeric/gcd_lcm.h" }
-module std_private_numeric_inclusive_scan           [system] { header "__numeric/inclusive_scan.h" }
-module std_private_numeric_inner_product            [system] { header "__numeric/inner_product.h" }
-module std_private_numeric_iota                     [system] { header "__numeric/iota.h" }
-module std_private_numeric_midpoint                 [system] { header "__numeric/midpoint.h" }
-module std_private_numeric_partial_sum              [system] { header "__numeric/partial_sum.h" }
-module std_private_numeric_pstl                     [system] {
-  header "__numeric/pstl.h"
-  export *
-}
-module std_private_numeric_reduce                   [system] { header "__numeric/reduce.h" }
-module std_private_numeric_saturation_arithmetic    [system] { header "__numeric/saturation_arithmetic.h" }
-module std_private_numeric_transform_exclusive_scan [system] { header "__numeric/transform_exclusive_scan.h" }
-module std_private_numeric_transform_inclusive_scan [system] { header "__numeric/transform_inclusive_scan.h" }
-module std_private_numeric_transform_reduce         [system] { header "__numeric/transform_reduce.h" }
-
-module std_private_pstl [system] {
-  header "__pstl/backend.h"
-  header "__pstl/backend_fwd.h"
-  header "__pstl/backends/default.h"
-  header "__pstl/backends/libdispatch.h"
-  header "__pstl/backends/serial.h"
-  header "__pstl/backends/std_thread.h"
-  header "__pstl/cpu_algos/any_of.h"
-  header "__pstl/cpu_algos/cpu_traits.h"
-  header "__pstl/cpu_algos/fill.h"
-  header "__pstl/cpu_algos/find_if.h"
-  header "__pstl/cpu_algos/for_each.h"
-  header "__pstl/cpu_algos/merge.h"
-  header "__pstl/cpu_algos/stable_sort.h"
-  header "__pstl/cpu_algos/transform.h"
-  header "__pstl/cpu_algos/transform_reduce.h"
-  header "__pstl/dispatch.h"
-  header "__pstl/handle_exception.h"
-}
+  // Implementation detail headers that are private to libc++. These modules
+  // must not be directly imported.
+  module debug_utils {
+    module randomize_range              { header "__debug_utils/randomize_range.h" }
+    module sanitizers                   { header "__debug_utils/sanitizers.h" }
+    module strict_weak_ordering_check   { header "__debug_utils/strict_weak_ordering_check.h" }
+  }
 
-module std_private_queue_fwd [system] { header "__fwd/queue.h" }
+  module get_fwd {
+    header "__fwd/get.h"
+    export std_core.fwd.pair
+    export std_core.fwd.tuple
+    export std.array.fwd
+    export std.complex.fwd
+    export std.ranges.subrange_fwd
+    export std.variant.fwd
+  }
 
-module std_private_ostream_basic_ostream [system] {
-  header "__ostream/basic_ostream.h"
-  export std_streambuf
-}
-module std_private_ostream_print         [system] {
-  header "__ostream/print.h"
-  export std_print
-}
+  module pstl {
+    module backend_fwd {
+      header "__pstl/backend_fwd.h"
+    }
+    module backend {
+      header "__pstl/backend.h"
+      export * // need to export everything from whatever backend is currently configured
+    }
+    module backends {
+      module default {
+        header "__pstl/backends/default.h"
+      }
+      module libdispatch {
+        header "__pstl/backends/libdispatch.h"
+        export std.pstl.cpu_algos
+      }
+      module serial {
+        header "__pstl/backends/serial.h"
+      }
+      module std_thread {
+        header "__pstl/backends/std_thread.h"
+        export std.pstl.cpu_algos
+      }
+    }
+    module cpu_algos {
+      module any_of           { header "__pstl/cpu_algos/any_of.h" }
+      module cpu_traits       { header "__pstl/cpu_algos/cpu_traits.h" }
+      module fill             { header "__pstl/cpu_algos/fill.h" }
+      module find_if          { header "__pstl/cpu_algos/find_if.h" }
+      module for_each         { header "__pstl/cpu_algos/for_each.h" }
+      module merge            { header "__pstl/cpu_algos/merge.h" }
+      module stable_sort      { header "__pstl/cpu_algos/stable_sort.h" }
+      module transform        { header "__pstl/cpu_algos/transform.h" }
+      module transform_reduce { header "__pstl/cpu_algos/transform_reduce.h" }
+    }
+    module dispatch           { header "__pstl/dispatch.h" }
+    module handle_exception   { header "__pstl/handle_exception.h" }
+  }
+
+  // Miscellaneous modules for top-level headers
+  module bit_reference_fwd {
+    header "__fwd/bit_reference.h"
+  }
+  module bit_reference {
+    header "__bit_reference"
+    export std.bit_reference_fwd
+  }
+  module hash_table           { header "__hash_table" }
+  module node_handle          { header "__node_handle" }
+  module split_buffer         { header "__split_buffer" }
+  module tree                 { header "__tree" }
+  module std_mbstate_t {
+    header "__std_mbstate_t.h"
+    export *
+  }
+  module verbose_abort {
+    header "__verbose_abort"
+  }
+  module internal_assert {
+    header "__assert"
+    export *
+  }
+
+  module undef_macros {
+    textual header "__undef_macros"
+  }
+
+  // This module needs to appear after __tree to work around issues with modules in Objective-C++ mode.
+  module coroutine {
+    module coroutine_handle         { header "__coroutine/coroutine_handle.h" }
+    module coroutine_traits         { header "__coroutine/coroutine_traits.h" }
+    module noop_coroutine_handle    { header "__coroutine/noop_coroutine_handle.h" }
+    module trivial_awaitables       { header "__coroutine/trivial_awaitables.h" }
 
-module std_private_random_bernoulli_distribution          [system] { header "__random/bernoulli_distribution.h" }
-module std_private_random_binomial_distribution           [system] { header "__random/binomial_distribution.h" }
-module std_private_random_cauchy_distribution             [system] { header "__random/cauchy_distribution.h" }
-module std_private_random_chi_squared_distribution        [system] { header "__random/chi_squared_distribution.h" }
-module std_private_random_clamp_to_integral               [system] { header "__random/clamp_to_integral.h" }
-module std_private_random_default_random_engine           [system] { header "__random/default_random_engine.h" }
-module std_private_random_discard_block_engine            [system] { header "__random/discard_block_engine.h" }
-module std_private_random_discrete_distribution           [system] {
-  header "__random/discrete_distribution.h"
+    header "coroutine"
+    export *
+  }
+} // module std
+
+// C compatibility headers
+//
+// These modules need to be their own top-level modules because they depend on the system-provided
+// headers (via include_next), which are then free to include other C headers provided by libc++.
+// If we group these headers in a single module, we would end up with circular dependencies.
+module std_complex_h [system] {
+  header "complex.h"
   export *
 }
-module std_private_random_exponential_distribution        [system] { header "__random/exponential_distribution.h" }
-module std_private_random_extreme_value_distribution      [system] { header "__random/extreme_value_distribution.h" }
-module std_private_random_fisher_f_distribution           [system] { header "__random/fisher_f_distribution.h" }
-module std_private_random_gamma_distribution              [system] { header "__random/gamma_distribution.h" }
-module std_private_random_generate_canonical              [system] { header "__random/generate_canonical.h" }
-module std_private_random_geometric_distribution          [system] { header "__random/geometric_distribution.h" }
-module std_private_random_independent_bits_engine         [system] { header "__random/independent_bits_engine.h" }
-module std_private_random_is_seed_sequence                [system] { header "__random/is_seed_sequence.h" }
-module std_private_random_is_valid                        [system] { header "__random/is_valid.h" }
-module std_private_random_knuth_b                         [system] { header "__random/knuth_b.h" }
-module std_private_random_linear_congruential_engine      [system] { header "__random/linear_congruential_engine.h" }
-module std_private_random_log2                            [system] { header "__random/log2.h" }
-module std_private_random_lognormal_distribution          [system] { header "__random/lognormal_distribution.h" }
-module std_private_random_mersenne_twister_engine         [system] { header "__random/mersenne_twister_engine.h" }
-module std_private_random_negative_binomial_distribution  [system] { header "__random/negative_binomial_distribution.h" }
-module std_private_random_normal_distribution             [system] { header "__random/normal_distribution.h" }
-module std_private_random_piecewise_constant_distribution [system] {
-  header "__random/piecewise_constant_distribution.h"
+module std_ctype_h [system] {
+  header "ctype.h"
   export *
 }
-module std_private_random_piecewise_linear_distribution   [system] {
-  header "__random/piecewise_linear_distribution.h"
+module std_errno_h [system] {
+  header "errno.h"
   export *
 }
-module std_private_random_poisson_distribution            [system] { header "__random/poisson_distribution.h" }
-module std_private_random_random_device                   [system] {
-  header "__random/random_device.h"
+module std_fenv_h [system] {
+  header "fenv.h"
   export *
 }
-module std_private_random_ranlux                          [system] { header "__random/ranlux.h" }
-module std_private_random_seed_seq                        [system] {
-  header "__random/seed_seq.h"
+module std_float_h [system] {
+  header "float.h"
   export *
 }
-module std_private_random_shuffle_order_engine            [system] { header "__random/shuffle_order_engine.h" }
-module std_private_random_student_t_distribution          [system] { header "__random/student_t_distribution.h" }
-module std_private_random_subtract_with_carry_engine      [system] { header "__random/subtract_with_carry_engine.h" }
-module std_private_random_uniform_int_distribution        [system] { header "__random/uniform_int_distribution.h" }
-module std_private_random_uniform_random_bit_generator    [system] { header "__random/uniform_random_bit_generator.h" }
-module std_private_random_uniform_real_distribution       [system] { header "__random/uniform_real_distribution.h" }
-module std_private_random_weibull_distribution            [system] { header "__random/weibull_distribution.h" }
-
-module std_private_ranges_access                     [system] { header "__ranges/access.h" }
-module std_private_ranges_all                        [system] {
-  header "__ranges/all.h"
-  export std_private_functional_compose
-  export std_private_functional_perfect_forward
-  export std_private_ranges_owning_view
-}
-module std_private_ranges_as_rvalue_view             [system] { header "__ranges/as_rvalue_view.h" }
-module std_private_ranges_chunk_by_view              [system] { header "__ranges/chunk_by_view.h" }
-module std_private_ranges_common_view                [system] { header "__ranges/common_view.h" }
-module std_private_ranges_concepts                   [system] {
-  header "__ranges/concepts.h"
-  export std_private_iterator_concepts
-}
-module std_private_ranges_container_compatible_range [system] { header "__ranges/container_compatible_range.h" }
-module std_private_ranges_counted                    [system] {
-  header "__ranges/counted.h"
-  export std_span
-}
-module std_private_ranges_dangling                   [system] { header "__ranges/dangling.h" }
-module std_private_ranges_data                       [system] { header "__ranges/data.h" }
-module std_private_ranges_drop_view                  [system] { header "__ranges/drop_view.h" }
-module std_private_ranges_drop_while_view            [system] { header "__ranges/drop_while_view.h" }
-module std_private_ranges_elements_view              [system] { header "__ranges/elements_view.h" }
-module std_private_ranges_empty                      [system] { header "__ranges/empty.h" }
-module std_private_ranges_empty_view                 [system] { header "__ranges/empty_view.h" }
-module std_private_ranges_enable_borrowed_range      [system] { header "__ranges/enable_borrowed_range.h" }
-module std_private_ranges_enable_view                [system] { header "__ranges/enable_view.h" }
-module std_private_ranges_filter_view                [system] {
-  header "__ranges/filter_view.h"
-  export std_private_ranges_range_adaptor
-}
-module std_private_ranges_from_range                 [system] { header "__ranges/from_range.h" }
-module std_private_ranges_iota_view                  [system] { header "__ranges/iota_view.h" }
-module std_private_ranges_istream_view               [system] {
-  header "__ranges/istream_view.h"
-}
-module std_private_ranges_join_view                  [system] {
-  header "__ranges/join_view.h"
-  export std_private_iterator_iterator_with_data
-  export std_private_iterator_segmented_iterator
-}
-module std_private_ranges_lazy_split_view            [system] {
-  header "__ranges/lazy_split_view.h"
-  export std_private_ranges_non_propagating_cache
+module std_inttypes_h [system] {
+  header "inttypes.h"
+  export *
 }
-module std_private_ranges_movable_box                [system] { header "__ranges/movable_box.h" }
-module std_private_ranges_non_propagating_cache      [system] { header "__ranges/non_propagating_cache.h" }
-module std_private_ranges_owning_view                [system] { header "__ranges/owning_view.h" }
-module std_private_ranges_range_adaptor              [system] { header "__ranges/range_adaptor.h" }
-module std_private_ranges_rbegin                     [system] { header "__ranges/rbegin.h" }
-module std_private_ranges_ref_view                   [system] { header "__ranges/ref_view.h" }
-module std_private_ranges_rend                       [system] { header "__ranges/rend.h" }
-module std_private_ranges_repeat_view                [system] { header "__ranges/repeat_view.h" }
-module std_private_ranges_reverse_view               [system] { header "__ranges/reverse_view.h" }
-module std_private_ranges_single_view                [system] { header "__ranges/single_view.h" }
-module std_private_ranges_size                       [system] {
-  header "__ranges/size.h"
-  export std_private_type_traits_make_unsigned
+module std_locale_h [system] {
+  header "locale.h"
+  export *
 }
-module std_private_ranges_split_view                 [system] { header "__ranges/split_view.h" }
-module std_private_ranges_subrange                   [system] {
-  header "__ranges/subrange.h"
-  export std_private_ranges_subrange_fwd
+module std_math_h [system] {
+  header "math.h"
+  export *
 }
-module std_private_ranges_subrange_fwd               [system] {
-  header "__fwd/subrange.h"
-  export std_private_iterator_concepts
+module std_stdatomic_h [system] {
+  header "stdatomic.h"
+  export *
 }
-module std_private_ranges_take_view                  [system] { header "__ranges/take_view.h" }
-module std_private_ranges_take_while_view            [system] { header "__ranges/take_while_view.h" }
-module std_private_ranges_to                         [system] { header "__ranges/to.h" }
-module std_private_ranges_transform_view             [system] {
-  header "__ranges/transform_view.h"
-  export std_private_functional_bind_back
-  export std_private_functional_perfect_forward
-  export std_private_ranges_movable_box
+module std_stdbool_h [system] {
+  // <stdbool.h>'s __bool_true_false_are_defined macro requires textual inclusion.
+  textual header "stdbool.h"
 }
-module std_private_ranges_view_interface             [system] { header "__ranges/view_interface.h" }
-module std_private_ranges_views                      [system] { header "__ranges/views.h" }
-module std_private_ranges_zip_view                   [system] {
-  header "__ranges/zip_view.h"
-  export std_private_utility_pair
+module std_stddef_h [system] {
+  // <stddef.h>'s __need_* macros require textual inclusion.
+  textual header "stddef.h"
 }
-
-module std_private_span_span_fwd [system] { header "__fwd/span.h" }
-
-module std_private_stack_fwd [system] { header "__fwd/stack.h" }
-
-module std_private_string_char_traits           [system] {
-  header "__string/char_traits.h"
+module std_stdint_h [system] {
+  header "stdint.h"
   export *
 }
-module std_private_string_constexpr_c_functions [system] {
-  header "__string/constexpr_c_functions.h"
-  export std_private_type_traits_is_equality_comparable
-}
-module std_private_string_extern_template_lists [system] { header "__string/extern_template_lists.h" }
-module std_private_string_string_fwd            [system] { header "__fwd/string.h" }
-
-module std_private_string_view_string_view_fwd [system] { header "__fwd/string_view.h" }
-
-module std_private_system_error_errc            [system] { header "__system_error/errc.h" }
-module std_private_system_error_error_category  [system] { header "__system_error/error_category.h" }
-module std_private_system_error_error_code      [system] {
-  header "__system_error/error_code.h"
-  export std_private_functional_hash
-  export std_private_functional_unary_function
+module std_stdio_h [system] {
+  // <stdio.h>'s __need_* macros require textual inclusion.
+  textual header "stdio.h"
 }
-module std_private_system_error_error_condition [system] {
-  header "__system_error/error_condition.h"
-  export std_private_functional_hash
-  export std_private_functional_unary_function
+module std_stdlib_h [system] {
+  // <stdlib.h>'s __need_* macros require textual inclusion.
+  textual header "stdlib.h"
 }
-module std_private_system_error_system_error    [system] { header "__system_error/system_error.h" }
-
-module std_private_thread_formatter            [system] { header "__thread/formatter.h" }
-module std_private_thread_id                   [system] { header "__thread/id.h" }
-module std_private_thread_jthread              [system] {
-  header "__thread/jthread.h"
+module std_string_h [system] {
+  header "string.h"
   export *
 }
-module std_private_thread_poll_with_backoff    [system] { header "__thread/poll_with_backoff.h" }
-module std_private_thread_support              [system] {
-  header "__thread/support.h"
+module std_tgmath_h [system] {
+  header "tgmath.h"
   export *
 }
-module std_private_thread_support_c11          [system] { textual header "__thread/support/c11.h" }
-module std_private_thread_support_external     [system] { textual header "__thread/support/external.h" }
-module std_private_thread_support_pthread      [system] { textual header "__thread/support/pthread.h" }
-module std_private_thread_support_windows      [system] { textual header "__thread/support/windows.h" }
-module std_private_thread_this_thread          [system] { header "__thread/this_thread.h" }
-module std_private_thread_thread               [system] {
-  header "__thread/thread.h"
+module std_uchar_h [system] {
+  header "uchar.h"
   export *
 }
-module std_private_thread_timed_backoff_policy [system] { header "__thread/timed_backoff_policy.h" }
-
-module std_private_tuple_find_index             [system] { header "__tuple/find_index.h" }
-module std_private_tuple_ignore                 [system] { header "__tuple/ignore.h" }
-module std_private_tuple_make_tuple_types       [system] { header "__tuple/make_tuple_types.h" }
-module std_private_tuple_tuple_like_no_subrange [system] {
-  header "__tuple/tuple_like_no_subrange.h"
-}
-module std_private_tuple_sfinae_helpers         [system] { header "__tuple/sfinae_helpers.h" }
-module std_private_tuple_tuple_element          [system] { header "__tuple/tuple_element.h" }
-module std_private_tuple_tuple_fwd              [system] { header "__fwd/tuple.h" }
-module std_private_get_fwd                      [system] {
-  header "__fwd/get.h"
-  export std_private_array_array_fwd
-  export std_private_complex_complex_fwd
-  export std_private_ranges_subrange_fwd
-  export std_private_tuple_tuple_fwd
-  export std_private_utility_pair_fwd
-  export std_private_variant_fwd
+module std_wchar_h [system] {
+  // <wchar.h>'s __need_* macros require textual inclusion.
+  textual header "wchar.h"
 }
-module std_private_tuple_tuple_indices          [system] { header "__tuple/tuple_indices.h" }
-module std_private_tuple_tuple_like             [system] {
-  header "__tuple/tuple_like.h"
+module std_wctype_h [system] {
+  header "wctype.h"
   export *
 }
-module std_private_tuple_tuple_like_ext         [system] { header "__tuple/tuple_like_ext.h" }
-module std_private_tuple_tuple_size             [system] {
-  header "__tuple/tuple_size.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_tuple_tuple_types            [system] { header "__tuple/tuple_types.h" }
 
-module std_private_type_traits_add_const                                 [system] { header "__type_traits/add_const.h" }
-module std_private_type_traits_add_cv                                    [system] { header "__type_traits/add_cv.h" }
-module std_private_type_traits_add_lvalue_reference                      [system] {
-  header "__type_traits/add_lvalue_reference.h"
-  export std_private_type_traits_is_referenceable
-}
-module std_private_type_traits_add_pointer                               [system] { header "__type_traits/add_pointer.h" }
-module std_private_type_traits_add_rvalue_reference                      [system] { header "__type_traits/add_rvalue_reference.h" }
-module std_private_type_traits_add_volatile                              [system] { header "__type_traits/add_volatile.h" }
-module std_private_type_traits_aligned_storage                           [system] { header "__type_traits/aligned_storage.h" }
-module std_private_type_traits_aligned_union                             [system] { header "__type_traits/aligned_union.h" }
-module std_private_type_traits_alignment_of                              [system] { header "__type_traits/alignment_of.h" }
-module std_private_type_traits_can_extract_key                           [system] { header "__type_traits/can_extract_key.h" }
-module std_private_type_traits_common_reference                          [system] {
-  header "__type_traits/common_reference.h"
-  export std_private_type_traits_remove_cvref
-}
-module std_private_type_traits_common_type                               [system] {
-  header "__type_traits/common_type.h"
-  export std_private_utility_declval
-}
-module std_private_type_traits_conditional                               [system] { header "__type_traits/conditional.h" }
-module std_private_type_traits_conjunction                               [system] { header "__type_traits/conjunction.h" }
-module std_private_type_traits_copy_cv                                   [system] { header "__type_traits/copy_cv.h" }
-module std_private_type_traits_copy_cvref                                [system] { header "__type_traits/copy_cvref.h" }
-module std_private_type_traits_datasizeof                                [system] { header "__type_traits/datasizeof.h" }
-module std_private_type_traits_decay                                     [system] {
-  header "__type_traits/decay.h"
-  export std_private_type_traits_add_pointer
-}
-module std_private_type_traits_dependent_type                            [system] { header "__type_traits/dependent_type.h" }
-module std_private_type_traits_desugars_to                               [system] { header "__type_traits/desugars_to.h" }
-module std_private_type_traits_disjunction                               [system] { header "__type_traits/disjunction.h" }
-module std_private_type_traits_enable_if                                 [system] { header "__type_traits/enable_if.h" }
-module std_private_type_traits_extent                                    [system] { header "__type_traits/extent.h" }
-module std_private_type_traits_has_unique_object_representation          [system] { header "__type_traits/has_unique_object_representation.h" }
-module std_private_type_traits_has_virtual_destructor                    [system] { header "__type_traits/has_virtual_destructor.h" }
-module std_private_type_traits_integral_constant                         [system] { header "__type_traits/integral_constant.h" }
-module std_private_type_traits_invoke                                    [system] {
-  header "__type_traits/invoke.h"
-  export std_private_type_traits_conditional
-  export std_private_type_traits_decay
-  export std_private_type_traits_decay
-  export std_private_type_traits_enable_if
-  export std_private_type_traits_is_base_of
-  export std_private_type_traits_is_core_convertible
-  export std_private_type_traits_is_reference_wrapper
-  export std_private_type_traits_is_same
-  export std_private_type_traits_is_void
-  export std_private_type_traits_nat
-  export std_private_type_traits_remove_cv
-}
-module std_private_type_traits_is_abstract                               [system] { header "__type_traits/is_abstract.h" }
-module std_private_type_traits_is_aggregate                              [system] { header "__type_traits/is_aggregate.h" }
-module std_private_type_traits_is_allocator                              [system] { header "__type_traits/is_allocator.h" }
-module std_private_type_traits_is_always_bitcastable                     [system] { header "__type_traits/is_always_bitcastable.h" }
-module std_private_type_traits_is_arithmetic                             [system] {
-  header "__type_traits/is_arithmetic.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_type_traits_is_array                                  [system] {
-  header "__type_traits/is_array.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_type_traits_is_assignable                             [system] { header "__type_traits/is_assignable.h" }
-module std_private_type_traits_is_base_of                                [system] { header "__type_traits/is_base_of.h" }
-module std_private_type_traits_is_bounded_array                          [system] { header "__type_traits/is_bounded_array.h" }
-module std_private_type_traits_is_callable                               [system] {
-  header "__type_traits/is_callable.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_type_traits_is_char_like_type                         [system] { header "__type_traits/is_char_like_type.h" }
-module std_private_type_traits_is_class                                  [system] { header "__type_traits/is_class.h" }
-module std_private_type_traits_is_compound                               [system] { header "__type_traits/is_compound.h" }
-module std_private_type_traits_is_const                                  [system] { header "__type_traits/is_const.h" }
-module std_private_type_traits_is_constant_evaluated                     [system] { header "__type_traits/is_constant_evaluated.h" }
-module std_private_type_traits_is_constructible                          [system] { header "__type_traits/is_constructible.h" }
-module std_private_type_traits_is_convertible                            [system] {
-  header "__type_traits/is_convertible.h"
-  export std_private_type_traits_is_array
-}
-module std_private_type_traits_is_copy_assignable                        [system] { header "__type_traits/is_copy_assignable.h" }
-module std_private_type_traits_is_copy_constructible                     [system] { header "__type_traits/is_copy_constructible.h" }
-module std_private_type_traits_is_core_convertible                       [system] {
-  header "__type_traits/is_core_convertible.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_type_traits_is_destructible                           [system] { header "__type_traits/is_destructible.h" }
-module std_private_type_traits_is_empty                                  [system] { header "__type_traits/is_empty.h" }
-module std_private_type_traits_is_enum                                   [system] {
-  header "__type_traits/is_enum.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_type_traits_is_equality_comparable                    [system] {
-  header "__type_traits/is_equality_comparable.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_type_traits_is_execution_policy                       [system] {
-  header "__type_traits/is_execution_policy.h"
-  export std_private_type_traits_remove_cvref
-}
-module std_private_type_traits_is_final                                  [system] { header "__type_traits/is_final.h" }
-module std_private_type_traits_is_floating_point                         [system] { header "__type_traits/is_floating_point.h" }
-module std_private_type_traits_is_function                               [system] { header "__type_traits/is_function.h" }
-module std_private_type_traits_is_fundamental                            [system] { header "__type_traits/is_fundamental.h" }
-module std_private_type_traits_is_implicitly_default_constructible       [system] {
-  header "__type_traits/is_implicitly_default_constructible.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_type_traits_is_integral                               [system] {
-  header "__type_traits/is_integral.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_type_traits_is_literal_type                           [system] { header "__type_traits/is_literal_type.h" }
-module std_private_type_traits_is_member_pointer                         [system] { header "__type_traits/is_member_pointer.h" }
-module std_private_type_traits_is_nothrow_assignable                     [system] { header "__type_traits/is_nothrow_assignable.h" }
-module std_private_type_traits_is_nothrow_constructible                  [system] {
-  header "__type_traits/is_nothrow_constructible.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_type_traits_is_nothrow_convertible                    [system] { header "__type_traits/is_nothrow_convertible.h" }
-module std_private_type_traits_is_nothrow_destructible                   [system] {
-  header "__type_traits/is_nothrow_destructible.h"
-  export std_private_type_traits_is_destructible
-}
-module std_private_type_traits_is_null_pointer                           [system] {
-  header "__type_traits/is_null_pointer.h"
-  export std_cstddef
-}
-module std_private_type_traits_is_object                                 [system] {
-  header "__type_traits/is_object.h"
-  export std_private_type_traits_is_scalar
-}
-module std_private_type_traits_is_pod                                    [system] { header "__type_traits/is_pod.h" }
-module std_private_type_traits_is_pointer                                [system] { header "__type_traits/is_pointer.h" }
-module std_private_type_traits_is_polymorphic                            [system] { header "__type_traits/is_polymorphic.h" }
-module std_private_type_traits_is_primary_template                       [system] {
-  header "__type_traits/is_primary_template.h"
-  export std_private_type_traits_enable_if
-}
-module std_private_type_traits_is_reference                              [system] {
-  header "__type_traits/is_reference.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_type_traits_is_reference_wrapper                      [system] { header "__type_traits/is_reference_wrapper.h" }
-module std_private_type_traits_is_referenceable                          [system] { header "__type_traits/is_referenceable.h" }
-module std_private_type_traits_is_same                                   [system] {
-  header "__type_traits/is_same.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_type_traits_is_scalar                                 [system] {
-  header "__type_traits/is_scalar.h"
-  export std_private_type_traits_is_null_pointer
-}
-module std_private_type_traits_is_signed                                 [system] { header "__type_traits/is_signed.h" }
-module std_private_type_traits_is_signed_integer                         [system] { header "__type_traits/is_signed_integer.h" }
-module std_private_type_traits_is_specialization                         [system] { header "__type_traits/is_specialization.h" }
-module std_private_type_traits_is_standard_layout                        [system] { header "__type_traits/is_standard_layout.h" }
-module std_private_type_traits_is_swappable                              [system] {
-  header "__type_traits/is_swappable.h"
-  export std_private_type_traits_is_move_constructible
-}
-module std_private_type_traits_is_trivial                                [system] { header "__type_traits/is_trivial.h" }
-module std_private_type_traits_is_trivially_assignable                   [system] { header "__type_traits/is_trivially_assignable.h" }
-module std_private_type_traits_is_trivially_constructible                [system] { header "__type_traits/is_trivially_constructible.h" }
-module std_private_type_traits_is_trivially_copyable                     [system] {
-  header "__type_traits/is_trivially_copyable.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_type_traits_is_trivially_destructible                 [system] { header "__type_traits/is_trivially_destructible.h" }
-module std_private_type_traits_is_trivially_lexicographically_comparable [system] { header "__type_traits/is_trivially_lexicographically_comparable.h" }
-module std_private_type_traits_is_trivially_relocatable                  [system] { header "__type_traits/is_trivially_relocatable.h" }
-module std_private_type_traits_is_unbounded_array                        [system] { header "__type_traits/is_unbounded_array.h" }
-module std_private_type_traits_is_union                                  [system] { header "__type_traits/is_union.h" }
-module std_private_type_traits_is_unsigned                               [system] { header "__type_traits/is_unsigned.h" }
-module std_private_type_traits_is_unsigned_integer                       [system] { header "__type_traits/is_unsigned_integer.h" }
-module std_private_type_traits_is_valid_expansion                        [system] { header "__type_traits/is_valid_expansion.h" }
-module std_private_type_traits_is_void                                   [system] {
-  header "__type_traits/is_void.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_type_traits_is_volatile                               [system] { header "__type_traits/is_volatile.h" }
-module std_private_type_traits_lazy                                      [system] { header "__type_traits/lazy.h" }
-module std_private_type_traits_make_32_64_or_128_bit                     [system] { header "__type_traits/make_32_64_or_128_bit.h" }
-module std_private_type_traits_make_const_lvalue_ref                     [system] { header "__type_traits/make_const_lvalue_ref.h" }
-module std_private_type_traits_make_signed                               [system] { header "__type_traits/make_signed.h" }
-module std_private_type_traits_make_unsigned                             [system] {
-  header "__type_traits/make_unsigned.h"
-  export std_private_type_traits_is_unsigned
-}
-module std_private_type_traits_maybe_const                               [system] { header "__type_traits/maybe_const.h" }
-module std_private_type_traits_nat                                       [system] { header "__type_traits/nat.h" }
-module std_private_type_traits_negation                                  [system] { header "__type_traits/negation.h" }
-module std_private_type_traits_promote                                   [system] { header "__type_traits/promote.h" }
-module std_private_type_traits_rank                                      [system] { header "__type_traits/rank.h" }
-module std_private_type_traits_remove_all_extents                        [system] { header "__type_traits/remove_all_extents.h" }
-module std_private_type_traits_remove_const                              [system] { header "__type_traits/remove_const.h" }
-module std_private_type_traits_remove_const_ref                          [system] { header "__type_traits/remove_const_ref.h" }
-module std_private_type_traits_remove_cv                                 [system] {
-  header "__type_traits/remove_cv.h"
-  export std_private_type_traits_remove_const
-  export std_private_type_traits_remove_volatile
-}
-module std_private_type_traits_remove_cvref                              [system] { header "__type_traits/remove_cvref.h" }
-module std_private_type_traits_remove_extent                             [system] { header "__type_traits/remove_extent.h" }
-module std_private_type_traits_remove_pointer                            [system] { header "__type_traits/remove_pointer.h" }
-module std_private_type_traits_remove_reference                          [system] { header "__type_traits/remove_reference.h" }
-module std_private_type_traits_remove_volatile                           [system] { header "__type_traits/remove_volatile.h" }
-module std_private_type_traits_result_of                                 [system] { header "__type_traits/result_of.h" }
-module std_private_type_traits_strip_signature                           [system] { header "__type_traits/strip_signature.h" }
-module std_private_type_traits_type_identity                             [system] { header "__type_traits/type_identity.h" }
-module std_private_type_traits_type_list                                 [system] { header "__type_traits/type_list.h" }
-module std_private_type_traits_underlying_type                           [system] {
-  header "__type_traits/underlying_type.h"
-  export std_private_type_traits_is_enum
-}
-module std_private_type_traits_unwrap_ref                                [system] { header "__type_traits/unwrap_ref.h" }
-module std_private_type_traits_void_t                                    [system] { header "__type_traits/void_t.h" }
-
-module std_private_utility_as_const               [system] { header "__utility/as_const.h" }
-module std_private_utility_as_lvalue              [system] { header "__utility/as_lvalue.h" }
-module std_private_utility_auto_cast              [system] {
-  header "__utility/auto_cast.h"
-  export std_private_type_traits_decay
-}
-module std_private_utility_cmp                    [system] {
-  header "__utility/cmp.h"
-  export std_private_type_traits_make_unsigned
-}
-module std_private_utility_convert_to_integral    [system] { header "__utility/convert_to_integral.h" }
-module std_private_utility_declval                [system] { header "__utility/declval.h" }
-module std_private_utility_empty                  [system] { header "__utility/empty.h" }
-module std_private_utility_exception_guard        [system] { header "__utility/exception_guard.h" }
-module std_private_utility_exchange               [system] { header "__utility/exchange.h" }
-module std_private_utility_forward                [system] { header "__utility/forward.h" }
-module std_private_utility_forward_like           [system] { header "__utility/forward_like.h" }
-module std_private_utility_in_place               [system] {
-  header "__utility/in_place.h"
-  export std_private_type_traits_integral_constant
-}
-module std_private_utility_integer_sequence       [system] { header "__utility/integer_sequence.h" }
-module std_private_utility_is_pointer_in_range    [system] { header "__utility/is_pointer_in_range.h" }
-module std_private_utility_is_valid_range         [system] { header "__utility/is_valid_range.h" }
-module std_private_utility_move                   [system] {
-  header "__utility/move.h"
-  export std_private_type_traits_is_copy_constructible
-  export std_private_type_traits_is_nothrow_move_constructible
-  export std_private_type_traits_remove_reference
-}
-module std_private_utility_no_destroy             [system] { header "__utility/no_destroy.h" }
-module std_private_utility_pair                   [system] {
-  header "__utility/pair.h"
-  export std_private_ranges_subrange_fwd
-  export std_private_tuple_pair_like
-  export std_private_type_traits_is_assignable
-  export std_private_type_traits_is_constructible
-  export std_private_type_traits_is_convertible
-  export std_private_type_traits_is_copy_assignable
-  export std_private_type_traits_is_move_assignable
-  export std_private_type_traits_is_nothrow_copy_constructible
-  export std_private_type_traits_is_nothrow_default_constructible
-  export std_private_type_traits_is_nothrow_move_assignable
-  export std_private_utility_pair_fwd
-}
-module std_private_utility_pair_fwd                [system] { header "__fwd/pair.h" }
-module std_private_utility_piecewise_construct     [system] { header "__utility/piecewise_construct.h" }
-module std_private_utility_priority_tag            [system] { header "__utility/priority_tag.h" }
-module std_private_utility_private_constructor_tag [system] { header "__utility/private_constructor_tag.h" }
-module std_private_utility_rel_ops                 [system] { header "__utility/rel_ops.h" }
-module std_private_utility_small_buffer            [system] { header "__utility/small_buffer.h" }
-module std_private_utility_swap                    [system] {
-  header "__utility/swap.h"
-  export std_private_type_traits_is_swappable
+// This header is used by other C compatibility headers so it needs to be in its own module.
+module std_private_mbstate_t [system] {
+  header "__mbstate_t.h"
+  export *
 }
-module std_private_utility_to_underlying           [system] { header "__utility/to_underlying.h" }
-module std_private_utility_unreachable             [system] { header "__utility/unreachable.h" }
-
-module std_private_variant_monostate               [system] { header "__variant/monostate.h" }
-module std_private_variant_fwd                     [system] { header "__fwd/variant.h" }
-
-module std_private_vector_fwd                      [system] { header "__fwd/vector.h" }
diff --git a/libcxx/test/libcxx/clang_modules_include.gen.py b/libcxx/test/libcxx/clang_modules_include.gen.py
index f0421b2e738133..ab3f5cfb73b00a 100644
--- a/libcxx/test/libcxx/clang_modules_include.gen.py
+++ b/libcxx/test/libcxx/clang_modules_include.gen.py
@@ -42,8 +42,9 @@
 #include <{header}>
 """)
 
-print(f"""\
-//--- __std_clang_module.compile.pass.mm
+print(
+    f"""\
+//--- import_std.compile.pass.mm
 // RUN: %{{cxx}} %s %{{flags}} %{{compile_flags}} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only
 
 // REQUIRES: clang-modules-build
@@ -63,4 +64,5 @@
 
 @import std;
 
-""")
+"""
+)
diff --git a/libcxx/test/std/experimental/utilities/utility/utility.synop/includes.pass.cpp b/libcxx/test/std/experimental/utilities/utility/utility.synop/includes.pass.cpp
deleted file mode 100644
index 7e27adfab1971e..00000000000000
--- a/libcxx/test/std/experimental/utilities/utility/utility.synop/includes.pass.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// <experimental/utility>
-
-#include <experimental/utility>
-
-#include "test_macros.h"
-
-#ifndef _LIBCPP_UTILITY
-#   error "<experimental/utility> must include <utility>"
-#endif
-
-int main(int, char**)
-{
-
-  return 0;
-}
diff --git a/libcxx/utils/CMakeLists.txt b/libcxx/utils/CMakeLists.txt
index 1116531fa06539..027e485fc15ef1 100644
--- a/libcxx/utils/CMakeLists.txt
+++ b/libcxx/utils/CMakeLists.txt
@@ -2,10 +2,6 @@ add_custom_target(libcxx-generate-feature-test-macros
     COMMAND "${Python3_EXECUTABLE}" "${LIBCXX_SOURCE_DIR}/utils/generate_feature_test_macro_components.py"
     COMMENT "Generate the <version> header and tests for feature test macros.")
 
-add_custom_target(libcxx-generate-std-clang-module-header
-  COMMAND "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/generate_std_clang_module_header.py"
-  COMMENT "Generate the <__std_clang_module> header")
-
 add_custom_target(libcxx-generate-std-cppm-in-file
   COMMAND
         "${Python3_EXECUTABLE}"
@@ -57,7 +53,6 @@ add_custom_target(libcxx-indic-conjunct-break-table
 
 add_custom_target(libcxx-generate-files
     DEPENDS libcxx-generate-feature-test-macros
-            libcxx-generate-std-clang-module-header
             libcxx-generate-std-cppm-in-file
             libcxx-generate-std-compat-cppm-in-file
             libcxx-generate-extended-grapheme-cluster-tables
diff --git a/libcxx/utils/generate_std_clang_module_header.py b/libcxx/utils/generate_std_clang_module_header.py
deleted file mode 100644
index 33c9acf3953796..00000000000000
--- a/libcxx/utils/generate_std_clang_module_header.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# ===----------------------------------------------------------------------===##
-#
-# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-# See https://llvm.org/LICENSE.txt for license information.
-# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-#
-# ===----------------------------------------------------------------------===##
-
-import os.path
-
-import libcxx.header_information
-
-header_restrictions = libcxx.header_information.header_restrictions
-
-libcxx_include_directory = os.path.join(
-    os.path.dirname(os.path.dirname(os.path.realpath(__file__))), "include"
-)
-with open(
-    os.path.join(libcxx_include_directory, "__std_clang_module"), "w"
-) as std_clang_module_header:
-    std_clang_module_header.write(
-        """\
-// -*- C++ -*-
-//===----------------------------------------------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-// WARNING, this entire header is generated by
-// utils/generate_std_clang_module_header.py
-// DO NOT MODIFY!
-
-// This header should not be directly included, it's exclusively to import all
-// of the libc++ public clang modules for the `std` clang module to export. In
-// other words, it's to facilitate `@import std;` in Objective-C++ and `import std`
-// in Swift to expose all of the libc++ interfaces. This is generally not
-// recommended, however there are some clients that need to import all of libc++
-// without knowing what "all" is.
-#if !__building_module(std)
-#  error "Do not include this header directly, include individual headers instead"
-#endif
-
-#include <__config>
-
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#  pragma GCC system_header
-#endif
-
-"""
-    )
-    # Include the angle brackets in sorting so that <a.h> sorts before <a>
-    # like check-format wants.
-    for include, header in sorted([(f"<{header}>", header) for header in libcxx.header_information.public_headers]):
-        header_restriction = header_restrictions.get(header)
-        if header_restriction:
-            std_clang_module_header.write(f"#if {header_restriction}\n")
-            std_clang_module_header.write(f"#  include {include}\n")
-            std_clang_module_header.write(f"#endif\n")
-        else:
-            std_clang_module_header.write(f"#include {include}\n")



More information about the libcxx-commits mailing list