Skip to content

Commit

Permalink
[libc++] Include the rest of the detail headers by version in the umb…
Browse files Browse the repository at this point in the history
…rella headers (llvm#96032)

This is a follow-up to llvm#83740.
  • Loading branch information
philnik777 authored Jul 18, 2024
1 parent 1ce8989 commit dfddc0c
Show file tree
Hide file tree
Showing 55 changed files with 417 additions and 236 deletions.
1 change: 1 addition & 0 deletions libcxx/include/__type_traits/make_signed.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#define _LIBCPP___TYPE_TRAITS_MAKE_SIGNED_H

#include <__config>
#include <__type_traits/copy_cv.h>
#include <__type_traits/is_enum.h>
#include <__type_traits/is_integral.h>
#include <__type_traits/nat.h>
Expand Down
5 changes: 4 additions & 1 deletion libcxx/include/atomic
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,6 @@ template <class T>
#include <__atomic/atomic_flag.h>
#include <__atomic/atomic_init.h>
#include <__atomic/atomic_lock_free.h>
#include <__atomic/atomic_ref.h>
#include <__atomic/atomic_sync.h>
#include <__atomic/check_memory_order.h>
#include <__atomic/contention_t.h>
Expand All @@ -610,6 +609,10 @@ template <class T>
#include <__atomic/memory_order.h>
#include <version>

#if _LIBCPP_STD_VER >= 20
# include <__atomic/atomic_ref.h>
#endif

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
Expand Down
18 changes: 14 additions & 4 deletions libcxx/include/expected
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,24 @@ namespace std {
*/

#include <__config>
#include <__expected/bad_expected_access.h>
#include <__expected/expected.h>
#include <__expected/unexpect.h>
#include <__expected/unexpected.h>

#if _LIBCPP_STD_VER >= 23
# include <__expected/bad_expected_access.h>
# include <__expected/expected.h>
# include <__expected/unexpect.h>
# include <__expected/unexpected.h>
#endif

#include <version>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif

#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <cstddef>
# include <initializer_list>
# include <new>
#endif

#endif // _LIBCPP_EXPECTED
36 changes: 20 additions & 16 deletions libcxx/include/filesystem
Original file line number Diff line number Diff line change
Expand Up @@ -534,22 +534,26 @@ inline constexpr bool std::ranges::enable_view<std::filesystem::recursive_direct
*/

#include <__config>
#include <__filesystem/copy_options.h>
#include <__filesystem/directory_entry.h>
#include <__filesystem/directory_iterator.h>
#include <__filesystem/directory_options.h>
#include <__filesystem/file_status.h>
#include <__filesystem/file_time_type.h>
#include <__filesystem/file_type.h>
#include <__filesystem/filesystem_error.h>
#include <__filesystem/operations.h>
#include <__filesystem/path.h>
#include <__filesystem/path_iterator.h>
#include <__filesystem/perm_options.h>
#include <__filesystem/perms.h>
#include <__filesystem/recursive_directory_iterator.h>
#include <__filesystem/space_info.h>
#include <__filesystem/u8path.h>

#if _LIBCPP_STD_VER >= 17
# include <__filesystem/copy_options.h>
# include <__filesystem/directory_entry.h>
# include <__filesystem/directory_iterator.h>
# include <__filesystem/directory_options.h>
# include <__filesystem/file_status.h>
# include <__filesystem/file_time_type.h>
# include <__filesystem/file_type.h>
# include <__filesystem/filesystem_error.h>
# include <__filesystem/operations.h>
# include <__filesystem/path.h>
# include <__filesystem/path_iterator.h>
# include <__filesystem/perm_options.h>
# include <__filesystem/perms.h>
# include <__filesystem/recursive_directory_iterator.h>
# include <__filesystem/space_info.h>
# include <__filesystem/u8path.h>
#endif

#include <version>

// standard-mandated includes
Expand Down
81 changes: 53 additions & 28 deletions libcxx/include/format
Original file line number Diff line number Diff line change
Expand Up @@ -189,40 +189,65 @@ namespace std {
*/

#include <__config>
#include <__format/buffer.h>
#include <__format/concepts.h>
#include <__format/container_adaptor.h>
#include <__format/enable_insertable.h>
#include <__format/escaped_output_table.h>
#include <__format/extended_grapheme_cluster_table.h>
#include <__format/format_arg.h>
#include <__format/format_arg_store.h>
#include <__format/format_args.h>
#include <__format/format_context.h>
#include <__format/format_error.h>
#include <__format/format_functions.h>
#include <__format/format_parse_context.h>
#include <__format/format_string.h>
#include <__format/format_to_n_result.h>
#include <__format/formatter.h>
#include <__format/formatter_bool.h>
#include <__format/formatter_char.h>
#include <__format/formatter_floating_point.h>
#include <__format/formatter_integer.h>
#include <__format/formatter_pointer.h>
#include <__format/formatter_string.h>
#include <__format/formatter_tuple.h>
#include <__format/parser_std_format_spec.h>
#include <__format/range_default_formatter.h>
#include <__format/range_formatter.h>
#include <__format/unicode.h>
#include <__fwd/format.h>

#if _LIBCPP_STD_VER >= 20
# include <__format/buffer.h>
# include <__format/concepts.h>
# include <__format/container_adaptor.h>
# include <__format/enable_insertable.h>
# include <__format/escaped_output_table.h>
# include <__format/extended_grapheme_cluster_table.h>
# include <__format/format_arg.h>
# include <__format/format_arg_store.h>
# include <__format/format_args.h>
# include <__format/format_context.h>
# include <__format/format_error.h>
# include <__format/format_functions.h>
# include <__format/format_parse_context.h>
# include <__format/format_string.h>
# include <__format/format_to_n_result.h>
# include <__format/formatter.h>
# include <__format/formatter_bool.h>
# include <__format/formatter_char.h>
# include <__format/formatter_floating_point.h>
# include <__format/formatter_integer.h>
# include <__format/formatter_pointer.h>
# include <__format/formatter_string.h>
# include <__format/formatter_tuple.h>
# include <__format/parser_std_format_spec.h>
# include <__format/range_default_formatter.h>
# include <__format/range_formatter.h>
# include <__format/unicode.h>
# include <__fwd/format.h>
#endif

#include <version>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif

#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <array>
# include <cctype>
# include <cerrno>
# include <clocale>
# include <cmath>
# include <cstddef>
# include <cstdint>
# include <cstdlib>
# include <cstring>
# include <cwchar>
# include <initializer_list>
# include <limits>
# include <new>
# include <optional>
# include <stdexcept>
# include <string>
# include <string_view>
# include <tuple>
#endif

#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <locale>
# include <queue>
Expand Down
1 change: 1 addition & 0 deletions libcxx/include/forward_list
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ template <class T, class Allocator, class Predicate>
#include <__type_traits/is_nothrow_constructible.h>
#include <__type_traits/is_pointer.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>
Expand Down
47 changes: 33 additions & 14 deletions libcxx/include/functional
Original file line number Diff line number Diff line change
Expand Up @@ -527,41 +527,60 @@ POLICY: For non-variadic implementations, the number of arguments is limited
*/

#include <__algorithm/search.h>
#include <__compare/compare_three_way.h>
#include <__config>

#include <__functional/binary_function.h>
#include <__functional/binary_negate.h>
#include <__functional/bind.h>
#include <__functional/bind_back.h>
#include <__functional/bind_front.h>
#include <__functional/binder1st.h>
#include <__functional/binder2nd.h>
#include <__functional/boyer_moore_searcher.h>
#include <__functional/compose.h>
#include <__functional/default_searcher.h>
#include <__functional/function.h>
#include <__functional/hash.h>
#include <__functional/identity.h>
#include <__functional/invoke.h>
#include <__functional/mem_fn.h> // TODO: deprecate
#include <__functional/mem_fun_ref.h>
#include <__functional/not_fn.h>
#include <__functional/operations.h>
#include <__functional/pointer_to_binary_function.h>
#include <__functional/pointer_to_unary_function.h>
#include <__functional/ranges_operations.h>
#include <__functional/reference_wrapper.h>
#include <__functional/unary_function.h>
#include <__functional/unary_negate.h>
#include <__type_traits/unwrap_ref.h>
#include <__utility/forward.h>

#ifndef _LIBCPP_CXX03_LANG
# include <__functional/function.h>
#endif

#if _LIBCPP_STD_VER >= 17
# include <__functional/boyer_moore_searcher.h>
# include <__functional/default_searcher.h>
# include <__functional/invoke.h>
# include <__functional/not_fn.h>
#endif

#if _LIBCPP_STD_VER >= 20
# include <__functional/bind_back.h>
# include <__functional/bind_front.h>
# include <__functional/identity.h>
# include <__functional/ranges_operations.h>
# include <__type_traits/unwrap_ref.h>
#endif

#include <version>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif

#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && defined(_LIBCPP_CXX03_LANG)
# include <limits>
# include <new>
#endif

#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 14
# include <array>
# include <initializer_list>
# include <unordered_map>
# include <vector>
#endif

#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <atomic>
# include <concepts>
Expand Down
56 changes: 33 additions & 23 deletions libcxx/include/iterator
Original file line number Diff line number Diff line change
Expand Up @@ -683,43 +683,49 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
#include <__iterator/access.h>
#include <__iterator/advance.h>
#include <__iterator/back_insert_iterator.h>
#include <__iterator/bounded_iter.h>
#include <__iterator/common_iterator.h>
#include <__iterator/concepts.h>
#include <__iterator/counted_iterator.h>
#include <__iterator/data.h>
#include <__iterator/default_sentinel.h>
#include <__iterator/distance.h>
#include <__iterator/empty.h>
#include <__iterator/erase_if_container.h>
#include <__iterator/front_insert_iterator.h>
#include <__iterator/incrementable_traits.h>
#include <__iterator/indirectly_comparable.h>
#include <__iterator/insert_iterator.h>
#include <__iterator/istream_iterator.h>
#include <__iterator/istreambuf_iterator.h>
#include <__iterator/iter_move.h>
#include <__iterator/iter_swap.h>
#include <__iterator/iterator.h>
#include <__iterator/iterator_traits.h>
#include <__iterator/mergeable.h>
#include <__iterator/move_iterator.h>
#include <__iterator/move_sentinel.h>
#include <__iterator/next.h>
#include <__iterator/ostream_iterator.h>
#include <__iterator/ostreambuf_iterator.h>
#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>
#include <__iterator/sortable.h>
#include <__iterator/unreachable_sentinel.h>
#include <__iterator/wrap_iter.h>
#include <__memory/addressof.h>
#include <__memory/pointer_traits.h>

#if _LIBCPP_STD_VER >= 14
# include <__iterator/reverse_access.h>
#endif

#if _LIBCPP_STD_VER >= 17
# include <__iterator/data.h>
# include <__iterator/empty.h>
# include <__iterator/size.h>
#endif

#if _LIBCPP_STD_VER >= 20
# include <__iterator/common_iterator.h>
# include <__iterator/concepts.h>
# include <__iterator/counted_iterator.h>
# include <__iterator/default_sentinel.h>
# include <__iterator/incrementable_traits.h>
# include <__iterator/indirectly_comparable.h>
# include <__iterator/iter_move.h>
# include <__iterator/iter_swap.h>
# include <__iterator/mergeable.h>
# include <__iterator/move_sentinel.h>
# include <__iterator/permutable.h>
# include <__iterator/projected.h>
# include <__iterator/readable_traits.h>
# include <__iterator/sortable.h>
# include <__iterator/unreachable_sentinel.h>
#endif

#include <version>

// standard-mandated includes
Expand All @@ -732,6 +738,10 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
# pragma GCC system_header
#endif

#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 17
# include <variant>
#endif

#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <cstdlib>
# include <exception>
Expand Down
27 changes: 20 additions & 7 deletions libcxx/include/mdspan
Original file line number Diff line number Diff line change
Expand Up @@ -409,17 +409,30 @@ namespace std {
#define _LIBCPP_MDSPAN

#include <__config>
#include <__fwd/mdspan.h>
#include <__mdspan/default_accessor.h>
#include <__mdspan/extents.h>
#include <__mdspan/layout_left.h>
#include <__mdspan/layout_right.h>
#include <__mdspan/layout_stride.h>
#include <__mdspan/mdspan.h>

#if _LIBCPP_STD_VER >= 23
# include <__fwd/mdspan.h>
# include <__mdspan/default_accessor.h>
# include <__mdspan/extents.h>
# include <__mdspan/layout_left.h>
# include <__mdspan/layout_right.h>
# include <__mdspan/layout_stride.h>
# include <__mdspan/mdspan.h>
#endif

#include <version>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif

#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <array>
# include <cinttypes>
# include <concepts>
# include <cstddef>
# include <limits>
# include <span>
#endif

#endif // _LIBCPP_MDSPAN
Loading

0 comments on commit dfddc0c

Please sign in to comment.