Skip to content

Commit

Permalink
[libc++] Granularize <cstddef> includes
Browse files Browse the repository at this point in the history
  • Loading branch information
philnik777 committed Sep 14, 2024
1 parent 2fb133f commit 2bfee2d
Show file tree
Hide file tree
Showing 171 changed files with 167 additions and 180 deletions.
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/copy_move_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <__algorithm/unwrap_iter.h>
#include <__algorithm/unwrap_range.h>
#include <__config>
#include <__cstddef/size_t.h>
#include <__iterator/iterator_traits.h>
#include <__memory/pointer_traits.h>
#include <__string/constexpr_c_functions.h>
Expand All @@ -24,7 +25,6 @@
#include <__type_traits/is_volatile.h>
#include <__utility/move.h>
#include <__utility/pair.h>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
1 change: 1 addition & 0 deletions libcxx/include/__algorithm/inplace_merge.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <__algorithm/rotate.h>
#include <__algorithm/upper_bound.h>
#include <__config>
#include <__cstddef/ptrdiff_t.h>
#include <__functional/identity.h>
#include <__iterator/advance.h>
#include <__iterator/distance.h>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/mismatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <__algorithm/simd_utils.h>
#include <__algorithm/unwrap_iter.h>
#include <__config>
#include <__cstddef/size_t.h>
#include <__functional/identity.h>
#include <__iterator/aliasing_iterator.h>
#include <__type_traits/desugars_to.h>
Expand All @@ -25,7 +26,6 @@
#include <__utility/move.h>
#include <__utility/pair.h>
#include <__utility/unreachable.h>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/shuffle.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

#include <__algorithm/iterator_operations.h>
#include <__config>
#include <__cstddef/ptrdiff_t.h>
#include <__iterator/iterator_traits.h>
#include <__random/uniform_int_distribution.h>
#include <__utility/forward.h>
#include <__utility/move.h>
#include <__utility/swap.h>
#include <cstddef>
#include <cstdint>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__algorithm/simd_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
#include <__bit/countl.h>
#include <__bit/countr.h>
#include <__config>
#include <__cstddef/size_t.h>
#include <__type_traits/is_arithmetic.h>
#include <__type_traits/is_same.h>
#include <__utility/integer_sequence.h>
#include <cstddef>
#include <cstdint>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
1 change: 1 addition & 0 deletions libcxx/include/__algorithm/stable_partition.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <__algorithm/iterator_operations.h>
#include <__algorithm/rotate.h>
#include <__config>
#include <__cstddef/ptrdiff_t.h>
#include <__iterator/advance.h>
#include <__iterator/distance.h>
#include <__iterator/iterator_traits.h>
Expand Down
1 change: 1 addition & 0 deletions libcxx/include/__algorithm/stable_sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <__algorithm/iterator_operations.h>
#include <__algorithm/sort.h>
#include <__config>
#include <__cstddef/ptrdiff_t.h>
#include <__debug_utils/strict_weak_ordering_check.h>
#include <__iterator/iterator_traits.h>
#include <__memory/destruct_n.h>
Expand Down
3 changes: 2 additions & 1 deletion libcxx/include/__atomic/aliases.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
#include <__atomic/contention_t.h>
#include <__atomic/is_always_lock_free.h>
#include <__config>
#include <__cstddef/ptrdiff_t.h>
#include <__cstddef/size_t.h>
#include <__type_traits/conditional.h>
#include <__type_traits/make_unsigned.h>
#include <cstddef>
#include <cstdint>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__atomic/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <__atomic/cxx_atomic_impl.h>
#include <__atomic/memory_order.h>
#include <__config>
#include <__cstddef/ptrdiff_t.h>
#include <__functional/operations.h>
#include <__memory/addressof.h>
#include <__type_traits/enable_if.h>
Expand All @@ -25,7 +26,6 @@
#include <__type_traits/remove_pointer.h>
#include <__type_traits/remove_volatile.h>
#include <__utility/forward.h>
#include <cstddef>
#include <cstring>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
4 changes: 2 additions & 2 deletions libcxx/include/__atomic/atomic_ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@
#include <__concepts/arithmetic.h>
#include <__concepts/same_as.h>
#include <__config>
#include <__cstddef/byte.h>
#include <__cstddef/ptrdiff_t.h>
#include <__memory/addressof.h>
#include <__type_traits/has_unique_object_representation.h>
#include <__type_traits/is_trivially_copyable.h>
#include <cstddef>
#include <cstdint>
#include <cstring>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__atomic/cxx_atomic_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
#include <__atomic/memory_order.h>
#include <__atomic/to_gcc_order.h>
#include <__config>
#include <__cstddef/ptrdiff_t.h>
#include <__memory/addressof.h>
#include <__type_traits/is_assignable.h>
#include <__type_traits/is_trivially_copyable.h>
#include <__type_traits/remove_const.h>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__charconv/to_chars_integral.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <__charconv/to_chars_result.h>
#include <__charconv/traits.h>
#include <__config>
#include <__cstddef/ptrdiff_t.h>
#include <__system_error/errc.h>
#include <__type_traits/enable_if.h>
#include <__type_traits/integral_constant.h>
Expand All @@ -26,7 +27,6 @@
#include <__type_traits/make_32_64_or_128_bit.h>
#include <__type_traits/make_unsigned.h>
#include <__utility/unreachable.h>
#include <cstddef>
#include <cstdint>
#include <limits>

Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__compare/common_comparison_category.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

