aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std/shared_mutex
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2023-01-12 13:03:01 +0000
committerJonathan Wakely <jwakely@redhat.com>2023-01-13 00:15:01 +0000
commit227351345d0caa596eff8325144f15b15f704c08 (patch)
tree1e3c2029679941befce2fcc5551949790c0c496c /libstdc++-v3/include/std/shared_mutex
parentc0597d81b13c0cac41a9381fc5f3e6c73aa2ccaf (diff)
downloadgcc-227351345d0caa596eff8325144f15b15f704c08.zip
gcc-227351345d0caa596eff8325144f15b15f704c08.tar.gz
gcc-227351345d0caa596eff8325144f15b15f704c08.tar.bz2
libstdc++: Do not include <system_error> in concurrency headers
The <condition_variable>, <mutex>, and <shared_mutex> headers use std::errc constants, but don't use std::system_error itself. They only use the __throw_system_error(int) function, which is defined in <bits/functexcept.h>. By including the header for the errc constants instead of the whole of <system_error> we avoid depending on the whole std::string definition. libstdc++-v3/ChangeLog: * include/bits/std_mutex.h: Remove <system_error> include. * include/std/condition_variable: Add <bits/error_constants.h> include. * include/std/mutex: Likewise. * include/std/shared_mutex: Likewise.
Diffstat (limited to 'libstdc++-v3/include/std/shared_mutex')
-rw-r--r--libstdc++-v3/include/std/shared_mutex1
1 files changed, 1 insertions, 0 deletions
diff --git a/libstdc++-v3/include/std/shared_mutex b/libstdc++-v3/include/std/shared_mutex
index 7b70697..57c3cc5 100644
--- a/libstdc++-v3/include/std/shared_mutex
+++ b/libstdc++-v3/include/std/shared_mutex
@@ -36,6 +36,7 @@
#if __cplusplus >= 201402L
#include <bits/chrono.h>
+#include <bits/error_constants.h>
#include <bits/functexcept.h>
#include <bits/move.h> // move, __exchange
#include <bits/std_mutex.h> // defer_lock_t