From: Jonathan Wakely Date: Wed, 31 May 2023 10:34:19 +0000 (+0100) Subject: libstdc++: Do not include in X-Git-Tag: basepoints/gcc-15~8703 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5a07b3b8bb9ce20849d6269e1601ead0ad3b8f75;p=thirdparty%2Fgcc.git libstdc++: Do not include in We previously needed in for the std::lock_error exception class, but that was moved out of in 2009 when it was removed from the C++0x draft. We can stop including now. Move the include for to where it's actually used, and only include in (for EAGAIN and EDEADLK). Also add some headers to that are needed but are not included directly: , and . libstdc++-v3/ChangeLog: * include/bits/unique_lock.h: Include here for std::errc constants. * include/std/mutex: Do not include and here. --- diff --git a/libstdc++-v3/include/bits/unique_lock.h b/libstdc++-v3/include/bits/unique_lock.h index f14674ed471a..c28e6456ad5e 100644 --- a/libstdc++-v3/include/bits/unique_lock.h +++ b/libstdc++-v3/include/bits/unique_lock.h @@ -37,6 +37,7 @@ #else #include +#include // for std::errc #include // for std::swap #include // for std::defer_lock_t diff --git a/libstdc++-v3/include/std/mutex b/libstdc++-v3/include/std/mutex index 79420388abc5..2b0059fcfe89 100644 --- a/libstdc++-v3/include/std/mutex +++ b/libstdc++-v3/include/std/mutex @@ -37,11 +37,13 @@ # include #else -#include -#include -#include -#include -#include +#include // std::tuple +#include // is_same_v +#include // EAGAIN, EDEADLK +#include // duration, time_point, is_clock_v +#include // __throw_system_error +#include // __invoke +#include // std::forward #include #include #if ! _GTHREAD_USE_MUTEX_TIMEDLOCK