Skip to content

Commit 1ab4113

Browse files
authored
[libc++] Remove a bunch of unused includes from <flat_*> (#160658)
1 parent f9e7f95 commit 1ab4113

File tree

6 files changed

+4
-31
lines changed

6 files changed

+4
-31
lines changed

libcxx/include/__flat_map/flat_map.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
#include <__flat_map/key_value_iterator.h>
3030
#include <__flat_map/sorted_unique.h>
3131
#include <__flat_map/utils.h>
32-
#include <__functional/invoke.h>
3332
#include <__functional/is_transparent.h>
3433
#include <__functional/operations.h>
3534
#include <__fwd/memory.h>
@@ -48,7 +47,6 @@
4847
#include <__ranges/container_compatible_range.h>
4948
#include <__ranges/drop_view.h>
5049
#include <__ranges/from_range.h>
51-
#include <__ranges/ref_view.h>
5250
#include <__ranges/size.h>
5351
#include <__ranges/subrange.h>
5452
#include <__ranges/zip_view.h>

libcxx/include/__flat_map/flat_multimap.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@
2222
#include <__algorithm/upper_bound.h>
2323
#include <__assert>
2424
#include <__compare/synth_three_way.h>
25-
#include <__concepts/convertible_to.h>
2625
#include <__concepts/swappable.h>
2726
#include <__config>
2827
#include <__cstddef/byte.h>
2928
#include <__cstddef/ptrdiff_t.h>
3029
#include <__flat_map/key_value_iterator.h>
3130
#include <__flat_map/sorted_equivalent.h>
3231
#include <__flat_map/utils.h>
33-
#include <__functional/invoke.h>
3432
#include <__functional/is_transparent.h>
3533
#include <__functional/operations.h>
3634
#include <__fwd/vector.h>
@@ -47,7 +45,6 @@
4745
#include <__ranges/container_compatible_range.h>
4846
#include <__ranges/drop_view.h>
4947
#include <__ranges/from_range.h>
50-
#include <__ranges/ref_view.h>
5148
#include <__ranges/size.h>
5249
#include <__ranges/subrange.h>
5350
#include <__ranges/zip_view.h>
@@ -57,14 +54,12 @@
5754
#include <__type_traits/is_allocator.h>
5855
#include <__type_traits/is_nothrow_constructible.h>
5956
#include <__type_traits/is_same.h>
60-
#include <__type_traits/maybe_const.h>
6157
#include <__utility/exception_guard.h>
6258
#include <__utility/move.h>
6359
#include <__utility/pair.h>
6460
#include <__utility/scope_guard.h>
6561
#include <__vector/vector.h>
6662
#include <initializer_list>
67-
#include <stdexcept>
6863

6964
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
7065
# pragma GCC system_header

libcxx/include/__flat_map/key_value_iterator.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include <__type_traits/conditional.h>
2121
#include <__utility/forward.h>
2222
#include <__utility/move.h>
23-
#include <__utility/pair.h>
2423

2524
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
2625
# pragma GCC system_header

libcxx/include/__flat_set/flat_multiset.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,54 +13,40 @@
1313
#include <__algorithm/equal_range.h>
1414
#include <__algorithm/lexicographical_compare_three_way.h>
1515
#include <__algorithm/lower_bound.h>
16-
#include <__algorithm/min.h>
1716
#include <__algorithm/ranges_equal.h>
1817
#include <__algorithm/ranges_inplace_merge.h>
1918
#include <__algorithm/ranges_is_sorted.h>
2019
#include <__algorithm/ranges_sort.h>
21-
#include <__algorithm/ranges_unique.h>
2220
#include <__algorithm/remove_if.h>
2321
#include <__algorithm/upper_bound.h>
2422
#include <__assert>
2523
#include <__compare/synth_three_way.h>
26-
#include <__concepts/convertible_to.h>
2724
#include <__concepts/swappable.h>
2825
#include <__config>
29-
#include <__cstddef/byte.h>
30-
#include <__cstddef/ptrdiff_t.h>
31-
#include <__flat_map/key_value_iterator.h>
3226
#include <__flat_map/sorted_equivalent.h>
3327
#include <__flat_set/ra_iterator.h>
3428
#include <__flat_set/utils.h>
35-
#include <__functional/invoke.h>
3629
#include <__functional/is_transparent.h>
3730
#include <__functional/operations.h>
3831
#include <__fwd/vector.h>
3932
#include <__iterator/concepts.h>
40-
#include <__iterator/distance.h>
4133
#include <__iterator/iterator_traits.h>
4234
#include <__iterator/prev.h>
43-
#include <__iterator/ranges_iterator_traits.h>
4435
#include <__iterator/reverse_iterator.h>
4536
#include <__memory/allocator_traits.h>
4637
#include <__memory/uses_allocator.h>
4738
#include <__memory/uses_allocator_construction.h>
48-
#include <__ranges/access.h>
4939
#include <__ranges/concepts.h>
5040
#include <__ranges/container_compatible_range.h>
5141
#include <__ranges/drop_view.h>
5242
#include <__ranges/from_range.h>
53-
#include <__ranges/ref_view.h>
5443
#include <__ranges/size.h>
5544
#include <__ranges/subrange.h>
56-
#include <__ranges/zip_view.h>
57-
#include <__type_traits/conjunction.h>
5845
#include <__type_traits/container_traits.h>
5946
#include <__type_traits/invoke.h>
6047
#include <__type_traits/is_allocator.h>
6148
#include <__type_traits/is_nothrow_constructible.h>
6249
#include <__type_traits/is_same.h>
63-
#include <__type_traits/maybe_const.h>
6450
#include <__utility/as_const.h>
6551
#include <__utility/exception_guard.h>
6652
#include <__utility/move.h>

libcxx/include/__flat_set/flat_set.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
#include <__algorithm/lexicographical_compare_three_way.h>
1414
#include <__algorithm/lower_bound.h>
15-
#include <__algorithm/min.h>
1615
#include <__algorithm/ranges_adjacent_find.h>
1716
#include <__algorithm/ranges_equal.h>
1817
#include <__algorithm/ranges_inplace_merge.h>
@@ -24,20 +23,16 @@
2423
#include <__compare/synth_three_way.h>
2524
#include <__concepts/swappable.h>
2625
#include <__config>
27-
#include <__cstddef/ptrdiff_t.h>
2826
#include <__flat_map/sorted_unique.h>
2927
#include <__flat_set/ra_iterator.h>
3028
#include <__flat_set/utils.h>
31-
#include <__functional/invoke.h>
3229
#include <__functional/is_transparent.h>
3330
#include <__functional/operations.h>
3431
#include <__fwd/vector.h>
3532
#include <__iterator/concepts.h>
36-
#include <__iterator/distance.h>
3733
#include <__iterator/iterator_traits.h>
3834
#include <__iterator/next.h>
3935
#include <__iterator/prev.h>
40-
#include <__iterator/ranges_iterator_traits.h>
4136
#include <__iterator/reverse_iterator.h>
4237
#include <__memory/allocator_traits.h>
4338
#include <__memory/uses_allocator.h>
@@ -47,10 +42,7 @@
4742
#include <__ranges/container_compatible_range.h>
4843
#include <__ranges/drop_view.h>
4944
#include <__ranges/from_range.h>
50-
#include <__ranges/ref_view.h>
5145
#include <__ranges/size.h>
52-
#include <__ranges/subrange.h>
53-
#include <__type_traits/conjunction.h>
5446
#include <__type_traits/container_traits.h>
5547
#include <__type_traits/invoke.h>
5648
#include <__type_traits/is_allocator.h>

libcxx/include/module.modulemap.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1847,7 +1847,10 @@ module std [system] {
18471847

18481848
module ranges {
18491849
module access { header "__ranges/access.h" }
1850-
module all { header "__ranges/all.h" }
1850+
module all {
1851+
header "__ranges/all.h"
1852+
export std.ranges.ref_view
1853+
}
18511854
module as_rvalue_view { header "__ranges/as_rvalue_view.h" }
18521855
module chunk_by_view {
18531856
header "__ranges/chunk_by_view.h"

0 commit comments

Comments
 (0)