File tree Expand file tree Collapse file tree 13 files changed +39
-8
lines changed Expand file tree Collapse file tree 13 files changed +39
-8
lines changed Original file line number Diff line number Diff line change @@ -716,6 +716,7 @@ set(files
716716 __system_error/error_code.h
717717 __system_error/error_condition.h
718718 __system_error/system_error.h
719+ __system_error/throw_system_error.h
719720 __thread/formatter.h
720721 __thread/id.h
721722 __thread/jthread.h
Original file line number Diff line number Diff line change 1616#include < __config>
1717#include < __mutex/mutex.h>
1818#include < __mutex/unique_lock.h>
19- #include < __system_error/system_error .h>
19+ #include < __system_error/throw_system_error .h>
2020#include < __thread/support.h>
2121#include < __type_traits/enable_if.h>
2222#include < __type_traits/is_floating_point.h>
Original file line number Diff line number Diff line change 1414#include < __config>
1515#include < __memory/addressof.h>
1616#include < __mutex/tag_types.h>
17- #include < __system_error/system_error .h>
17+ #include < __system_error/throw_system_error .h>
1818#include < __utility/swap.h>
1919#include < cerrno>
2020
Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ class _LIBCPP_EXPORTED_FROM_ABI system_error : public runtime_error {
3939 _LIBCPP_HIDE_FROM_ABI const error_code& code () const _NOEXCEPT { return __ec_; }
4040};
4141
42- [[__noreturn__]] _LIBCPP_EXPORTED_FROM_ABI void __throw_system_error (int __ev, const char * __what_arg);
4342[[__noreturn__]] _LIBCPP_HIDE_FROM_ABI inline void __throw_system_error (error_code __ec, const char * __what_arg) {
4443#if _LIBCPP_HAS_EXCEPTIONS
4544 throw system_error (__ec, __what_arg);
Original file line number Diff line number Diff line change 1+ // -*- C++ -*-
2+ // ===----------------------------------------------------------------------===//
3+ //
4+ // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5+ // See https://llvm.org/LICENSE.txt for license information.
6+ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7+ //
8+ // ===----------------------------------------------------------------------===//
9+
10+ #ifndef _LIBCPP___SYSTEM_ERROR_THROW_SYSTEM_ERROR_H
11+ #define _LIBCPP___SYSTEM_ERROR_THROW_SYSTEM_ERROR_H
12+
13+ #include < __config>
14+
15+ #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
16+ # pragma GCC system_header
17+ #endif
18+
19+ _LIBCPP_BEGIN_NAMESPACE_STD
20+
21+ [[__noreturn__]] _LIBCPP_EXPORTED_FROM_ABI void __throw_system_error (int __ev, const char * __what_arg);
22+
23+ _LIBCPP_END_NAMESPACE_STD
24+
25+ #endif // _LIBCPP___SYSTEM_ERROR_THROW_SYSTEM_ERROR_H
Original file line number Diff line number Diff line change 1818#include < __functional/unary_function.h>
1919#include < __memory/unique_ptr.h>
2020#include < __mutex/mutex.h>
21- #include < __system_error/system_error .h>
21+ #include < __system_error/throw_system_error .h>
2222#include < __thread/id.h>
2323#include < __thread/support.h>
2424#include < __type_traits/decay.h>
25+ #include < __type_traits/enable_if.h>
26+ #include < __type_traits/is_same.h>
27+ #include < __type_traits/remove_cvref.h>
2528#include < __utility/forward.h>
2629#include < tuple>
2730
Original file line number Diff line number Diff line change @@ -1921,6 +1921,7 @@ module std [system] {
19211921 }
19221922 module error_condition { header "__system_error/error_condition.h" }
19231923 module system_error { header "__system_error/system_error.h" }
1924+ module throw_system_error { header "__system_error/throw_system_error.h" }
19241925
19251926 header "system_error"
19261927 export *
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ namespace std {
3636#include < __assert>
3737#include < __concepts/same_as.h>
3838#include < __config>
39- #include < __system_error/system_error .h>
39+ #include < __system_error/throw_system_error .h>
4040#include < __utility/forward.h>
4141#include < cerrno>
4242#include < cstdio>
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ template <class Mutex>
134134# include < __mutex/mutex.h>
135135# include < __mutex/tag_types.h>
136136# include < __mutex/unique_lock.h>
137- # include < __system_error/system_error .h>
137+ # include < __system_error/throw_system_error .h>
138138# include < __utility/swap.h>
139139# include < cerrno>
140140# include < version>
Original file line number Diff line number Diff line change 1212# define _LARGE_TIME_API
1313#endif
1414
15- #include < __system_error/system_error .h>
15+ #include < __system_error/throw_system_error .h>
1616#include < cerrno> // errno
1717#include < chrono>
1818
You can’t perform that action at this time.
0 commit comments