#include <__compare/ordering.h>
#include <__config>
#include <__cstddef/size_t.h>
#include <__type_traits/is_same.h>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__concepts/swappable.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <__concepts/common_reference_with.h>
#include <__concepts/constructible.h>
#include <__config>
#include <__cstddef/size_t.h>
#include <__type_traits/extent.h>
#include <__type_traits/is_nothrow_assignable.h>
#include <__type_traits/is_nothrow_constructible.h>
Expand All @@ -22,7 +23,6 @@
#include <__utility/forward.h>
#include <__utility/move.h>
#include <__utility/swap.h>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
3 changes: 2 additions & 1 deletion libcxx/include/__coroutine/coroutine_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@

#include <__assert>
#include <__config>
#include <__cstddef/nullptr_t.h>
#include <__cstddef/size_t.h>
#include <__functional/hash.h>
#include <__memory/addressof.h>
#include <__type_traits/remove_cv.h>
#include <compare>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
1 change: 0 additions & 1 deletion libcxx/include/__exception/exception_ptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include <__memory/addressof.h>
#include <__memory/construct_at.h>
#include <__type_traits/decay.h>
#include <cstddef>
#include <cstdlib>
#include <new>
#include <typeinfo>
Expand Down
1 change: 0 additions & 1 deletion libcxx/include/__exception/nested_exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <__type_traits/is_final.h>
#include <__type_traits/is_polymorphic.h>
#include <__utility/forward.h>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
1 change: 0 additions & 1 deletion libcxx/include/__exception/operations.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#define _LIBCPP___EXCEPTION_OPERATIONS_H

#include <__config>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
1 change: 0 additions & 1 deletion libcxx/include/__filesystem/directory_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <__ranges/enable_view.h>
#include <__system_error/error_code.h>
#include <__utility/move.h>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
1 change: 0 additions & 1 deletion libcxx/include/__filesystem/path.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <__type_traits/remove_const.h>
#include <__type_traits/remove_pointer.h>
#include <__utility/move.h>
#include <cstddef>
#include <string>
#include <string_view>

Expand Down
3 changes: 0 additions & 3 deletions libcxx/include/__filesystem/path_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
#include <__config>
#include <__filesystem/path.h>
#include <__iterator/iterator_traits.h>
#include <cstddef>
#include <string>
#include <string_view>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
1 change: 0 additions & 1 deletion libcxx/include/__filesystem/recursive_directory_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include <__ranges/enable_view.h>
#include <__system_error/error_code.h>
#include <__utility/move.h>
#include <cstddef>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
1 change: 0 additions & 1 deletion libcxx/include/__format/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include <__type_traits/conditional.h>
#include <__utility/exception_guard.h>
#include <__utility/move.h>
#include <cstddef>
#include <string_view>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__format/escaped_output_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

