Skip to content

Commit

Permalink
[libc++][NFC] Fix some standard-mandated includes comments
Browse files Browse the repository at this point in the history
Reviewed By: ldionne, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D134447
  • Loading branch information
philnik777 committed Sep 27, 2022
1 parent 163cb33 commit 473a160
Show file tree
Hide file tree
Showing 19 changed files with 44 additions and 2 deletions.
2 changes: 2 additions & 0 deletions libcxx/include/algorithm
Original file line number Diff line number Diff line change
Expand Up @@ -1899,6 +1899,8 @@ template <class BidirectionalIterator, class Compare>
#include <__algorithm/upper_bound.h>

// standard-mandated includes

// [algorithm.syn]
#include <initializer_list>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/bitset
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ template <size_t N> struct hash<std::bitset<N>>;
#include <version>

// standard-mandated includes

// [bitset.syn]
#include <iosfwd>
#include <string>

Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/chrono
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,8 @@ constexpr chrono::year operator ""y(unsigned lo
#include <version>

// standard-mandated includes

// [time.syn]
#include <compare>

#if !defined(_LIBCPP_HAS_NO_LOCALIZATION) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT) && _LIBCPP_STD_VER > 17
Expand Down
4 changes: 4 additions & 0 deletions libcxx/include/cinttypes
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int

#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>

// standard-mandated includes

// [cinttypes.syn]
#include <cstdint>

#include <inttypes.h>
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/coroutine
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ struct suspend_always;
#include <version>

// standard-mandated includes

// [coroutine.syn]
#include <compare>

#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/filesystem
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,8 @@ inline constexpr bool std::ranges::enable_view<std::filesystem::recursive_direct
#include <version>

// standard-mandated includes

// [fs.filesystem.syn]
#include <compare>

#if defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/ios
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ storage-class-specifier const error_category& iostream_category() noexcept;
#include <version>

// standard-mandated includes

// [ios.syn]
#include <iosfwd>

#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/iostream
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ extern wostream wclog;
#include <version>

// standard-mandated includes

// [iostream.syn]
#include <ios>
#include <istream>
#include <ostream>
Expand Down
8 changes: 6 additions & 2 deletions libcxx/include/iterator
Original file line number Diff line number Diff line change
Expand Up @@ -717,13 +717,17 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
#include <__iterator/wrap_iter.h>
#include <__memory/addressof.h>
#include <__memory/pointer_traits.h>
#include <compare>
#include <concepts> // Mandated by the Standard.
#include <cstddef>
#include <initializer_list>
#include <type_traits>
#include <version>

// standard-mandated includes

// [iterator.synopsis]
#include <compare>
#include <concepts>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/memory
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,8 @@ template<size_t N, class T>
#include <version>

// standard-mandated includes

// [memory.syn]
#include <compare>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/optional
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ template<class T>
#include <version>

// standard-mandated includes

// [optional.syn]
#include <compare>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/queue
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ template <class T, class Container, class Compare>
#include <version>

// standard-mandated includes

// [queue.syn]
#include <compare>
#include <initializer_list>

Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/random
Original file line number Diff line number Diff line change
Expand Up @@ -1719,6 +1719,8 @@ class piecewise_linear_distribution
#include <version>

// standard-mandated includes

// [rand.synopsis]
#include <initializer_list>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/stack
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ template <class T, class Container>
#include <version>

// standard-mandated includes

// [stack.syn]
#include <compare>
#include <initializer_list>

Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/system_error
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ template <> struct hash<std::error_condition>;
#include <version>

// standard-mandated includes

// [system.error.syn]
#include <compare>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/thread
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
#include <version>

// standard-mandated includes

// [thread.syn]
#include <compare>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/tuple
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,8 @@ template <class... Types>
#include <version>

// standard-mandated includes

// [tuple.syn]
#include <compare>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/valarray
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@ template <class T> unspecified2 end(const valarray<T>& v);
#include <version>

// standard-mandated includes

// [valarray.syn]
#include <initializer_list>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down
2 changes: 2 additions & 0 deletions libcxx/include/variant
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ namespace std {
#include <version>

// standard-mandated includes

// [variant.syn]
#include <compare>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
Expand Down

0 comments on commit 473a160

Please sign in to comment.