diff --git a/libcxx/include/__algorithm/iterator_operations.h b/libcxx/include/__algorithm/iterator_operations.h --- a/libcxx/include/__algorithm/iterator_operations.h +++ b/libcxx/include/__algorithm/iterator_operations.h @@ -20,7 +20,6 @@ #include <__iterator/iterator_traits.h> #include <__iterator/next.h> #include <__iterator/prev.h> -#include <__iterator/readable_traits.h> #include <__type_traits/enable_if.h> #include <__type_traits/is_reference.h> #include <__type_traits/is_same.h> diff --git a/libcxx/include/__algorithm/ranges_partial_sort.h b/libcxx/include/__algorithm/ranges_partial_sort.h --- a/libcxx/include/__algorithm/ranges_partial_sort.h +++ b/libcxx/include/__algorithm/ranges_partial_sort.h @@ -9,6 +9,7 @@ #ifndef _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_H #define _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_H +#include <__algorithm/in_out_result.h> #include <__algorithm/iterator_operations.h> #include <__algorithm/make_projected.h> #include <__algorithm/partial_sort.h> diff --git a/libcxx/include/__algorithm/ranges_partial_sort_copy.h b/libcxx/include/__algorithm/ranges_partial_sort_copy.h --- a/libcxx/include/__algorithm/ranges_partial_sort_copy.h +++ b/libcxx/include/__algorithm/ranges_partial_sort_copy.h @@ -9,6 +9,7 @@ #ifndef _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_COPY_H #define _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_COPY_H +#include <__algorithm/in_out_out_result.h> #include <__algorithm/in_out_result.h> #include <__algorithm/iterator_operations.h> #include <__algorithm/make_projected.h> diff --git a/libcxx/include/__algorithm/ranges_unique_copy.h b/libcxx/include/__algorithm/ranges_unique_copy.h --- a/libcxx/include/__algorithm/ranges_unique_copy.h +++ b/libcxx/include/__algorithm/ranges_unique_copy.h @@ -21,7 +21,6 @@ #include <__iterator/concepts.h> #include <__iterator/iterator_traits.h> #include <__iterator/projected.h> -#include <__iterator/readable_traits.h> #include <__ranges/access.h> #include <__ranges/concepts.h> #include <__ranges/dangling.h> diff --git a/libcxx/include/__chrono/high_resolution_clock.h b/libcxx/include/__chrono/high_resolution_clock.h --- a/libcxx/include/__chrono/high_resolution_clock.h +++ b/libcxx/include/__chrono/high_resolution_clock.h @@ -12,6 +12,7 @@ #include <__chrono/steady_clock.h> #include <__chrono/system_clock.h> +#include <__chrono/time_point.h> #include <__config> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__filesystem/path.h b/libcxx/include/__filesystem/path.h --- a/libcxx/include/__filesystem/path.h +++ b/libcxx/include/__filesystem/path.h @@ -14,6 +14,7 @@ #include <__algorithm/replace_copy.h> #include <__availability> #include <__config> +#include <__functional/hash.h> #include <__functional/unary_function.h> #include <__fwd/hash.h> #include <__iterator/back_insert_iterator.h> diff --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h --- a/libcxx/include/__format/format_context.h +++ b/libcxx/include/__format/format_context.h @@ -21,6 +21,7 @@ #include <__format/format_fwd.h> #include <__iterator/back_insert_iterator.h> #include <__iterator/concepts.h> +#include <__locale> #include <__memory/addressof.h> #include <__utility/move.h> #include <__variant/monostate.h> diff --git a/libcxx/include/__format/format_functions.h b/libcxx/include/__format/format_functions.h --- a/libcxx/include/__format/format_functions.h +++ b/libcxx/include/__format/format_functions.h @@ -36,7 +36,7 @@ #include <__iterator/back_insert_iterator.h> #include <__iterator/concepts.h> #include <__iterator/incrementable_traits.h> -#include <__iterator/readable_traits.h> // iter_value_t +#include <__iterator/iterator_traits.h> // iter_value_t #include <__variant/monostate.h> #include #include diff --git a/libcxx/include/__format/format_string.h b/libcxx/include/__format/format_string.h --- a/libcxx/include/__format/format_string.h +++ b/libcxx/include/__format/format_string.h @@ -14,7 +14,7 @@ #include <__config> #include <__format/format_error.h> #include <__iterator/concepts.h> -#include <__iterator/readable_traits.h> // iter_value_t +#include <__iterator/iterator_traits.h> // iter_value_t #include #include diff --git a/libcxx/include/__format/formatter_output.h b/libcxx/include/__format/formatter_output.h --- a/libcxx/include/__format/formatter_output.h +++ b/libcxx/include/__format/formatter_output.h @@ -28,7 +28,7 @@ #include <__format/unicode.h> #include <__iterator/back_insert_iterator.h> #include <__iterator/concepts.h> -#include <__iterator/readable_traits.h> // iter_value_t +#include <__iterator/iterator_traits.h> // iter_value_t #include <__system_error/errc.h> #include <__type_traits/make_unsigned.h> #include <__utility/move.h> diff --git a/libcxx/include/__format/parser_std_format_spec.h b/libcxx/include/__format/parser_std_format_spec.h --- a/libcxx/include/__format/parser_std_format_spec.h +++ b/libcxx/include/__format/parser_std_format_spec.h @@ -31,7 +31,7 @@ #include <__format/unicode.h> #include <__format/width_estimation_table.h> #include <__iterator/concepts.h> -#include <__iterator/readable_traits.h> // iter_value_t +#include <__iterator/iterator_traits.h> // iter_value_t #include <__memory/addressof.h> #include <__type_traits/common_type.h> #include <__type_traits/is_trivially_copyable.h> diff --git a/libcxx/include/__format/unicode.h b/libcxx/include/__format/unicode.h --- a/libcxx/include/__format/unicode.h +++ b/libcxx/include/__format/unicode.h @@ -16,7 +16,7 @@ #include <__config> #include <__format/extended_grapheme_cluster_table.h> #include <__iterator/concepts.h> -#include <__iterator/readable_traits.h> // iter_value_t +#include <__iterator/iterator_traits.h> // iter_value_t #include <__type_traits/make_unsigned.h> #include <__utility/unreachable.h> #include diff --git a/libcxx/include/__iterator/common_iterator.h b/libcxx/include/__iterator/common_iterator.h --- a/libcxx/include/__iterator/common_iterator.h +++ b/libcxx/include/__iterator/common_iterator.h @@ -24,7 +24,6 @@ #include <__iterator/iter_move.h> #include <__iterator/iter_swap.h> #include <__iterator/iterator_traits.h> -#include <__iterator/readable_traits.h> #include <__memory/addressof.h> #include <__type_traits/is_pointer.h> #include <__utility/declval.h> diff --git a/libcxx/include/__iterator/concepts.h b/libcxx/include/__iterator/concepts.h --- a/libcxx/include/__iterator/concepts.h +++ b/libcxx/include/__iterator/concepts.h @@ -30,7 +30,6 @@ #include <__iterator/incrementable_traits.h> #include <__iterator/iter_move.h> #include <__iterator/iterator_traits.h> -#include <__iterator/readable_traits.h> #include <__memory/pointer_traits.h> #include <__type_traits/add_pointer.h> #include <__type_traits/common_reference.h> diff --git a/libcxx/include/__iterator/counted_iterator.h b/libcxx/include/__iterator/counted_iterator.h --- a/libcxx/include/__iterator/counted_iterator.h +++ b/libcxx/include/__iterator/counted_iterator.h @@ -23,7 +23,6 @@ #include <__iterator/iter_move.h> #include <__iterator/iter_swap.h> #include <__iterator/iterator_traits.h> -#include <__iterator/readable_traits.h> #include <__memory/pointer_traits.h> #include <__type_traits/add_pointer.h> #include <__type_traits/conditional.h> diff --git a/libcxx/include/__iterator/iter_swap.h b/libcxx/include/__iterator/iter_swap.h --- a/libcxx/include/__iterator/iter_swap.h +++ b/libcxx/include/__iterator/iter_swap.h @@ -16,7 +16,6 @@ #include <__iterator/concepts.h> #include <__iterator/iter_move.h> #include <__iterator/iterator_traits.h> -#include <__iterator/readable_traits.h> #include <__type_traits/remove_cvref.h> #include <__utility/declval.h> #include <__utility/forward.h> diff --git a/libcxx/include/__iterator/iterator_with_data.h b/libcxx/include/__iterator/iterator_with_data.h --- a/libcxx/include/__iterator/iterator_with_data.h +++ b/libcxx/include/__iterator/iterator_with_data.h @@ -17,7 +17,6 @@ #include <__iterator/iter_move.h> #include <__iterator/iter_swap.h> #include <__iterator/iterator_traits.h> -#include <__iterator/readable_traits.h> #include <__utility/move.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__iterator/move_iterator.h b/libcxx/include/__iterator/move_iterator.h --- a/libcxx/include/__iterator/move_iterator.h +++ b/libcxx/include/__iterator/move_iterator.h @@ -23,7 +23,6 @@ #include <__iterator/iter_swap.h> #include <__iterator/iterator_traits.h> #include <__iterator/move_sentinel.h> -#include <__iterator/readable_traits.h> #include <__type_traits/conditional.h> #include <__type_traits/enable_if.h> #include <__type_traits/is_assignable.h> diff --git a/libcxx/include/__iterator/reverse_iterator.h b/libcxx/include/__iterator/reverse_iterator.h --- a/libcxx/include/__iterator/reverse_iterator.h +++ b/libcxx/include/__iterator/reverse_iterator.h @@ -24,7 +24,6 @@ #include <__iterator/iterator_traits.h> #include <__iterator/next.h> #include <__iterator/prev.h> -#include <__iterator/readable_traits.h> #include <__iterator/segmented_iterator.h> #include <__memory/addressof.h> #include <__ranges/access.h> diff --git a/libcxx/include/__memory/concepts.h b/libcxx/include/__memory/concepts.h --- a/libcxx/include/__memory/concepts.h +++ b/libcxx/include/__memory/concepts.h @@ -14,11 +14,11 @@ #include <__config> #include <__iterator/concepts.h> #include <__iterator/iterator_traits.h> -#include <__iterator/readable_traits.h> #include <__ranges/access.h> #include <__ranges/concepts.h> #include <__type_traits/is_reference.h> #include <__type_traits/remove_cvref.h> +#include <__type_traits/remove_reference.h> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__memory/ranges_construct_at.h b/libcxx/include/__memory/ranges_construct_at.h --- a/libcxx/include/__memory/ranges_construct_at.h +++ b/libcxx/include/__memory/ranges_construct_at.h @@ -13,7 +13,7 @@ #include <__concepts/destructible.h> #include <__config> #include <__iterator/incrementable_traits.h> -#include <__iterator/readable_traits.h> +#include <__iterator/iterator_traits.h> #include <__memory/concepts.h> #include <__memory/construct_at.h> #include <__ranges/access.h> diff --git a/libcxx/include/__memory/ranges_uninitialized_algorithms.h b/libcxx/include/__memory/ranges_uninitialized_algorithms.h --- a/libcxx/include/__memory/ranges_uninitialized_algorithms.h +++ b/libcxx/include/__memory/ranges_uninitialized_algorithms.h @@ -17,7 +17,6 @@ #include <__iterator/incrementable_traits.h> #include <__iterator/iter_move.h> #include <__iterator/iterator_traits.h> -#include <__iterator/readable_traits.h> #include <__memory/concepts.h> #include <__memory/uninitialized_algorithms.h> #include <__ranges/access.h> diff --git a/libcxx/include/__ranges/access.h b/libcxx/include/__ranges/access.h --- a/libcxx/include/__ranges/access.h +++ b/libcxx/include/__ranges/access.h @@ -13,7 +13,7 @@ #include <__concepts/class_or_enum.h> #include <__config> #include <__iterator/concepts.h> -#include <__iterator/readable_traits.h> +#include <__iterator/iterator_traits.h> #include <__ranges/enable_borrowed_range.h> #include <__type_traits/decay.h> #include <__type_traits/is_reference.h> diff --git a/libcxx/include/__ranges/all.h b/libcxx/include/__ranges/all.h --- a/libcxx/include/__ranges/all.h +++ b/libcxx/include/__ranges/all.h @@ -11,6 +11,8 @@ #define _LIBCPP___RANGES_ALL_H #include <__config> +#include <__functional/compose.h> +#include <__functional/perfect_forward.h> #include <__iterator/concepts.h> #include <__iterator/iterator_traits.h> #include <__ranges/access.h> diff --git a/libcxx/include/__ranges/concepts.h b/libcxx/include/__ranges/concepts.h --- a/libcxx/include/__ranges/concepts.h +++ b/libcxx/include/__ranges/concepts.h @@ -18,7 +18,6 @@ #include <__iterator/incrementable_traits.h> #include <__iterator/iter_move.h> #include <__iterator/iterator_traits.h> -#include <__iterator/readable_traits.h> #include <__ranges/access.h> #include <__ranges/data.h> #include <__ranges/enable_borrowed_range.h> diff --git a/libcxx/include/__ranges/rbegin.h b/libcxx/include/__ranges/rbegin.h --- a/libcxx/include/__ranges/rbegin.h +++ b/libcxx/include/__ranges/rbegin.h @@ -14,7 +14,7 @@ #include <__concepts/same_as.h> #include <__config> #include <__iterator/concepts.h> -#include <__iterator/readable_traits.h> +#include <__iterator/iterator_traits.h> #include <__iterator/reverse_iterator.h> #include <__ranges/access.h> #include <__type_traits/decay.h> diff --git a/libcxx/include/__ranges/rend.h b/libcxx/include/__ranges/rend.h --- a/libcxx/include/__ranges/rend.h +++ b/libcxx/include/__ranges/rend.h @@ -14,7 +14,7 @@ #include <__concepts/same_as.h> #include <__config> #include <__iterator/concepts.h> -#include <__iterator/readable_traits.h> +#include <__iterator/iterator_traits.h> #include <__iterator/reverse_iterator.h> #include <__ranges/access.h> #include <__ranges/rbegin.h> diff --git a/libcxx/include/__ranges/transform_view.h b/libcxx/include/__ranges/transform_view.h --- a/libcxx/include/__ranges/transform_view.h +++ b/libcxx/include/__ranges/transform_view.h @@ -20,6 +20,7 @@ #include <__config> #include <__functional/bind_back.h> #include <__functional/invoke.h> +#include <__functional/perfect_forward.h> #include <__iterator/concepts.h> #include <__iterator/iterator_traits.h> #include <__memory/addressof.h> diff --git a/libcxx/include/__system_error/error_condition.h b/libcxx/include/__system_error/error_condition.h --- a/libcxx/include/__system_error/error_condition.h +++ b/libcxx/include/__system_error/error_condition.h @@ -12,6 +12,7 @@ #include <__compare/ordering.h> #include <__config> +#include <__functional/hash.h> #include <__functional/unary_function.h> #include <__system_error/errc.h> #include <__system_error/error_category.h> diff --git a/libcxx/include/cwchar b/libcxx/include/cwchar --- a/libcxx/include/cwchar +++ b/libcxx/include/cwchar @@ -110,6 +110,7 @@ #include <__type_traits/is_same.h> #include <__type_traits/remove_cv.h> #include +#include #include diff --git a/libcxx/include/iterator b/libcxx/include/iterator --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -708,7 +708,6 @@ #include <__iterator/permutable.h> #include <__iterator/prev.h> #include <__iterator/projected.h> -#include <__iterator/readable_traits.h> #include <__iterator/reverse_access.h> #include <__iterator/reverse_iterator.h> #include <__iterator/size.h> diff --git a/libcxx/include/mdspan b/libcxx/include/mdspan --- a/libcxx/include/mdspan +++ b/libcxx/include/mdspan @@ -61,6 +61,8 @@ #include <__config> #include <__mdspan/extents.h> +#include +#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/module.modulemap.in b/libcxx/include/module.modulemap.in --- a/libcxx/include/module.modulemap.in +++ b/libcxx/include/module.modulemap.in @@ -249,10 +249,16 @@ module clamp { private header "__algorithm/clamp.h" } module comp { private header "__algorithm/comp.h" } module comp_ref_type { private header "__algorithm/comp_ref_type.h" } - module copy { private header "__algorithm/copy.h" } + module copy { + private header "__algorithm/copy.h" + export algorithm.__algorithm.copy_move_common + } module copy_backward { private header "__algorithm/copy_backward.h" } module copy_if { private header "__algorithm/copy_if.h" } - module copy_move_common { private header "__algorithm/copy_move_common.h" } + module copy_move_common { + private header "__algorithm/copy_move_common.h" + export type_traits.is_trivially_copyable + } module copy_n { private header "__algorithm/copy_n.h" } module count { private header "__algorithm/count.h" } module count_if { private header "__algorithm/count_if.h" } @@ -640,12 +646,18 @@ module sort_heap { private header "__algorithm/sort_heap.h" } module stable_partition { private header "__algorithm/stable_partition.h" } module stable_sort { private header "__algorithm/stable_sort.h" } - module swap_ranges { private header "__algorithm/swap_ranges.h" } + module swap_ranges { + private header "__algorithm/swap_ranges.h" + export algorithm.__algorithm.iterator_operations + } module three_way_comp_ref_type { private header "__algorithm/three_way_comp_ref_type.h" } module transform { private header "__algorithm/transform.h" } module unique { private header "__algorithm/unique.h" } module unique_copy { private header "__algorithm/unique_copy.h" } - module unwrap_iter { private header "__algorithm/unwrap_iter.h" } + module unwrap_iter { + private header "__algorithm/unwrap_iter.h" + export iterator.__iterator.iterator_traits + } module unwrap_range { private header "__algorithm/unwrap_range.h" export utility.__utility.pair @@ -828,18 +840,27 @@ module class_or_enum { private header "__concepts/class_or_enum.h" } module common_reference_with { private header "__concepts/common_reference_with.h" } module common_with { private header "__concepts/common_with.h" } - module constructible { private header "__concepts/constructible.h" } + module constructible { + private header "__concepts/constructible.h" + export concepts.__concepts.destructible + } module convertible_to { private header "__concepts/convertible_to.h" } module copyable { private header "__concepts/copyable.h" } module derived_from { private header "__concepts/derived_from.h" } - module destructible { private header "__concepts/destructible.h" } + module destructible { + private header "__concepts/destructible.h" + export type_traits.is_nothrow_destructible + } module different_from { private header "__concepts/different_from.h" } module equality_comparable { private header "__concepts/equality_comparable.h" export type_traits.common_reference } module invocable { private header "__concepts/invocable.h" } - module movable { private header "__concepts/movable.h" } + module movable { + private header "__concepts/movable.h" + export type_traits.is_object + } module predicate { private header "__concepts/predicate.h" } module regular { private header "__concepts/regular.h" } module relation { private header "__concepts/relation.h" } @@ -994,23 +1015,34 @@ module bind_front { private header "__functional/bind_front.h" } module binder1st { private header "__functional/binder1st.h" } module binder2nd { private header "__functional/binder2nd.h" } - module boyer_moore_searcher { private header "__functional/boyer_moore_searcher.h" } + module boyer_moore_searcher { + private header "__functional/boyer_moore_searcher.h" + export memory.__memory.shared_ptr + } module compose { private header "__functional/compose.h" } module default_searcher { private header "__functional/default_searcher.h" } module function { private header "__functional/function.h" } - module hash { private header "__functional/hash.h" } + module hash { + private header "__functional/hash.h" + export compat.cstdint + export type_traits.underlying_type + export utility.__utility.pair + } module hash_fwd { private header "__fwd/hash.h" } module identity { private header "__functional/identity.h" } module invoke { private header "__functional/invoke.h" - export type_traits + export * } module is_transparent { private header "__functional/is_transparent.h" } module mem_fn { private header "__functional/mem_fn.h" } module mem_fun_ref { private header "__functional/mem_fun_ref.h" } module not_fn { private header "__functional/not_fn.h" } module operations { private header "__functional/operations.h" } - module perfect_forward { private header "__functional/perfect_forward.h" } + module perfect_forward { + private header "__functional/perfect_forward.h" + export * + } module pointer_to_binary_function { private header "__functional/pointer_to_binary_function.h" } module pointer_to_unary_function { private header "__functional/pointer_to_unary_function.h" } module ranges_operations { private header "__functional/ranges_operations.h" } @@ -1084,13 +1116,20 @@ module cpp17_iterator_concepts { private header "__iterator/cpp17_iterator_concepts.h" } module concepts { private header "__iterator/concepts.h" - export concepts.equality_comparable + export std.concepts.__concepts.constructible + export std.concepts.__concepts.equality_comparable + export std.concepts.__concepts.movable export type_traits.common_reference + export type_traits.is_reference + export type_traits.remove_cvref } module counted_iterator { private header "__iterator/counted_iterator.h" } module data { private header "__iterator/data.h" } module default_sentinel { private header "__iterator/default_sentinel.h" } - module distance { private header "__iterator/distance.h" } + module distance { + private header "__iterator/distance.h" + export ranges.__ranges.size + } module empty { private header "__iterator/empty.h" } module erase_if_container { private header "__iterator/erase_if_container.h" } module front_insert_iterator { private header "__iterator/front_insert_iterator.h" } @@ -1102,7 +1141,10 @@ module iter_move { private header "__iterator/iter_move.h" } module iter_swap { private header "__iterator/iter_swap.h" } module iterator { private header "__iterator/iterator.h" } - module iterator_traits { private header "__iterator/iterator_traits.h" } + module iterator_traits { + private header "__iterator/iterator_traits.h" + export type_traits.is_primary_template + } module iterator_with_data { private header "__iterator/iterator_with_data.h" } module mergeable { private header "__iterator/mergeable.h" @@ -1119,10 +1161,7 @@ module permutable { private header "__iterator/permutable.h" } module prev { private header "__iterator/prev.h" } module projected { private header "__iterator/projected.h" } - module readable_traits { - private header "__iterator/readable_traits.h" - export __iterator.iterator_traits - } + module readable_traits { private textual header "__iterator/readable_traits.h" } module reverse_access { private header "__iterator/reverse_access.h" } module reverse_iterator { private header "__iterator/reverse_iterator.h" } module segmented_iterator { private header "__iterator/segmented_iterator.h" } @@ -1206,13 +1245,24 @@ export algorithm.__algorithm.in_out_result } module raw_storage_iterator { private header "__memory/raw_storage_iterator.h" } - module shared_ptr { private header "__memory/shared_ptr.h" } + module shared_ptr { + private header "__memory/shared_ptr.h" + export memory.__memory.uninitialized_algorithms + } module swap_allocator { private header "__memory/swap_allocator.h" } module temp_value { private header "__memory/temp_value.h" } module temporary_buffer { private header "__memory/temporary_buffer.h" } - module uninitialized_algorithms { private header "__memory/uninitialized_algorithms.h" } + module uninitialized_algorithms { + private header "__memory/uninitialized_algorithms.h" + export algorithm.__algorithm.copy + } module uninitialized_buffer { private header "__memory/uninitialized_buffer.h" } - module unique_ptr { private header "__memory/unique_ptr.h" } + module unique_ptr { + private header "__memory/unique_ptr.h" + export type_traits.add_lvalue_reference + export type_traits.is_pointer + export type_traits.type_identity + } module uses_allocator { private header "__memory/uses_allocator.h" } module uses_allocator_construction { private header "__memory/uses_allocator_construction.h" } module voidify { private header "__memory/voidify.h" } @@ -1357,7 +1407,10 @@ } module as_rvalue_view { private header "__ranges/as_rvalue_view.h" } module common_view { private header "__ranges/common_view.h" } - module concepts { private header "__ranges/concepts.h" } + module concepts { + private header "__ranges/concepts.h" + export iterator.__iterator.concepts + } module container_compatible_range { private header "__ranges/container_compatible_range.h" } module copyable_box { private header "__ranges/copyable_box.h" } module counted { @@ -1390,13 +1443,19 @@ module rend { private header "__ranges/rend.h" } module reverse_view { private header "__ranges/reverse_view.h" } module single_view { private header "__ranges/single_view.h" } - module size { private header "__ranges/size.h" } + module size { + private header "__ranges/size.h" + export type_traits.make_unsigned + } module split_view { private header "__ranges/split_view.h" } module subrange { private header "__ranges/subrange.h" export subrange_fwd } - module subrange_fwd { private header "__fwd/subrange.h" } + module subrange_fwd { + private header "__fwd/subrange.h" + export iterator.__iterator.concepts + } module take_view { private header "__ranges/take_view.h" } module take_while_view { private header "__ranges/take_while_view.h" } module transform_view { @@ -1507,7 +1566,6 @@ } module system_error { header "system_error" - export __errc export * module __system_error { module errc { private header "__system_error/errc.h" } @@ -1568,15 +1626,25 @@ module aligned_storage { private header "__type_traits/aligned_storage.h" } module aligned_union { private header "__type_traits/aligned_union.h" } module alignment_of { private header "__type_traits/alignment_of.h" } - module apply_cv { private header "__type_traits/apply_cv.h" } + module apply_cv { + private header "__type_traits/apply_cv.h" + export is_const + export is_volatile + } module can_extract_key { private header "__type_traits/can_extract_key.h" } module common_reference { private header "__type_traits/common_reference.h" } - module common_type { private header "__type_traits/common_type.h" } + module common_type { + private header "__type_traits/common_type.h" + export utility.__utility.declval + } module conditional { private header "__type_traits/conditional.h" } module conjunction { private header "__type_traits/conjunction.h" } module copy_cv { private header "__type_traits/copy_cv.h" } module copy_cvref { private header "__type_traits/copy_cvref.h" } - module decay { private header "__type_traits/decay.h" } + module decay { + private header "__type_traits/decay.h" + export add_pointer + } module dependent_type { private header "__type_traits/dependent_type.h" } module disjunction { private header "__type_traits/disjunction.h" } module enable_if { private header "__type_traits/enable_if.h" } @@ -1584,7 +1652,16 @@ module has_unique_object_representation { private header "__type_traits/has_unique_object_representation.h" } module has_virtual_destructor { private header "__type_traits/has_virtual_destructor.h" } module integral_constant { private header "__type_traits/integral_constant.h" } - module invoke { private header "__type_traits/invoke.h" } + module invoke { + private header "__type_traits/invoke.h" + export conditional + export decay + export is_base_of + export is_core_convertible + export is_reference_wrapper + export is_void + export remove_cv + } module is_abstract { private header "__type_traits/is_abstract.h" } module is_aggregate { private header "__type_traits/is_aggregate.h" } module is_allocator { private header "__type_traits/is_allocator.h" } @@ -1607,7 +1684,10 @@ module is_const { private header "__type_traits/is_const.h" } module is_constant_evaluated { private header "__type_traits/is_constant_evaluated.h" } module is_constructible { private header "__type_traits/is_constructible.h" } - module is_convertible { private header "__type_traits/is_convertible.h" } + module is_convertible { + private header "__type_traits/is_convertible.h" + export is_array + } module is_copy_assignable { private header "__type_traits/is_copy_assignable.h" } module is_copy_constructible { private header "__type_traits/is_copy_constructible.h" } module is_core_convertible { @@ -1644,15 +1724,27 @@ module is_nothrow_copy_assignable { private header "__type_traits/is_nothrow_copy_assignable.h" } module is_nothrow_copy_constructible { private header "__type_traits/is_nothrow_copy_constructible.h" } module is_nothrow_default_constructible { private header "__type_traits/is_nothrow_default_constructible.h" } - module is_nothrow_destructible { private header "__type_traits/is_nothrow_destructible.h" } + module is_nothrow_destructible { + private header "__type_traits/is_nothrow_destructible.h" + export type_traits.is_destructible + } module is_nothrow_move_assignable { private header "__type_traits/is_nothrow_move_assignable.h" } - module is_nothrow_move_constructible { private header "__type_traits/is_nothrow_move_constructible.h" } + module is_nothrow_move_constructible { + private header "__type_traits/is_nothrow_move_constructible.h" + export type_traits.is_nothrow_constructible + } module is_null_pointer { private header "__type_traits/is_null_pointer.h" } - module is_object { private header "__type_traits/is_object.h" } + module is_object { + private header "__type_traits/is_object.h" + export type_traits.is_scalar + } module is_pod { private header "__type_traits/is_pod.h" } module is_pointer { private header "__type_traits/is_pointer.h" } module is_polymorphic { private header "__type_traits/is_polymorphic.h" } - module is_primary_template { private header "__type_traits/is_primary_template.h" } + module is_primary_template { + private header "__type_traits/is_primary_template.h" + export type_traits.enable_if + } module is_reference { private header "__type_traits/is_reference.h" } module is_reference_wrapper { private header "__type_traits/is_reference_wrapper.h" } module is_referenceable { private header "__type_traits/is_referenceable.h" } @@ -1666,7 +1758,10 @@ module is_signed_integer { private header "__type_traits/is_signed_integer.h" } module is_specialization { private header "__type_traits/is_specialization.h" } module is_standard_layout { private header "__type_traits/is_standard_layout.h" } - module is_swappable { private header "__type_traits/is_swappable.h" } + module is_swappable { + private header "__type_traits/is_swappable.h" + export type_traits.is_move_constructible + } module is_trivial { private header "__type_traits/is_trivial.h" } module is_trivially_assignable { private header "__type_traits/is_trivially_assignable.h" } module is_trivially_constructible { private header "__type_traits/is_trivially_constructible.h" } @@ -1692,7 +1787,10 @@ module make_32_64_or_128_bit { private header "__type_traits/make_32_64_or_128_bit.h" } module make_const_lvalue_ref { private header "__type_traits/make_const_lvalue_ref.h" } module make_signed { private header "__type_traits/make_signed.h" } - module make_unsigned { private header "__type_traits/make_unsigned.h" } + module make_unsigned { + private header "__type_traits/make_unsigned.h" + export type_traits.is_unsigned + } module maybe_const { private header "__type_traits/maybe_const.h" } module nat { private header "__type_traits/nat.h" } module negation { private header "__type_traits/negation.h" } @@ -1704,7 +1802,10 @@ module remove_all_extents { private header "__type_traits/remove_all_extents.h" } module remove_const { private header "__type_traits/remove_const.h" } module remove_const_ref { private header "__type_traits/remove_const_ref.h" } - module remove_cv { private header "__type_traits/remove_cv.h" } + module remove_cv { + private header "__type_traits/remove_cv.h" + export type_traits.remove_const + } module remove_cvref { private header "__type_traits/remove_cvref.h" } module remove_extent { private header "__type_traits/remove_extent.h" } module remove_pointer { private header "__type_traits/remove_pointer.h" } @@ -1716,8 +1817,7 @@ module type_list { private header "__type_traits/type_list.h" } module underlying_type { private header "__type_traits/underlying_type.h" - - export type_traits + export type_traits.is_enum } module unwrap_ref { private header "__type_traits/unwrap_ref.h" } module void_t { private header "__type_traits/void_t.h" } @@ -1751,7 +1851,10 @@ private header "__utility/auto_cast.h" export type_traits.decay } - module cmp { private header "__utility/cmp.h" } + module cmp { + private header "__utility/cmp.h" + export type_traits.make_unsigned + } module convert_to_integral { private header "__utility/convert_to_integral.h" } module declval { private header "__utility/declval.h" } module exception_guard { private header "__utility/exception_guard.h" } @@ -1761,13 +1864,32 @@ module in_place { private header "__utility/in_place.h" } module integer_sequence { private header "__utility/integer_sequence.h" } module is_pointer_in_range { private header "__utility/is_pointer_in_range.h" } - module move { private header "__utility/move.h" } - module pair { private header "__utility/pair.h" } + module move { + private header "__utility/move.h" + export type_traits.is_copy_constructible + export type_traits.is_nothrow_move_constructible + export type_traits.remove_reference + } + module pair { + private header "__utility/pair.h" + export ranges.__ranges.subrange_fwd + export type_traits.is_assignable + export type_traits.is_constructible + export type_traits.is_convertible + export type_traits.is_copy_assignable + export type_traits.is_move_assignable + export type_traits.is_nothrow_copy_constructible + export type_traits.is_nothrow_default_constructible + export type_traits.is_nothrow_move_assignable + } module pair_fwd { private header "__fwd/pair.h" } module piecewise_construct { private header "__utility/piecewise_construct.h" } module priority_tag { private header "__utility/priority_tag.h" } module rel_ops { private header "__utility/rel_ops.h" } - module swap { private header "__utility/swap.h" } + module swap { + private header "__utility/swap.h" + export type_traits.is_swappable + } module terminate_on_exception { private header "__utility/terminate_on_exception.h" } module to_underlying { private header "__utility/to_underlying.h" } module unreachable { private header "__utility/unreachable.h" } @@ -1873,10 +1995,6 @@ header "experimental/set" export * } - module span { - header "span" - export * - } module string { header "experimental/string" export * diff --git a/libcxx/include/string_view b/libcxx/include/string_view --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -210,7 +210,7 @@ #include <__fwd/string_view.h> #include <__iterator/bounded_iter.h> #include <__iterator/concepts.h> -#include <__iterator/readable_traits.h> +#include <__iterator/iterator_traits.h> #include <__iterator/reverse_iterator.h> #include <__memory/pointer_traits.h> #include <__ranges/concepts.h> @@ -228,6 +228,7 @@ #include <__type_traits/remove_reference.h> #include <__type_traits/type_identity.h> #include +#include #include #include #include diff --git a/libcxx/include/tgmath.h b/libcxx/include/tgmath.h --- a/libcxx/include/tgmath.h +++ b/libcxx/include/tgmath.h @@ -24,6 +24,8 @@ #endif #ifdef __cplusplus +# include +# include # include #else # if __has_include_next() diff --git a/libcxx/test/libcxx/algorithms/pstl.robust_against_customization_points_not_working.pass.cpp b/libcxx/test/libcxx/algorithms/pstl.robust_against_customization_points_not_working.pass.cpp --- a/libcxx/test/libcxx/algorithms/pstl.robust_against_customization_points_not_working.pass.cpp +++ b/libcxx/test/libcxx/algorithms/pstl.robust_against_customization_points_not_working.pass.cpp @@ -16,7 +16,6 @@ #include <__config> #include <__iterator/iterator_traits.h> -#include <__iterator/readable_traits.h> #include struct TestPolicy {}; diff --git a/libcxx/test/libcxx/transitive_includes/cxx03.csv b/libcxx/test/libcxx/transitive_includes/cxx03.csv --- a/libcxx/test/libcxx/transitive_includes/cxx03.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx03.csv @@ -285,6 +285,7 @@ filesystem cstddef filesystem cstdint filesystem cstdlib +filesystem cstring filesystem ctime filesystem iomanip filesystem iosfwd @@ -298,13 +299,18 @@ filesystem type_traits filesystem version format array +format cctype +format clocale format cmath format cstddef format cstdint format cstdlib +format cstring +format cwchar format initializer_list format limits format locale +format mutex format optional format queue format stack diff --git a/libcxx/test/libcxx/transitive_includes/cxx11.csv b/libcxx/test/libcxx/transitive_includes/cxx11.csv --- a/libcxx/test/libcxx/transitive_includes/cxx11.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx11.csv @@ -285,6 +285,7 @@ filesystem cstddef filesystem cstdint filesystem cstdlib +filesystem cstring filesystem ctime filesystem iomanip filesystem iosfwd @@ -298,13 +299,18 @@ filesystem type_traits filesystem version format array +format cctype +format clocale format cmath format cstddef format cstdint format cstdlib +format cstring +format cwchar format initializer_list format limits format locale +format mutex format optional format queue format stack diff --git a/libcxx/test/libcxx/transitive_includes/cxx14.csv b/libcxx/test/libcxx/transitive_includes/cxx14.csv --- a/libcxx/test/libcxx/transitive_includes/cxx14.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx14.csv @@ -287,6 +287,7 @@ filesystem cstddef filesystem cstdint filesystem cstdlib +filesystem cstring filesystem ctime filesystem iomanip filesystem iosfwd @@ -300,13 +301,18 @@ filesystem type_traits filesystem version format array +format cctype +format clocale format cmath format cstddef format cstdint format cstdlib +format cstring +format cwchar format initializer_list format limits format locale +format mutex format optional format queue format stack diff --git a/libcxx/test/libcxx/transitive_includes/cxx17.csv b/libcxx/test/libcxx/transitive_includes/cxx17.csv --- a/libcxx/test/libcxx/transitive_includes/cxx17.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx17.csv @@ -287,6 +287,7 @@ filesystem cstddef filesystem cstdint filesystem cstdlib +filesystem cstring filesystem ctime filesystem iomanip filesystem iosfwd @@ -300,13 +301,18 @@ filesystem type_traits filesystem version format array +format cctype +format clocale format cmath format cstddef format cstdint format cstdlib +format cstring +format cwchar format initializer_list format limits format locale +format mutex format optional format queue format stack diff --git a/libcxx/test/libcxx/transitive_includes/cxx20.csv b/libcxx/test/libcxx/transitive_includes/cxx20.csv --- a/libcxx/test/libcxx/transitive_includes/cxx20.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx20.csv @@ -111,7 +111,9 @@ charconv type_traits chrono array chrono bit +chrono cctype chrono charconv +chrono clocale chrono cmath chrono compare chrono concepts @@ -120,8 +122,10 @@ chrono cstdlib chrono cstring chrono ctime +chrono cwchar chrono limits chrono locale +chrono mutex chrono optional chrono ostream chrono ratio @@ -294,6 +298,7 @@ filesystem cstddef filesystem cstdint filesystem cstdlib +filesystem cstring filesystem ctime filesystem iomanip filesystem iosfwd @@ -307,13 +312,18 @@ filesystem type_traits filesystem version format array +format cctype +format clocale format cmath format cstddef format cstdint format cstdlib +format cstring +format cwchar format initializer_list format limits format locale +format mutex format optional format queue format stack diff --git a/libcxx/test/libcxx/transitive_includes/cxx23.csv b/libcxx/test/libcxx/transitive_includes/cxx23.csv --- a/libcxx/test/libcxx/transitive_includes/cxx23.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx23.csv @@ -65,15 +65,20 @@ charconv initializer_list charconv limits chrono array +chrono cctype +chrono clocale chrono cmath chrono compare chrono cstddef chrono cstdint chrono cstdlib +chrono cstring chrono ctime +chrono cwchar chrono initializer_list chrono limits chrono locale +chrono mutex chrono new chrono optional chrono ostream @@ -191,6 +196,7 @@ filesystem compare filesystem cstddef filesystem cstdint +filesystem cstring filesystem ctime filesystem iomanip filesystem iosfwd @@ -202,13 +208,18 @@ filesystem string_view filesystem version format array +format cctype +format clocale format cmath format cstddef format cstdint format cstdlib +format cstring +format cwchar format initializer_list format limits format locale +format mutex format new format optional format queue diff --git a/libcxx/test/libcxx/transitive_includes/cxx26.csv b/libcxx/test/libcxx/transitive_includes/cxx26.csv --- a/libcxx/test/libcxx/transitive_includes/cxx26.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx26.csv @@ -65,15 +65,20 @@ charconv initializer_list charconv limits chrono array +chrono cctype +chrono clocale chrono cmath chrono compare chrono cstddef chrono cstdint chrono cstdlib +chrono cstring chrono ctime +chrono cwchar chrono initializer_list chrono limits chrono locale +chrono mutex chrono new chrono optional chrono ostream @@ -191,6 +196,7 @@ filesystem compare filesystem cstddef filesystem cstdint +filesystem cstring filesystem ctime filesystem iomanip filesystem iosfwd @@ -202,13 +208,18 @@ filesystem string_view filesystem version format array +format cctype +format clocale format cmath format cstddef format cstdint format cstdlib +format cstring +format cwchar format initializer_list format limits format locale +format mutex format new format optional format queue diff --git a/libcxx/utils/find_transitive_includes.py b/libcxx/utils/find_transitive_includes.py new file mode 100644 --- /dev/null +++ b/libcxx/utils/find_transitive_includes.py @@ -0,0 +1,229 @@ +#===----------------------------------------------------------------------===## +# +# 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 argparse +import os +import subprocess +import tempfile +import typing + +# Finds include paths to a header that are present in all C++ versions. +def main() -> None: + parser = argparse.ArgumentParser() + source_group = parser.add_mutually_exclusive_group(required=True) + source_group.add_argument('--source-file') + source_group.add_argument('--start-header') + parser.add_argument('--header', required=True) + parser.add_argument('--libcxx-include-directory', required=True) + parser.add_argument('--libcxx-include-target-directory') + parser.add_argument('--cxx-compiler', required=True) + parser.add_argument('--target') + parser.add_argument('--isysroot') + args = parser.parse_args() + + source_file_path = args.source_file + delete_source = False + if args.start_header: + with tempfile.NamedTemporaryFile(mode='w', suffix='.cpp', delete=False) as source_file: + source_file.write('#include <') + source_file.write(args.start_header) + source_file.write('>\n') + source_file_path = source_file.name + delete_source = True + + direct_includes = build_include_tree(args.cxx_compiler, args.target, args.isysroot, args.libcxx_include_directory, args.libcxx_include_target_directory, source_file_path) + if delete_source: + os.remove(source_file_path) + + include_paths = find_include_paths(direct_includes, args.header) + if args.start_header: + print('Include paths from <', args.start_header, '> to <', args.header, '>', sep='') + else: + print('Include paths from "', args.source_file, '" to <', args.header, '>', sep='') + print_include_paths(include_paths) + +def build_include_tree(cxx_compiler: str, target: typing.Optional[str], isysroot: typing.Optional[str], libcxx_include_directory: str, libcxx_include_target_directory: typing.Optional[str], source_file_path: str) -> set['Header']: + headers = None # header objects keyed by path + direct_includes = None # set of the headers directly included by source_file_path + # includes vary by standard, so all standards need to be run, and the includes intersected. + for standard in ['c++98', 'c++11', 'c++14', 'c++17', 'c++20', 'c++2b']: + cxx_command = [cxx_compiler] + if target: + cxx_command += ['-target', target] + if isysroot: + cxx_command += ['-isysroot', isysroot] + cxx_command += ['-E', '-H', '-fshow-skipped-includes'] + cxx_command.append('-std=' + standard) + cxx_command.append('-nostdinc++') + cxx_command += ['-cxx-isystem', libcxx_include_directory] + if libcxx_include_target_directory: + cxx_command += ['-cxx-isystem', libcxx_include_target_directory] + cxx_command.append('-w') + cxx_command.append(source_file_path) + + # Don't require the command to succeed, some of the unit test sources will fail for C++98/C++03. + # It should be fine, they include the libc++ headers first and the necessary output is still produced. + includes = subprocess.run(cxx_command, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE, text=True).stderr + + # Consider 'a' that includes 'b' and 'c', 'b' that includes 'c', and 'c' that includes + # nothing. All three headers have header guards. For an input file that includes all three, + # -H -fshow-skipped-includes will look like this. + # . /a + # .. /b + # ... /c + # .. /c + # . /b + # . /c + # The last three lines are skipped includes - a's include of c is skipped because c has already + # been seen via b, and same with the input file's includes of b and c that have already been seen + # via a and b. Skipped includes do not re-list any of their includes, which is why there isn't a + # ".. /c" under ". /b". The first time a header is seen, it will show all of its direct includes + # and potentially some of its transitive includes. Headers without header guards are not skipped, + # and can have different includes depending on the context. + header_stack = [] # list of tuples (level, path) + current_headers = {} # header objects keyed by path + current_direct_includes = set() + for line in includes.splitlines(): + if not line.startswith('.'): + continue + + dots, include = line.split(' ', maxsplit=1) + level = len(dots) + current_header = current_headers.setdefault(include, Header(include, libcxx_include_directory)) + + while header_stack and (level <= header_stack[-1][0]): + del header_stack[-1] + + if header_stack: + parent_header = header_stack[-1][1] + parent_header.included_headers.add(current_header) + + header_stack.append((level, current_header)) + if level == 1: + current_direct_includes.add(current_header) + + if not headers: + headers = current_headers + else: + # The goal of this script is to find include paths from the source to the + # target header that are present in all configurations so that the appropriate + # `export` statements can be added to the module map. Intersect the includes + # from all of the standards so that the export chains will make the connection + # in all standard versions. + for path, current_header in current_headers.items(): + matching_header = headers.get(path) + if matching_header: + matching_header.included_headers &= current_header.included_headers + + if not direct_includes: + direct_includes = current_direct_includes + else: + direct_includes &= current_direct_includes + + return direct_includes + +def find_include_paths(direct_includes: set['Header'], header: str) -> list[tuple['Header']]: + include_paths = [] + headers_to_ignore = set() + for direct_include in direct_includes: + includes = direct_include.included_headers + includes_to_follow = [includes.copy()] if includes else [] + include_path = [direct_include] + + while includes_to_follow: + selected_header = includes_to_follow[-1].pop() + include_path.append(selected_header) + + selected_header_includes_to_follow = {} + if selected_header.libxcxx_include_relative_path == header: + include_paths.append(tuple(include_path)) + else: + selected_header_includes = selected_header.included_headers + selected_header_includes_to_follow = selected_header_includes.difference(include_path) - headers_to_ignore + if not selected_header_includes_to_follow: + # 1. This header has no includes. + # 2. This header only includes things that are already in the current + # include path (i.e. cyclical includes) + # Add the header to the list of headers that can be ignored from now + # on. + # 3. If a later header only includes ignored headers, then the later + # header can also be ignored. + headers_to_ignore.add(selected_header) + + if selected_header_includes_to_follow: + includes_to_follow.append(selected_header_includes_to_follow) + else: + # Hit the end of the include path, peel back a level. + del include_path[-1] + + # Peel back the completed levels. + while includes_to_follow and not includes_to_follow[-1]: + del includes_to_follow[-1] + del include_path[-1] + return include_paths + +def print_include_paths(include_paths: list[tuple['Header']]) -> None: + def include_path_sort_key(include_path: tuple['Header']) -> tuple[int, tuple['Header']]: + # This script is intended to add module exports to mirror includes, usually + # to bridge from one private header to another. Prefer the path with the least + # number of public headers so that private headers don't export a large API + # surface. Then prefer the shortest path to add the minimum number of exports, + # and finally fall back on a regular sort. + public_header_count = 0 + for header in include_path: + if not header.is_private_libcxx_header: + public_header_count += 1 + return (public_header_count, len(include_path), include_path) + + for include_path in sorted(include_paths, key=include_path_sort_key): + for include in include_path: + if include.is_libxx_header: + print(include.libxcxx_include_relative_path) + else: + print(include.path) + print() + +class Header: + def __init__(self, path: str, libcxx_include_directory: str) -> None: + self.path = path + if os.path.commonpath([path, libcxx_include_directory]) == libcxx_include_directory: + self.is_libxx_header = True + self.libxcxx_include_relative_path = os.path.relpath(path, libcxx_include_directory) + self.is_private_libcxx_header = self.libxcxx_include_relative_path.startswith('__') + else: + self.is_libxx_header = False + self.libxcxx_include_relative_path = '' + self.is_private_libcxx_header = False + + self.included_headers = set() + + def __repr__(self) -> str: + return f'<{type(self).__name__} {self.path}>' + + def __hash__(self) -> int: + return hash(self.path) + + def __eq__(self, other) -> bool: + return self.path == other.path + + def __ne__(self, other) -> bool: + return self.path != other.path + + def __lt__(self, other) -> bool: + return self.path < other.path + + def __le__(self, other) -> bool: + return self.path <= other.path + + def __gt__(self, other) -> bool: + return self.path > other.path + + def __ge__(self, other) -> bool: + return self.path >= other.path + +main() diff --git a/libcxx/utils/libcxx/test/header_information.py b/libcxx/utils/libcxx/test/header_information.py --- a/libcxx/utils/libcxx/test/header_information.py +++ b/libcxx/utils/libcxx/test/header_information.py @@ -71,6 +71,11 @@ "__verbose_abort", ] +private_textual_headers = frozenset(( + "__config", + "__iterator/readable_traits.h", +)) + # This table was produced manually, by grepping the TeX source of the Standard's # library clauses for the string "#include". Each header's synopsis contains # explicit "#include" directives for its mandatory inclusions. @@ -140,4 +145,8 @@ p.relative_to(include).as_posix() for p in include.rglob("*") if is_header(p) and str(p.relative_to(include)).startswith("__") and not p.name.startswith("pstl") + # Textual headers shouldn't be included directly + # (they're typically part of another header that + # was split out just for organization). + and str(p.relative_to(include)) not in private_textual_headers )