#include <__algorithm/ranges_upper_bound.h>
#include <__config>
#include <cstddef>
#include <__cstddef/ptrdiff_t.h>
#include <cstdint>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__format/extended_grapheme_cluster_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@

#include <__algorithm/ranges_upper_bound.h>
#include <__config>
#include <__cstddef/ptrdiff_t.h>
#include <__iterator/access.h>
#include <cstddef>
#include <cstdint>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__format/format_args.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
#define _LIBCPP___FORMAT_FORMAT_ARGS_H

#include <__config>
#include <__cstddef/size_t.h>
#include <__format/format_arg.h>
#include <__format/format_arg_store.h>
#include <__fwd/format.h>
#include <cstddef>
#include <cstdint>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
1 change: 0 additions & 1 deletion libcxx/include/__format/format_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <__memory/addressof.h>
#include <__utility/move.h>
#include <__variant/monostate.h>
#include <cstddef>

#ifndef _LIBCPP_HAS_NO_LOCALIZATION
# include <__locale>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__format/format_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

#include <__assert>
#include <__config>
#include <__cstddef/size_t.h>
#include <__format/format_error.h>
#include <__iterator/concepts.h>
#include <__iterator/iterator_traits.h> // iter_value_t
#include <cstddef>
#include <cstdint>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
1 change: 0 additions & 1 deletion libcxx/include/__format/formatter_floating_point.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <__utility/move.h>
#include <__utility/unreachable.h>
#include <cmath>
#include <cstddef>

#ifndef _LIBCPP_HAS_NO_LOCALIZATION
# include <__locale>
Expand Down
1 change: 0 additions & 1 deletion libcxx/include/__format/formatter_output.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <__memory/pointer_traits.h>
#include <__utility/move.h>
#include <__utility/unreachable.h>
#include <cstddef>
#include <string_view>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__format/formatter_pointer.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
#define _LIBCPP___FORMAT_FORMATTER_POINTER_H

#include <__config>
#include <__cstddef/nullptr_t.h>
#include <__format/concepts.h>
#include <__format/format_parse_context.h>
#include <__format/formatter.h>
#include <__format/formatter_integral.h>
#include <__format/formatter_output.h>
#include <__format/parser_std_format_spec.h>
#include <cstddef>
#include <cstdint>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__format/indic_conjunct_break_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@

#include <__algorithm/ranges_upper_bound.h>
#include <__config>
#include <__cstddef/ptrdiff_t.h>
#include <__iterator/access.h>
#include <cstddef>
#include <cstdint>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__format/width_estimation_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

#include <__algorithm/ranges_upper_bound.h>
#include <__config>
#include <cstddef>
#include <__cstddef/ptrdiff_t.h>
#include <cstdint>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
1 change: 0 additions & 1 deletion libcxx/include/__functional/bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <__type_traits/decay.h>
#include <__type_traits/is_reference_wrapper.h>
#include <__type_traits/is_void.h>
#include <cstddef>
#include <tuple>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
1 change: 0 additions & 1 deletion libcxx/include/__functional/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include <__type_traits/underlying_type.h>
#include <__utility/pair.h>
#include <__utility/swap.h>
#include <cstddef>
#include <cstdint>
#include <cstring>

Expand Down
1 change: 1 addition & 0 deletions libcxx/include/__hash_table
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <__assert>
#include <__bit/countl.h>
#include <__config>
#include <__cstddef/ptrdiff_t.h>
#include <__functional/hash.h>
#include <__functional/invoke.h>
#include <__iterator/iterator_traits.h>
Expand Down
2 changes: 1 addition & 1 deletion libcxx/include/__iterator/access.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define _LIBCPP___ITERATOR_ACCESS_H

#include <__config>
#include <cstddef>
#include <__cstddef/size_t.h>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
Expand Down
Loading

0 comments on commit 2bfee2d

Please sign in to comment.