diff --git a/libcxx/include/experimental/iterator b/libcxx/include/experimental/iterator index 2488bcfc155a8d..5075de537b6ac2 100644 --- a/libcxx/include/experimental/iterator +++ b/libcxx/include/experimental/iterator @@ -52,23 +52,25 @@ 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> -#include - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif +#if 0 +#else // 0 +# 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> +# include + +# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +# endif _LIBCPP_PUSH_MACROS -#include <__undef_macros> +# include <__undef_macros> -#if _LIBCPP_STD_VER >= 14 +# if _LIBCPP_STD_VER >= 14 _LIBCPP_BEGIN_NAMESPACE_LFTS @@ -117,14 +119,15 @@ make_ostream_joiner(basic_ostream<_CharT, _Traits>& __os, _Delim&& __d) { _LIBCPP_END_NAMESPACE_LFTS -#endif // _LIBCPP_STD_VER >= 14 +# endif // _LIBCPP_STD_VER >= 14 _LIBCPP_POP_MACROS -#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -# include -# include -#endif +# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +# include +# include +# endif +#endif // 0 #endif // _LIBCPP_EXPERIMENTAL_ITERATOR diff --git a/libcxx/include/experimental/memory b/libcxx/include/experimental/memory index 48e42a0a88a649..cb02ecb8e2bee7 100644 --- a/libcxx/include/experimental/memory +++ b/libcxx/include/experimental/memory @@ -49,27 +49,29 @@ public: } */ -#include <__config> -#include <__cstddef/nullptr_t.h> -#include <__cstddef/size_t.h> -#include <__functional/hash.h> -#include <__functional/operations.h> -#include <__type_traits/add_lvalue_reference.h> -#include <__type_traits/add_pointer.h> -#include <__type_traits/common_type.h> -#include <__type_traits/enable_if.h> -#include <__type_traits/is_convertible.h> -#include - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif - -#ifdef _LIBCPP_ENABLE_EXPERIMENTAL +#if 0 +#else // 0 +# include <__config> +# include <__cstddef/nullptr_t.h> +# include <__cstddef/size_t.h> +# include <__functional/hash.h> +# include <__functional/operations.h> +# include <__type_traits/add_lvalue_reference.h> +# include <__type_traits/add_pointer.h> +# include <__type_traits/common_type.h> +# include <__type_traits/enable_if.h> +# include <__type_traits/is_convertible.h> +# include + +# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +# endif + +# ifdef _LIBCPP_ENABLE_EXPERIMENTAL _LIBCPP_BEGIN_NAMESPACE_LFTS_V2 -# if _LIBCPP_STD_VER >= 17 +# if _LIBCPP_STD_VER >= 17 template class observer_ptr { @@ -172,7 +174,7 @@ _LIBCPP_HIDE_FROM_ABI bool operator>=(observer_ptr<_W1> __a, observer_ptr<_W2> _ return !(__a < __b); } -# endif // _LIBCPP_STD_VER >= 17 +# endif // _LIBCPP_STD_VER >= 17 _LIBCPP_END_NAMESPACE_LFTS_V2 @@ -180,22 +182,23 @@ _LIBCPP_BEGIN_NAMESPACE_STD // hash -# if _LIBCPP_STD_VER >= 17 +# if _LIBCPP_STD_VER >= 17 template struct hash> { _LIBCPP_HIDE_FROM_ABI size_t operator()(const experimental::observer_ptr<_Tp>& __ptr) const noexcept { return hash<_Tp*>()(__ptr.get()); } }; -# endif // _LIBCPP_STD_VER >= 17 +# endif // _LIBCPP_STD_VER >= 17 _LIBCPP_END_NAMESPACE_STD -#endif // _LIBCPP_ENABLE_EXPERIMENTAL +# endif // _LIBCPP_ENABLE_EXPERIMENTAL -#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -# include -#endif +# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +# include +# endif +#endif // 0 #endif /* _LIBCPP_EXPERIMENTAL_MEMORY */ diff --git a/libcxx/include/experimental/propagate_const b/libcxx/include/experimental/propagate_const index 8466d4e9c7ef3c..4d06e9f844acfa 100644 --- a/libcxx/include/experimental/propagate_const +++ b/libcxx/include/experimental/propagate_const @@ -107,39 +107,41 @@ */ -#include <__config> -#include <__cstddef/nullptr_t.h> -#include <__cstddef/size_t.h> -#include <__functional/operations.h> -#include <__fwd/functional.h> -#include <__type_traits/conditional.h> -#include <__type_traits/decay.h> -#include <__type_traits/enable_if.h> -#include <__type_traits/is_array.h> -#include <__type_traits/is_constructible.h> -#include <__type_traits/is_convertible.h> -#include <__type_traits/is_function.h> -#include <__type_traits/is_pointer.h> -#include <__type_traits/is_reference.h> -#include <__type_traits/is_same.h> -#include <__type_traits/is_swappable.h> -#include <__type_traits/remove_cv.h> -#include <__type_traits/remove_pointer.h> -#include <__type_traits/remove_reference.h> -#include <__utility/declval.h> -#include <__utility/forward.h> -#include <__utility/move.h> -#include <__utility/swap.h> -#include - -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif +#if 0 +#else // 0 +# include <__config> +# include <__cstddef/nullptr_t.h> +# include <__cstddef/size_t.h> +# include <__functional/operations.h> +# include <__fwd/functional.h> +# include <__type_traits/conditional.h> +# include <__type_traits/decay.h> +# include <__type_traits/enable_if.h> +# include <__type_traits/is_array.h> +# include <__type_traits/is_constructible.h> +# include <__type_traits/is_convertible.h> +# include <__type_traits/is_function.h> +# include <__type_traits/is_pointer.h> +# include <__type_traits/is_reference.h> +# include <__type_traits/is_same.h> +# include <__type_traits/is_swappable.h> +# include <__type_traits/remove_cv.h> +# include <__type_traits/remove_pointer.h> +# include <__type_traits/remove_reference.h> +# include <__utility/declval.h> +# include <__utility/forward.h> +# include <__utility/move.h> +# include <__utility/swap.h> +# include + +# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +# endif _LIBCPP_PUSH_MACROS -#include <__undef_macros> +# include <__undef_macros> -#if _LIBCPP_STD_VER >= 14 +# if _LIBCPP_STD_VER >= 14 _LIBCPP_BEGIN_NAMESPACE_LFTS_V2 @@ -481,13 +483,14 @@ struct greater_equal> { _LIBCPP_END_NAMESPACE_STD -#endif // _LIBCPP_STD_VER >= 14 +# endif // _LIBCPP_STD_VER >= 14 _LIBCPP_POP_MACROS -#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -# include -#endif +# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +# include +# endif +#endif // 0 #endif // _LIBCPP_EXPERIMENTAL_PROPAGATE_CONST diff --git a/libcxx/include/experimental/simd b/libcxx/include/experimental/simd index 1a868513d160b6..374ab57cdbca55 100644 --- a/libcxx/include/experimental/simd +++ b/libcxx/include/experimental/simd @@ -75,18 +75,21 @@ inline namespace parallelism_v2 { # pragma GCC system_header #endif -#include <__config> -#include -#include -#include -#include -#include -#include -#include -#include - -#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -#endif +#if 0 +#else // 0 +# include <__config> +# include +# include +# include +# include +# include +# include +# include +# include + +# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +# endif +#endif // 0 #endif /* _LIBCPP_EXPERIMENTAL_SIMD */ diff --git a/libcxx/include/experimental/type_traits b/libcxx/include/experimental/type_traits index 6980fc3c51e465..0da95b79f8ab77 100644 --- a/libcxx/include/experimental/type_traits +++ b/libcxx/include/experimental/type_traits @@ -68,16 +68,18 @@ inline namespace fundamentals_v1 { */ -#include <__config> +#if 0 +#else // 0 +# include <__config> -#if _LIBCPP_STD_VER >= 14 +# if _LIBCPP_STD_VER >= 14 -# include -# include +# include +# include -# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -# endif +# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +# endif _LIBCPP_BEGIN_NAMESPACE_LFTS @@ -148,10 +150,11 @@ constexpr bool is_detected_convertible_v = is_detected_convertible<_To, _Op, _Ar _LIBCPP_END_NAMESPACE_LFTS -# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -# endif +# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +# endif -#endif /* _LIBCPP_STD_VER >= 14 */ +# endif /* _LIBCPP_STD_VER >= 14 */ +#endif // 0 #endif /* _LIBCPP_EXPERIMENTAL_TYPE_TRAITS */ diff --git a/libcxx/include/experimental/utility b/libcxx/include/experimental/utility index 00151b967e496d..1cb9c6a3617a8e 100644 --- a/libcxx/include/experimental/utility +++ b/libcxx/include/experimental/utility @@ -30,12 +30,14 @@ inline namespace fundamentals_v1 { */ -#include <__config> -#include +#if 0 +#else // 0 +# include <__config> +# include -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif +# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +# endif _LIBCPP_BEGIN_NAMESPACE_LFTS @@ -43,8 +45,9 @@ struct _LIBCPP_TEMPLATE_VIS erased_type {}; _LIBCPP_END_NAMESPACE_LFTS -#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -#endif +# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +# endif +#endif // 0 #endif /* _LIBCPP_EXPERIMENTAL_UTILITY */ diff --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map index 7b5b31c4081788..c9e35479b88c89 100644 --- a/libcxx/include/ext/hash_map +++ b/libcxx/include/ext/hash_map @@ -201,23 +201,25 @@ template */ -#include <__config> -#include <__hash_table> -#include -#include -#include - -#if defined(__DEPRECATED) && __DEPRECATED -# if defined(_LIBCPP_WARNING) +#if 0 +#else // 0 +# include <__config> +# include <__hash_table> +# include +# include +# include + +# if defined(__DEPRECATED) && __DEPRECATED +# if defined(_LIBCPP_WARNING) _LIBCPP_WARNING("Use of the header is deprecated. Migrate to ") -# else -# warning Use of the header is deprecated. Migrate to +# else +# warning Use of the header is deprecated. Migrate to +# endif # endif -#endif -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif +# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +# endif namespace __gnu_cxx { @@ -312,17 +314,17 @@ public: _LIBCPP_HIDE_FROM_ABI explicit __hash_map_node_destructor(allocator_type& __na) : __na_(__na), __first_constructed(false), __second_constructed(false) {} -#ifndef _LIBCPP_CXX03_LANG +# ifndef _LIBCPP_CXX03_LANG _LIBCPP_HIDE_FROM_ABI __hash_map_node_destructor(std::__hash_node_destructor&& __x) : __na_(__x.__na_), __first_constructed(__x.__value_constructed), __second_constructed(__x.__value_constructed) { __x.__value_constructed = false; } -#else // _LIBCPP_CXX03_LANG +# else // _LIBCPP_CXX03_LANG _LIBCPP_HIDE_FROM_ABI __hash_map_node_destructor(const std::__hash_node_destructor& __x) : __na_(__x.__na_), __first_constructed(__x.__value_constructed), __second_constructed(__x.__value_constructed) { const_cast(__x.__value_constructed) = false; } -#endif // _LIBCPP_CXX03_LANG +# endif // _LIBCPP_CXX03_LANG _LIBCPP_HIDE_FROM_ABI void operator()(pointer __p) { if (__second_constructed) @@ -863,10 +865,11 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const hash_multimap<_Key, _Tp, _Has } // namespace __gnu_cxx -#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -# include -# include -#endif +# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +# include +# include +# endif +#endif // 0 #endif // _LIBCPP_HASH_MAP diff --git a/libcxx/include/ext/hash_set b/libcxx/include/ext/hash_set index 1ab259b59979f3..073fcf2fd9911b 100644 --- a/libcxx/include/ext/hash_set +++ b/libcxx/include/ext/hash_set @@ -192,23 +192,25 @@ template */ -#include <__config> -#include <__hash_table> -#include -#include -#include - -#if defined(__DEPRECATED) && __DEPRECATED -# if defined(_LIBCPP_WARNING) +#if 0 +#else // 0 +# include <__config> +# include <__hash_table> +# include +# include +# include + +# if defined(__DEPRECATED) && __DEPRECATED +# if defined(_LIBCPP_WARNING) _LIBCPP_WARNING("Use of the header is deprecated. Migrate to ") -# else -# warning Use of the header is deprecated. Migrate to +# else +# warning Use of the header is deprecated. Migrate to +# endif # endif -#endif -#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -# pragma GCC system_header -#endif +# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) +# pragma GCC system_header +# endif namespace __gnu_cxx { @@ -575,10 +577,11 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const hash_multiset<_Value, _Hash, } // namespace __gnu_cxx -#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 -# include -# include -# include -#endif +# if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +# include +# include +# endif +#endif // 0 #endif // _LIBCPP_HASH_SET