diff --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst --- a/libcxx/docs/ReleaseNotes.rst +++ b/libcxx/docs/ReleaseNotes.rst @@ -59,7 +59,7 @@ includes are removed based on the language version used. Incidental transitive inclusions of the following headers have been removed: - - C++2b: ``atomic``, ``bit``, ``cstring``, ``type_traits`` + - C++2b: ``atomic``, ``bit``, ``cstdlib``, ``cstring``, ``type_traits`` - The headers ```` and ```` have been removed, since all the contents have been implemented in namespace ``std`` for at least two releases. diff --git a/libcxx/include/__bit/byteswap.h b/libcxx/include/__bit/byteswap.h --- a/libcxx/include/__bit/byteswap.h +++ b/libcxx/include/__bit/byteswap.h @@ -13,7 +13,6 @@ #include <__concepts/arithmetic.h> #include <__config> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/__expected/expected.h b/libcxx/include/__expected/expected.h --- a/libcxx/include/__expected/expected.h +++ b/libcxx/include/__expected/expected.h @@ -50,7 +50,6 @@ #include <__utility/move.h> #include <__utility/swap.h> #include <__verbose_abort> -#include // for std::abort #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__filesystem/directory_entry.h b/libcxx/include/__filesystem/directory_entry.h --- a/libcxx/include/__filesystem/directory_entry.h +++ b/libcxx/include/__filesystem/directory_entry.h @@ -23,7 +23,6 @@ #include <__filesystem/perms.h> #include <__utility/unreachable.h> #include -#include #include #include diff --git a/libcxx/include/__iterator/advance.h b/libcxx/include/__iterator/advance.h --- a/libcxx/include/__iterator/advance.h +++ b/libcxx/include/__iterator/advance.h @@ -23,7 +23,6 @@ #include <__utility/declval.h> #include <__utility/move.h> #include <__utility/unreachable.h> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h --- a/libcxx/include/__memory/shared_ptr.h +++ b/libcxx/include/__memory/shared_ptr.h @@ -49,7 +49,6 @@ #include <__utility/swap.h> #include <__verbose_abort> #include -#include // abort #include #include #include diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -1929,6 +1929,7 @@ # include # include # include +# include # include # include # include diff --git a/libcxx/include/any b/libcxx/include/any --- a/libcxx/include/any +++ b/libcxx/include/any @@ -107,7 +107,6 @@ #include <__utility/move.h> #include <__utility/unreachable.h> #include <__verbose_abort> -#include #include #include #include @@ -718,6 +717,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include # include # include diff --git a/libcxx/include/array b/libcxx/include/array --- a/libcxx/include/array +++ b/libcxx/include/array @@ -544,6 +544,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include # include # include diff --git a/libcxx/include/bit b/libcxx/include/bit --- a/libcxx/include/bit +++ b/libcxx/include/bit @@ -83,6 +83,7 @@ #endif #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include # include # include diff --git a/libcxx/include/bitset b/libcxx/include/bitset --- a/libcxx/include/bitset +++ b/libcxx/include/bitset @@ -1154,6 +1154,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include #endif diff --git a/libcxx/include/charconv b/libcxx/include/charconv --- a/libcxx/include/charconv +++ b/libcxx/include/charconv @@ -86,7 +86,6 @@ #include <__utility/unreachable.h> #include // for log2f #include -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -831,6 +830,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include # include # include diff --git a/libcxx/include/condition_variable b/libcxx/include/condition_variable --- a/libcxx/include/condition_variable +++ b/libcxx/include/condition_variable @@ -271,6 +271,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include #endif diff --git a/libcxx/include/deque b/libcxx/include/deque --- a/libcxx/include/deque +++ b/libcxx/include/deque @@ -2456,6 +2456,7 @@ # include # include # include +# include # include # include # include diff --git a/libcxx/include/experimental/memory_resource b/libcxx/include/experimental/memory_resource --- a/libcxx/include/experimental/memory_resource +++ b/libcxx/include/experimental/memory_resource @@ -69,7 +69,6 @@ #include <__type_traits/aligned_storage.h> #include <__utility/move.h> #include -#include #include #include #include @@ -432,6 +431,7 @@ # include # include # include +# include # include # include # include diff --git a/libcxx/include/filesystem b/libcxx/include/filesystem --- a/libcxx/include/filesystem +++ b/libcxx/include/filesystem @@ -467,6 +467,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include #endif #endif // _LIBCPP_FILESYSTEM diff --git a/libcxx/include/forward_list b/libcxx/include/forward_list --- a/libcxx/include/forward_list +++ b/libcxx/include/forward_list @@ -1822,6 +1822,7 @@ # include # include # include +# include # include # include # include diff --git a/libcxx/include/fstream b/libcxx/include/fstream --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -188,7 +188,6 @@ #include <__utility/swap.h> #include <__utility/unreachable.h> #include -#include #include #include #include @@ -1752,6 +1751,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include # include # include diff --git a/libcxx/include/functional b/libcxx/include/functional --- a/libcxx/include/functional +++ b/libcxx/include/functional @@ -555,6 +555,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include # include # include diff --git a/libcxx/include/iterator b/libcxx/include/iterator --- a/libcxx/include/iterator +++ b/libcxx/include/iterator @@ -732,6 +732,7 @@ #endif #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include # include # include diff --git a/libcxx/include/list b/libcxx/include/list --- a/libcxx/include/list +++ b/libcxx/include/list @@ -2402,6 +2402,7 @@ # include # include # include +# include # include # include # include diff --git a/libcxx/include/locale b/libcxx/include/locale --- a/libcxx/include/locale +++ b/libcxx/include/locale @@ -204,7 +204,6 @@ #include <__memory/unique_ptr.h> #include <__type_traits/make_unsigned.h> #include -#include #include #include #include @@ -4360,6 +4359,7 @@ # include # include # include +# include # include # include # include diff --git a/libcxx/include/map b/libcxx/include/map --- a/libcxx/include/map +++ b/libcxx/include/map @@ -2352,6 +2352,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include # include # include diff --git a/libcxx/include/memory b/libcxx/include/memory --- a/libcxx/include/memory +++ b/libcxx/include/memory @@ -921,6 +921,7 @@ # include # include # include +# include # include # include # include diff --git a/libcxx/include/mutex b/libcxx/include/mutex --- a/libcxx/include/mutex +++ b/libcxx/include/mutex @@ -706,6 +706,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include # include # include diff --git a/libcxx/include/ostream b/libcxx/include/ostream --- a/libcxx/include/ostream +++ b/libcxx/include/ostream @@ -1196,6 +1196,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include # include #endif diff --git a/libcxx/include/queue b/libcxx/include/queue --- a/libcxx/include/queue +++ b/libcxx/include/queue @@ -963,6 +963,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include # include #endif diff --git a/libcxx/include/random b/libcxx/include/random --- a/libcxx/include/random +++ b/libcxx/include/random @@ -1734,6 +1734,7 @@ # include # include # include +# include # include # include # include diff --git a/libcxx/include/ranges b/libcxx/include/ranges --- a/libcxx/include/ranges +++ b/libcxx/include/ranges @@ -399,6 +399,7 @@ #endif #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include #endif diff --git a/libcxx/include/regex b/libcxx/include/regex --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -6879,6 +6879,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include # include # include diff --git a/libcxx/include/set b/libcxx/include/set --- a/libcxx/include/set +++ b/libcxx/include/set @@ -1598,6 +1598,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include # include # include diff --git a/libcxx/include/stdexcept b/libcxx/include/stdexcept --- a/libcxx/include/stdexcept +++ b/libcxx/include/stdexcept @@ -44,7 +44,6 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> #include <__verbose_abort> -#include #include #include // for string forward decl @@ -300,4 +299,8 @@ _LIBCPP_END_NAMESPACE_STD +#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include +#endif + #endif // _LIBCPP_STDEXCEPT diff --git a/libcxx/include/string b/libcxx/include/string --- a/libcxx/include/string +++ b/libcxx/include/string @@ -578,7 +578,6 @@ #include #include #include // EOF -#include #include #include #include @@ -4630,6 +4629,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include # include # include diff --git a/libcxx/include/string_view b/libcxx/include/string_view --- a/libcxx/include/string_view +++ b/libcxx/include/string_view @@ -1045,6 +1045,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include # include # include diff --git a/libcxx/include/typeinfo b/libcxx/include/typeinfo --- a/libcxx/include/typeinfo +++ b/libcxx/include/typeinfo @@ -63,7 +63,6 @@ #include <__verbose_abort> #include #include -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -415,6 +414,7 @@ _LIBCPP_END_NAMESPACE_STD #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 +# include # include #endif diff --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map --- a/libcxx/include/unordered_map +++ b/libcxx/include/unordered_map @@ -2647,6 +2647,7 @@ # include # include # include +# include # include # include #endif diff --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set --- a/libcxx/include/unordered_set +++ b/libcxx/include/unordered_set @@ -1817,6 +1817,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include +# include # include # include # include diff --git a/libcxx/include/valarray b/libcxx/include/valarray --- a/libcxx/include/valarray +++ b/libcxx/include/valarray @@ -4935,6 +4935,7 @@ #if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20 # include # include +# include # include # include # include diff --git a/libcxx/include/vector b/libcxx/include/vector --- a/libcxx/include/vector +++ b/libcxx/include/vector @@ -317,7 +317,6 @@ #include <__utility/move.h> #include <__utility/swap.h> #include -#include #include #include // for forward declaration of vector #include @@ -3362,6 +3361,7 @@ # include # include # include +# include # include # include # include diff --git a/libcxx/test/libcxx/transitive_includes/cxx03.csv b/libcxx/test/libcxx/transitive_includes/cxx03.csv --- a/libcxx/test/libcxx/transitive_includes/cxx03.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx03.csv @@ -212,7 +212,6 @@ exception version execution version expected cstddef -expected cstdlib expected exception expected initializer_list expected new diff --git a/libcxx/test/libcxx/transitive_includes/cxx11.csv b/libcxx/test/libcxx/transitive_includes/cxx11.csv --- a/libcxx/test/libcxx/transitive_includes/cxx11.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx11.csv @@ -212,7 +212,6 @@ exception version execution version expected cstddef -expected cstdlib expected exception expected initializer_list expected new diff --git a/libcxx/test/libcxx/transitive_includes/cxx14.csv b/libcxx/test/libcxx/transitive_includes/cxx14.csv --- a/libcxx/test/libcxx/transitive_includes/cxx14.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx14.csv @@ -212,7 +212,6 @@ exception version execution version expected cstddef -expected cstdlib expected exception expected initializer_list expected new diff --git a/libcxx/test/libcxx/transitive_includes/cxx17.csv b/libcxx/test/libcxx/transitive_includes/cxx17.csv --- a/libcxx/test/libcxx/transitive_includes/cxx17.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx17.csv @@ -212,7 +212,6 @@ exception version execution version expected cstddef -expected cstdlib expected exception expected initializer_list expected new diff --git a/libcxx/test/libcxx/transitive_includes/cxx20.csv b/libcxx/test/libcxx/transitive_includes/cxx20.csv --- a/libcxx/test/libcxx/transitive_includes/cxx20.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx20.csv @@ -219,7 +219,6 @@ exception version execution version expected cstddef -expected cstdlib expected exception expected initializer_list expected new diff --git a/libcxx/test/libcxx/transitive_includes/cxx2b.csv b/libcxx/test/libcxx/transitive_includes/cxx2b.csv --- a/libcxx/test/libcxx/transitive_includes/cxx2b.csv +++ b/libcxx/test/libcxx/transitive_includes/cxx2b.csv @@ -1,7 +1,6 @@ algorithm climits algorithm cstddef algorithm cstdint -algorithm cstdlib algorithm cstring algorithm initializer_list algorithm iosfwd @@ -10,7 +9,6 @@ algorithm version any cstddef any cstdint -any cstdlib any cstring any initializer_list any limits @@ -20,7 +18,6 @@ any version array compare array cstddef -array cstdlib array initializer_list array limits array stdexcept @@ -44,13 +41,11 @@ barrier ratio barrier version bit cstdint -bit cstdlib bit limits bit version bitset climits bitset cstddef bitset cstdint -bitset cstdlib bitset cstring bitset initializer_list bitset iosfwd @@ -64,7 +59,6 @@ charconv cmath charconv cstddef charconv cstdint -charconv cstdlib charconv initializer_list charconv limits chrono array @@ -111,7 +105,6 @@ concepts version condition_variable cstddef condition_variable cstdint -condition_variable cstdlib condition_variable cstring condition_variable ctime condition_variable initializer_list @@ -137,7 +130,6 @@ deque compare deque cstddef deque cstdint -deque cstdlib deque cstring deque initializer_list deque limits @@ -150,7 +142,6 @@ exception version execution version expected cstddef -expected cstdlib expected exception expected initializer_list expected new @@ -167,7 +158,6 @@ experimental/map experimental/memory_resource experimental/map map experimental/memory_resource cstddef -experimental/memory_resource cstdlib experimental/memory_resource experimental/utility experimental/memory_resource limits experimental/memory_resource new @@ -218,7 +208,6 @@ filesystem compare filesystem cstddef filesystem cstdint -filesystem cstdlib filesystem ctime filesystem iomanip filesystem iosfwd @@ -250,7 +239,6 @@ forward_list compare forward_list cstddef forward_list cstdint -forward_list cstdlib forward_list cstring forward_list initializer_list forward_list limits @@ -262,7 +250,6 @@ fstream cstddef fstream cstdint fstream cstdio -fstream cstdlib fstream cstring fstream filesystem fstream initializer_list @@ -275,7 +262,6 @@ functional array functional cstddef functional cstdint -functional cstdlib functional cstring functional exception functional initializer_list @@ -330,7 +316,6 @@ iterator compare iterator concepts iterator cstddef -iterator cstdlib iterator initializer_list iterator iosfwd iterator limits @@ -348,7 +333,6 @@ list compare list cstddef list cstdint -list cstdlib list cstring list initializer_list list limits @@ -360,7 +344,6 @@ locale cstddef locale cstdint locale cstdio -locale cstdlib locale cstring locale ctime locale initializer_list @@ -374,7 +357,6 @@ locale version map compare map cstddef -map cstdlib map initializer_list map limits map new @@ -385,7 +367,6 @@ memory compare memory cstddef memory cstdint -memory cstdlib memory cstring memory initializer_list memory iosfwd @@ -405,7 +386,6 @@ memory_resource version mutex cstddef mutex cstdint -mutex cstdlib mutex cstring mutex ctime mutex initializer_list @@ -439,7 +419,6 @@ ostream bitset ostream cstddef ostream cstdint -ostream cstdlib ostream cstring ostream initializer_list ostream ios @@ -453,7 +432,6 @@ ostream version queue compare queue cstddef -queue cstdlib queue deque queue initializer_list queue limits @@ -462,7 +440,6 @@ random cmath random cstddef random cstdint -random cstdlib random initializer_list random iosfwd random limits @@ -472,7 +449,6 @@ random version ranges compare ranges cstddef -ranges cstdlib ranges initializer_list ranges iosfwd ranges iterator @@ -490,7 +466,6 @@ regex compare regex cstddef regex cstdint -regex cstdlib regex cstring regex deque regex initializer_list @@ -515,7 +490,6 @@ semaphore version set compare set cstddef -set cstdlib set initializer_list set limits set new @@ -547,7 +521,6 @@ stack deque stack initializer_list stack version -stdexcept cstdlib stdexcept exception stdexcept iosfwd streambuf cstdint @@ -559,7 +532,6 @@ string cstddef string cstdint string cstdio -string cstdlib string cstring string cwchar string initializer_list @@ -574,7 +546,6 @@ string_view cstddef string_view cstdint string_view cstdio -string_view cstdlib string_view cstring string_view cwchar string_view initializer_list @@ -617,13 +588,11 @@ typeindex version typeinfo cstddef typeinfo cstdint -typeinfo cstdlib typeinfo exception unordered_map cmath unordered_map compare unordered_map cstddef unordered_map cstdint -unordered_map cstdlib unordered_map cstring unordered_map initializer_list unordered_map limits @@ -636,7 +605,6 @@ unordered_set compare unordered_set cstddef unordered_set cstdint -unordered_set cstdlib unordered_set cstring unordered_set initializer_list unordered_set limits @@ -652,8 +620,6 @@ utility version valarray cmath valarray cstddef -valarray cstdint -valarray cstdlib valarray initializer_list valarray limits valarray new @@ -673,7 +639,6 @@ vector compare vector cstddef vector cstdint -vector cstdlib vector cstring vector initializer_list vector iosfwd diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/eval.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/eval.pass.cpp @@ -17,6 +17,7 @@ #include #include +#include #include #include diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/eval_param.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/eval_param.pass.cpp --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/eval_param.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/eval_param.pass.cpp @@ -15,11 +15,10 @@ // template result_type operator()(_URNG& g, const param_type& parm); +#include +#include #include #include -#include - -#include "test_macros.h" int main(int, char**) {