[libc++] Granularize system_error.

Reviewed By: #libc, philnik

Differential Revision: https://reviews.llvm.org/D147853
This commit is contained in:
Mark de Wever
2023-04-08 17:29:31 +02:00
parent bdf7fd8297
commit e8cfbfd05a
49 changed files with 660 additions and 420 deletions

View File

@@ -63,8 +63,8 @@ Deprecations and Removals
includes are removed based on the language version used. Incidental transitive
inclusions of the following headers have been removed:
- C++2b: ``atomic``, ``bit``, ``cstdint``, ``cstdlib``, ``cstring``, ``initializer_list``, ``new``, ``stdexcept``,
``type_traits``, ``typeinfo``
- C++2b: ``atomic``, ``bit``, ``cstdint``, ``cstdlib``, ``cstring``, ``initializer_list``, ``limits``, ``new``,
``stdexcept``, ``system_error``, ``type_traits``, ``typeinfo``
- The headers ``<experimental/algorithm>`` and ``<experimental/functional>`` have been removed, since all the contents
have been implemented in namespace ``std`` for at least two releases.

View File

@@ -589,6 +589,10 @@ set(files
__support/xlocale/__nop_locale_mgmt.h
__support/xlocale/__posix_l_fallback.h
__support/xlocale/__strtonum_fallback.h
__system_error/error_category.h
__system_error/error_code.h
__system_error/error_condition.h
__system_error/system_error.h
__thread/poll_with_backoff.h
__thread/timed_backoff_policy.h
__threading_support

View File

@@ -15,12 +15,12 @@
#include <__config>
#include <__mutex/mutex.h>
#include <__mutex/unique_lock.h>
#include <__system_error/system_error.h>
#include <__threading_support>
#include <__type_traits/enable_if.h>
#include <__type_traits/is_floating_point.h>
#include <__utility/move.h>
#include <ratio>
#include <system_error>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header

View File

@@ -12,6 +12,7 @@
#include <__availability>
#include <__chrono/time_point.h>
#include <__compare/ordering.h>
#include <__config>
#include <__errc>
#include <__filesystem/file_status.h>
@@ -21,10 +22,11 @@
#include <__filesystem/operations.h>
#include <__filesystem/path.h>
#include <__filesystem/perms.h>
#include <__system_error/error_code.h>
#include <__utility/move.h>
#include <__utility/unreachable.h>
#include <cstdint>
#include <iosfwd>
#include <system_error>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header

View File

@@ -20,8 +20,9 @@
#include <__memory/shared_ptr.h>
#include <__ranges/enable_borrowed_range.h>
#include <__ranges/enable_view.h>
#include <__system_error/error_code.h>
#include <__utility/move.h>
#include <cstddef>
#include <system_error>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header

View File

@@ -14,11 +14,13 @@
#include <__config>
#include <__filesystem/path.h>
#include <__memory/shared_ptr.h>
#include <__system_error/error_code.h>
#include <__system_error/system_error.h>
#include <__utility/forward.h>
#include <__verbose_abort>
#include <iosfwd>
#include <new>
#include <system_error>
#include <string>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header

View File

@@ -21,8 +21,8 @@
#include <__filesystem/perm_options.h>
#include <__filesystem/perms.h>
#include <__filesystem/space_info.h>
#include <__system_error/error_code.h>
#include <cstdint>
#include <system_error>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header

View File

@@ -19,8 +19,9 @@
#include <__memory/shared_ptr.h>
#include <__ranges/enable_borrowed_range.h>
#include <__ranges/enable_view.h>
#include <__system_error/error_code.h>
#include <__utility/move.h>
#include <cstddef>
#include <system_error>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header

View File

@@ -14,8 +14,9 @@
#include <__config>
#include <__memory/addressof.h>
#include <__mutex/tag_types.h>
#include <__system_error/system_error.h>
#include <__utility/swap.h>
#include <system_error>
#include <cerrno>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header

View File

@@ -0,0 +1,81 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___SYSTEM_ERROR_ERROR_CATEGORY_H
#define _LIBCPP___SYSTEM_ERROR_ERROR_CATEGORY_H
#include <__compare/ordering.h>
#include <__config>
#include <string>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
class _LIBCPP_TYPE_VIS error_condition;
class _LIBCPP_TYPE_VIS error_code;
class _LIBCPP_HIDDEN __do_message;
class _LIBCPP_TYPE_VIS error_category
{
public:
virtual ~error_category() _NOEXCEPT;
#if defined(_LIBCPP_ERROR_CATEGORY_DEFINE_LEGACY_INLINE_FUNCTIONS)
error_category() noexcept;
#else
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR_SINCE_CXX14 error_category() _NOEXCEPT = default;
#endif
error_category(const error_category&) = delete;
error_category& operator=(const error_category&) = delete;
virtual const char* name() const _NOEXCEPT = 0;
virtual error_condition default_error_condition(int __ev) const _NOEXCEPT;
virtual bool equivalent(int __code, const error_condition& __condition) const _NOEXCEPT;
virtual bool equivalent(const error_code& __code, int __condition) const _NOEXCEPT;
virtual string message(int __ev) const = 0;
_LIBCPP_INLINE_VISIBILITY
bool operator==(const error_category& __rhs) const _NOEXCEPT {return this == &__rhs;}
#if _LIBCPP_STD_VER >= 20
_LIBCPP_HIDE_FROM_ABI
strong_ordering operator<=>(const error_category& __rhs) const noexcept {return compare_three_way()(this, std::addressof(__rhs));}
#else // _LIBCPP_STD_VER >= 20
_LIBCPP_INLINE_VISIBILITY
bool operator!=(const error_category& __rhs) const _NOEXCEPT {return !(*this == __rhs);}
_LIBCPP_INLINE_VISIBILITY
bool operator< (const error_category& __rhs) const _NOEXCEPT {return this < &__rhs;}
#endif // _LIBCPP_STD_VER >= 20
friend class _LIBCPP_HIDDEN __do_message;
};
class _LIBCPP_HIDDEN __do_message
: public error_category
{
public:
string message(int __ev) const override;
};
_LIBCPP_FUNC_VIS const error_category& generic_category() _NOEXCEPT;
_LIBCPP_FUNC_VIS const error_category& system_category() _NOEXCEPT;
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___SYSTEM_ERROR_ERROR_CATEGORY_H

View File

@@ -0,0 +1,191 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___SYSTEM_ERROR_ERROR_CODE_H
#define _LIBCPP___SYSTEM_ERROR_ERROR_CODE_H
#include <__compare/ordering.h>
#include <__config>
#include <__errc>
#include <__functional/hash.h>
#include <__functional/unary_function.h>
#include <__system_error/error_category.h>
#include <__system_error/error_condition.h>
#include <cstddef>
#include <string>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_error_code_enum
: public false_type {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
inline constexpr bool is_error_code_enum_v = is_error_code_enum<_Tp>::value;
#endif
namespace __adl_only {
// Those cause ADL to trigger but they are not viable candidates,
// so they are never actually selected.
void make_error_code() = delete;
} // namespace __adl_only
class _LIBCPP_TYPE_VIS error_code
{
int __val_;
const error_category* __cat_;
public:
_LIBCPP_INLINE_VISIBILITY
error_code() _NOEXCEPT : __val_(0), __cat_(&system_category()) {}
_LIBCPP_INLINE_VISIBILITY
error_code(int __val, const error_category& __cat) _NOEXCEPT
: __val_(__val), __cat_(&__cat) {}
template <class _Ep>
_LIBCPP_INLINE_VISIBILITY
error_code(_Ep __e,
typename enable_if<is_error_code_enum<_Ep>::value>::type* = nullptr
) _NOEXCEPT
{
using __adl_only::make_error_code;
*this = make_error_code(__e);
}
_LIBCPP_INLINE_VISIBILITY
void assign(int __val, const error_category& __cat) _NOEXCEPT
{
__val_ = __val;
__cat_ = &__cat;
}
template <class _Ep>
_LIBCPP_INLINE_VISIBILITY
typename enable_if
<
is_error_code_enum<_Ep>::value,
error_code&
>::type
operator=(_Ep __e) _NOEXCEPT
{
using __adl_only::make_error_code;
*this = make_error_code(__e);
return *this;
}
_LIBCPP_INLINE_VISIBILITY
void clear() _NOEXCEPT
{
__val_ = 0;
__cat_ = &system_category();
}
_LIBCPP_INLINE_VISIBILITY
int value() const _NOEXCEPT {return __val_;}
_LIBCPP_INLINE_VISIBILITY
const error_category& category() const _NOEXCEPT {return *__cat_;}
_LIBCPP_INLINE_VISIBILITY
error_condition default_error_condition() const _NOEXCEPT
{return __cat_->default_error_condition(__val_);}
string message() const;
_LIBCPP_INLINE_VISIBILITY
explicit operator bool() const _NOEXCEPT {return __val_ != 0;}
};
inline _LIBCPP_INLINE_VISIBILITY
error_code
make_error_code(errc __e) _NOEXCEPT
{
return error_code(static_cast<int>(__e), generic_category());
}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const error_code& __x, const error_code& __y) _NOEXCEPT
{
return __x.category() == __y.category() && __x.value() == __y.value();
}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const error_code& __x, const error_condition& __y) _NOEXCEPT
{
return __x.category().equivalent(__x.value(), __y)
|| __y.category().equivalent(__x, __y.value());
}
#if _LIBCPP_STD_VER <= 17
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const error_condition& __x, const error_code& __y) _NOEXCEPT
{
return __y == __x;
}
#endif
#if _LIBCPP_STD_VER <= 17
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const error_code& __x, const error_code& __y) _NOEXCEPT
{return !(__x == __y);}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const error_code& __x, const error_condition& __y) _NOEXCEPT
{return !(__x == __y);}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const error_condition& __x, const error_code& __y) _NOEXCEPT
{return !(__x == __y);}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<(const error_code& __x, const error_code& __y) _NOEXCEPT
{
return __x.category() < __y.category()
|| (__x.category() == __y.category() && __x.value() < __y.value());
}
#else // _LIBCPP_STD_VER <= 17
inline _LIBCPP_HIDE_FROM_ABI strong_ordering
operator<=>(const error_code& __x, const error_code& __y) noexcept
{
if (auto __c = __x.category() <=> __y.category(); __c != 0)
return __c;
return __x.value() <=> __y.value();
}
#endif // _LIBCPP_STD_VER <= 17
template <>
struct _LIBCPP_TEMPLATE_VIS hash<error_code>
: public __unary_function<error_code, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(const error_code& __ec) const _NOEXCEPT
{
return static_cast<size_t>(__ec.value());
}
};
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___SYSTEM_ERROR_ERROR_CODE_H

View File

@@ -0,0 +1,168 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___SYSTEM_ERROR_ERROR_CONDITION_H
#define _LIBCPP___SYSTEM_ERROR_ERROR_CONDITION_H
#include <__compare/ordering.h>
#include <__config>
#include <__errc>
#include <__functional/unary_function.h>
#include <__system_error/error_category.h>
#include <cstddef>
#include <string>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum
: public false_type {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
inline constexpr bool is_error_condition_enum_v = is_error_condition_enum<_Tp>::value;
#endif
template <>
struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc>
: true_type { };
#ifdef _LIBCPP_CXX03_LANG
template <>
struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc::__lx>
: true_type { };
#endif
namespace __adl_only {
// Those cause ADL to trigger but they are not viable candidates,
// so they are never actually selected.
void make_error_condition() = delete;
} // namespace __adl_only
class _LIBCPP_TYPE_VIS error_condition
{
int __val_;
const error_category* __cat_;
public:
_LIBCPP_INLINE_VISIBILITY
error_condition() _NOEXCEPT : __val_(0), __cat_(&generic_category()) {}
_LIBCPP_INLINE_VISIBILITY
error_condition(int __val, const error_category& __cat) _NOEXCEPT
: __val_(__val), __cat_(&__cat) {}
template <class _Ep>
_LIBCPP_INLINE_VISIBILITY
error_condition(_Ep __e,
typename enable_if<is_error_condition_enum<_Ep>::value>::type* = nullptr
) _NOEXCEPT
{
using __adl_only::make_error_condition;
*this = make_error_condition(__e);
}
_LIBCPP_INLINE_VISIBILITY
void assign(int __val, const error_category& __cat) _NOEXCEPT
{
__val_ = __val;
__cat_ = &__cat;
}
template <class _Ep>
_LIBCPP_INLINE_VISIBILITY
typename enable_if
<
is_error_condition_enum<_Ep>::value,
error_condition&
>::type
operator=(_Ep __e) _NOEXCEPT
{
using __adl_only::make_error_condition;
*this = make_error_condition(__e);
return *this;
}
_LIBCPP_INLINE_VISIBILITY
void clear() _NOEXCEPT
{
__val_ = 0;
__cat_ = &generic_category();
}
_LIBCPP_INLINE_VISIBILITY
int value() const _NOEXCEPT {return __val_;}
_LIBCPP_INLINE_VISIBILITY
const error_category& category() const _NOEXCEPT {return *__cat_;}
string message() const;
_LIBCPP_INLINE_VISIBILITY
explicit operator bool() const _NOEXCEPT {return __val_ != 0;}
};
inline _LIBCPP_INLINE_VISIBILITY
error_condition
make_error_condition(errc __e) _NOEXCEPT
{
return error_condition(static_cast<int>(__e), generic_category());
}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const error_condition& __x, const error_condition& __y) _NOEXCEPT
{
return __x.category() == __y.category() && __x.value() == __y.value();
}
#if _LIBCPP_STD_VER <= 17
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const error_condition& __x, const error_condition& __y) _NOEXCEPT
{return !(__x == __y);}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<(const error_condition& __x, const error_condition& __y) _NOEXCEPT
{
return __x.category() < __y.category()
|| (__x.category() == __y.category() && __x.value() < __y.value());
}
#else // _LIBCPP_STD_VER <= 17
inline _LIBCPP_HIDE_FROM_ABI strong_ordering
operator<=>(const error_condition& __x, const error_condition& __y) noexcept
{
if (auto __c = __x.category() <=> __y.category(); __c != 0)
return __c;
return __x.value() <=> __y.value();
}
#endif // _LIBCPP_STD_VER <= 17
template <>
struct _LIBCPP_TEMPLATE_VIS hash<error_condition>
: public __unary_function<error_condition, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(const error_condition& __ec) const _NOEXCEPT
{
return static_cast<size_t>(__ec.value());
}
};
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___SYSTEM_ERROR_ERROR_CONDITION_H

View File

@@ -0,0 +1,51 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___SYSTEM_ERROR_SYSTEM_ERROR_H
#define _LIBCPP___SYSTEM_ERROR_SYSTEM_ERROR_H
#include <__config>
#include <__system_error/error_category.h>
#include <__system_error/error_code.h>
#include <stdexcept>
#include <string>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
class _LIBCPP_TYPE_VIS system_error
: public runtime_error
{
error_code __ec_;
public:
system_error(error_code __ec, const string& __what_arg);
system_error(error_code __ec, const char* __what_arg);
system_error(error_code __ec);
system_error(int __ev, const error_category& __ecat, const string& __what_arg);
system_error(int __ev, const error_category& __ecat, const char* __what_arg);
system_error(int __ev, const error_category& __ecat);
system_error(const system_error&) _NOEXCEPT = default;
~system_error() _NOEXCEPT override;
_LIBCPP_INLINE_VISIBILITY
const error_code& code() const _NOEXCEPT {return __ec_;}
private:
static string __init(const error_code&, string);
};
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS
void __throw_system_error(int __ev, const char* __what_arg);
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___SYSTEM_ERROR_SYSTEM_ERROR_H

View File

@@ -285,6 +285,7 @@ _LIBCPP_END_NAMESPACE_STD
# include <initializer_list>
# include <new>
# include <stdexcept>
# include <system_error>
# include <type_traits>
# include <typeinfo>
#endif

View File

@@ -468,6 +468,7 @@ inline constexpr bool std::ranges::enable_view<std::filesystem::recursive_direct
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <concepts>
# include <cstdlib>
# include <system_error>
#endif
#endif // _LIBCPP_FILESYSTEM

View File

@@ -367,11 +367,18 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
#include <__chrono/time_point.h>
#include <__config>
#include <__exception/exception_ptr.h>
#include <__memory/allocator.h>
#include <__memory/allocator_arg_t.h>
#include <__memory/allocator_destructor.h>
#include <__memory/allocator_traits.h>
#include <__memory/compressed_pair.h>
#include <__memory/pointer_traits.h>
#include <__memory/shared_ptr.h>
#include <__memory/unique_ptr.h>
#include <__memory/uses_allocator.h>
#include <__system_error/error_category.h>
#include <__system_error/error_code.h>
#include <__system_error/error_condition.h>
#include <__type_traits/aligned_storage.h>
#include <__type_traits/alignment_of.h>
#include <__type_traits/strip_signature.h>
@@ -380,7 +387,7 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
#include <__utility/move.h>
#include <mutex>
#include <new>
#include <system_error>
#include <stdexcept>
#include <thread>
#include <version>
@@ -2462,6 +2469,7 @@ _LIBCPP_END_NAMESPACE_STD
# include <atomic>
# include <cstdlib>
# include <exception>
# include <system_error>
#endif
#endif // _LIBCPP_FUTURE

View File

@@ -219,9 +219,12 @@ storage-class-specifier const error_category& iostream_category() noexcept;
#include <__assert> // all public C++ headers provide the assertion handler
#include <__ios/fpos.h>
#include <__locale>
#include <__system_error/error_category.h>
#include <__system_error/error_code.h>
#include <__system_error/error_condition.h>
#include <__system_error/system_error.h>
#include <__utility/swap.h>
#include <__verbose_abort>
#include <system_error>
#include <version>
// standard-mandated includes
@@ -1048,6 +1051,7 @@ _LIBCPP_END_NAMESPACE_STD
# include <limits>
# include <new>
# include <stdexcept>
# include <system_error>
# include <type_traits>
# include <typeinfo>
#endif

View File

@@ -41,6 +41,7 @@
{ include: [ "@<__ranges/.*>", "private", "<ranges>", "public" ] },
{ include: [ "@<__string/.*>", "private", "<string>", "public" ] },
{ include: [ "@<__support/.*>", "private", "<support>", "public" ] },
{ include: [ "@<__system_error/.*>", "private", "<system_error>", "public" ] },
{ include: [ "@<__thread/.*>", "private", "<thread>", "public" ] },
{ include: [ "@<__tuple_dir/.*>", "private", "<tuple>", "public" ] },
{ include: [ "@<__type_traits/.*>", "private", "<type_traits>", "public" ] },

View File

@@ -203,6 +203,7 @@ template <class charT> class messages_byname;
#include <__locale>
#include <__memory/unique_ptr.h>
#include <__type_traits/make_unsigned.h>
#include <cerrno>
#include <cstdio>
#include <cstdlib>
#include <ctime>

View File

@@ -904,6 +904,7 @@ module std [system] {
private header "__format/format_context.h"
export optional
export locale
export __locale
}
module format_error { private header "__format/format_error.h" }
module format_functions {
@@ -1433,7 +1434,22 @@ module std [system] {
}
module system_error {
header "system_error"
export __errc
export *
module __system_error {
module error_category { private header "__system_error/error_category.h" }
module error_code {
private header "__system_error/error_code.h"
export functional.__functional.hash
export functional.__functional.unary_function
}
module error_condition {
private header "__system_error/error_condition.h"
export functional.__functional.hash
export functional.__functional.unary_function
}
module system_error { private header "__system_error/system_error.h" }
}
}
module thread {
@requires_LIBCXX_ENABLE_THREADS@

View File

@@ -719,6 +719,7 @@ _LIBCPP_POP_MACROS
# include <initializer_list>
# include <new>
# include <stdexcept>
# include <system_error>
# include <type_traits>
# include <typeinfo>
#endif

View File

@@ -168,6 +168,7 @@ basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, cons
#include <__exception/operations.h>
#include <__memory/shared_ptr.h>
#include <__memory/unique_ptr.h>
#include <__system_error/error_code.h>
#include <__type_traits/conjunction.h>
#include <__type_traits/enable_if.h>
#include <__type_traits/is_base_of.h>

View File

@@ -133,9 +133,9 @@ template <class Mutex>
#include <__mutex/mutex.h>
#include <__mutex/tag_types.h>
#include <__mutex/unique_lock.h>
#include <__system_error/system_error.h>
#include <__utility/swap.h>
#include <cerrno>
#include <system_error>
#include <version>
_LIBCPP_PUSH_MACROS
@@ -515,4 +515,8 @@ _LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <system_error>
#endif
#endif // _LIBCPP_SHARED_MUTEX

View File

@@ -146,12 +146,10 @@ template <> struct hash<std::error_condition>;
#include <__assert> // all public C++ headers provide the assertion handler
#include <__config>
#include <__errc>
#include <__functional/hash.h>
#include <__functional/unary_function.h>
#include <__memory/addressof.h>
#include <stdexcept>
#include <string>
#include <__system_error/error_category.h>
#include <__system_error/error_code.h>
#include <__system_error/error_condition.h>
#include <__system_error/system_error.h>
#include <version>
// standard-mandated includes
@@ -163,388 +161,10 @@ template <> struct hash<std::error_condition>;
# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
// is_error_code_enum
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_error_code_enum
: public false_type {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
inline constexpr bool is_error_code_enum_v = is_error_code_enum<_Tp>::value;
#endif
// is_error_condition_enum
template <class _Tp>
struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum
: public false_type {};
#if _LIBCPP_STD_VER >= 17
template <class _Tp>
inline constexpr bool is_error_condition_enum_v = is_error_condition_enum<_Tp>::value;
#endif
template <>
struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc>
: true_type { };
#ifdef _LIBCPP_CXX03_LANG
template <>
struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc::__lx>
: true_type { };
#endif
class _LIBCPP_TYPE_VIS error_condition;
class _LIBCPP_TYPE_VIS error_code;
// class error_category
class _LIBCPP_HIDDEN __do_message;
class _LIBCPP_TYPE_VIS error_category
{
public:
virtual ~error_category() _NOEXCEPT;
#if defined(_LIBCPP_ERROR_CATEGORY_DEFINE_LEGACY_INLINE_FUNCTIONS)
error_category() noexcept;
#else
_LIBCPP_INLINE_VISIBILITY
_LIBCPP_CONSTEXPR_SINCE_CXX14 error_category() _NOEXCEPT = default;
#endif
error_category(const error_category&) = delete;
error_category& operator=(const error_category&) = delete;
virtual const char* name() const _NOEXCEPT = 0;
virtual error_condition default_error_condition(int __ev) const _NOEXCEPT;
virtual bool equivalent(int __code, const error_condition& __condition) const _NOEXCEPT;
virtual bool equivalent(const error_code& __code, int __condition) const _NOEXCEPT;
virtual string message(int __ev) const = 0;
_LIBCPP_INLINE_VISIBILITY
bool operator==(const error_category& __rhs) const _NOEXCEPT {return this == &__rhs;}
#if _LIBCPP_STD_VER >= 20
_LIBCPP_HIDE_FROM_ABI
strong_ordering operator<=>(const error_category& __rhs) const noexcept {return compare_three_way()(this, std::addressof(__rhs));}
#else // _LIBCPP_STD_VER >= 20
_LIBCPP_INLINE_VISIBILITY
bool operator!=(const error_category& __rhs) const _NOEXCEPT {return !(*this == __rhs);}
_LIBCPP_INLINE_VISIBILITY
bool operator< (const error_category& __rhs) const _NOEXCEPT {return this < &__rhs;}
#endif // _LIBCPP_STD_VER >= 20
friend class _LIBCPP_HIDDEN __do_message;
};
class _LIBCPP_HIDDEN __do_message
: public error_category
{
public:
string message(int __ev) const override;
};
_LIBCPP_FUNC_VIS const error_category& generic_category() _NOEXCEPT;
_LIBCPP_FUNC_VIS const error_category& system_category() _NOEXCEPT;
namespace __adl_only {
// Those cause ADL to trigger but they are not viable candidates,
// so they are never actually selected.
void make_error_condition() = delete;
void make_error_code() = delete;
} // namespace __adl_only
class _LIBCPP_TYPE_VIS error_condition
{
int __val_;
const error_category* __cat_;
public:
_LIBCPP_INLINE_VISIBILITY
error_condition() _NOEXCEPT : __val_(0), __cat_(&generic_category()) {}
_LIBCPP_INLINE_VISIBILITY
error_condition(int __val, const error_category& __cat) _NOEXCEPT
: __val_(__val), __cat_(&__cat) {}
template <class _Ep>
_LIBCPP_INLINE_VISIBILITY
error_condition(_Ep __e,
typename enable_if<is_error_condition_enum<_Ep>::value>::type* = nullptr
) _NOEXCEPT
{
using __adl_only::make_error_condition;
*this = make_error_condition(__e);
}
_LIBCPP_INLINE_VISIBILITY
void assign(int __val, const error_category& __cat) _NOEXCEPT
{
__val_ = __val;
__cat_ = &__cat;
}
template <class _Ep>
_LIBCPP_INLINE_VISIBILITY
typename enable_if
<
is_error_condition_enum<_Ep>::value,
error_condition&
>::type
operator=(_Ep __e) _NOEXCEPT
{
using __adl_only::make_error_condition;
*this = make_error_condition(__e);
return *this;
}
_LIBCPP_INLINE_VISIBILITY
void clear() _NOEXCEPT
{
__val_ = 0;
__cat_ = &generic_category();
}
_LIBCPP_INLINE_VISIBILITY
int value() const _NOEXCEPT {return __val_;}
_LIBCPP_INLINE_VISIBILITY
const error_category& category() const _NOEXCEPT {return *__cat_;}
string message() const;
_LIBCPP_INLINE_VISIBILITY
explicit operator bool() const _NOEXCEPT {return __val_ != 0;}
};
inline _LIBCPP_INLINE_VISIBILITY
error_condition
make_error_condition(errc __e) _NOEXCEPT
{
return error_condition(static_cast<int>(__e), generic_category());
}
// error_code
class _LIBCPP_TYPE_VIS error_code
{
int __val_;
const error_category* __cat_;
public:
_LIBCPP_INLINE_VISIBILITY
error_code() _NOEXCEPT : __val_(0), __cat_(&system_category()) {}
_LIBCPP_INLINE_VISIBILITY
error_code(int __val, const error_category& __cat) _NOEXCEPT
: __val_(__val), __cat_(&__cat) {}
template <class _Ep>
_LIBCPP_INLINE_VISIBILITY
error_code(_Ep __e,
typename enable_if<is_error_code_enum<_Ep>::value>::type* = nullptr
) _NOEXCEPT
{
using __adl_only::make_error_code;
*this = make_error_code(__e);
}
_LIBCPP_INLINE_VISIBILITY
void assign(int __val, const error_category& __cat) _NOEXCEPT
{
__val_ = __val;
__cat_ = &__cat;
}
template <class _Ep>
_LIBCPP_INLINE_VISIBILITY
typename enable_if
<
is_error_code_enum<_Ep>::value,
error_code&
>::type
operator=(_Ep __e) _NOEXCEPT
{
using __adl_only::make_error_code;
*this = make_error_code(__e);
return *this;
}
_LIBCPP_INLINE_VISIBILITY
void clear() _NOEXCEPT
{
__val_ = 0;
__cat_ = &system_category();
}
_LIBCPP_INLINE_VISIBILITY
int value() const _NOEXCEPT {return __val_;}
_LIBCPP_INLINE_VISIBILITY
const error_category& category() const _NOEXCEPT {return *__cat_;}
_LIBCPP_INLINE_VISIBILITY
error_condition default_error_condition() const _NOEXCEPT
{return __cat_->default_error_condition(__val_);}
string message() const;
_LIBCPP_INLINE_VISIBILITY
explicit operator bool() const _NOEXCEPT {return __val_ != 0;}
};
inline _LIBCPP_INLINE_VISIBILITY
error_code
make_error_code(errc __e) _NOEXCEPT
{
return error_code(static_cast<int>(__e), generic_category());
}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const error_code& __x, const error_code& __y) _NOEXCEPT
{
return __x.category() == __y.category() && __x.value() == __y.value();
}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const error_code& __x, const error_condition& __y) _NOEXCEPT
{
return __x.category().equivalent(__x.value(), __y)
|| __y.category().equivalent(__x, __y.value());
}
#if _LIBCPP_STD_VER <= 17
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const error_condition& __x, const error_code& __y) _NOEXCEPT
{
return __y == __x;
}
#endif
inline _LIBCPP_INLINE_VISIBILITY
bool
operator==(const error_condition& __x, const error_condition& __y) _NOEXCEPT
{
return __x.category() == __y.category() && __x.value() == __y.value();
}
#if _LIBCPP_STD_VER <= 17
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const error_code& __x, const error_code& __y) _NOEXCEPT
{return !(__x == __y);}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const error_code& __x, const error_condition& __y) _NOEXCEPT
{return !(__x == __y);}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const error_condition& __x, const error_code& __y) _NOEXCEPT
{return !(__x == __y);}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator!=(const error_condition& __x, const error_condition& __y) _NOEXCEPT
{return !(__x == __y);}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<(const error_condition& __x, const error_condition& __y) _NOEXCEPT
{
return __x.category() < __y.category()
|| (__x.category() == __y.category() && __x.value() < __y.value());
}
inline _LIBCPP_INLINE_VISIBILITY
bool
operator<(const error_code& __x, const error_code& __y) _NOEXCEPT
{
return __x.category() < __y.category()
|| (__x.category() == __y.category() && __x.value() < __y.value());
}
#else // _LIBCPP_STD_VER <= 17
inline _LIBCPP_HIDE_FROM_ABI strong_ordering
operator<=>(const error_code& __x, const error_code& __y) noexcept
{
if (auto __c = __x.category() <=> __y.category(); __c != 0)
return __c;
return __x.value() <=> __y.value();
}
inline _LIBCPP_HIDE_FROM_ABI strong_ordering
operator<=>(const error_condition& __x, const error_condition& __y) noexcept
{
if (auto __c = __x.category() <=> __y.category(); __c != 0)
return __c;
return __x.value() <=> __y.value();
}
#endif // _LIBCPP_STD_VER <= 17
template <>
struct _LIBCPP_TEMPLATE_VIS hash<error_code>
: public __unary_function<error_code, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(const error_code& __ec) const _NOEXCEPT
{
return static_cast<size_t>(__ec.value());
}
};
template <>
struct _LIBCPP_TEMPLATE_VIS hash<error_condition>
: public __unary_function<error_condition, size_t>
{
_LIBCPP_INLINE_VISIBILITY
size_t operator()(const error_condition& __ec) const _NOEXCEPT
{
return static_cast<size_t>(__ec.value());
}
};
// system_error
class _LIBCPP_TYPE_VIS system_error
: public runtime_error
{
error_code __ec_;
public:
system_error(error_code __ec, const string& __what_arg);
system_error(error_code __ec, const char* __what_arg);
system_error(error_code __ec);
system_error(int __ev, const error_category& __ecat, const string& __what_arg);
system_error(int __ev, const error_category& __ecat, const char* __what_arg);
system_error(int __ev, const error_category& __ecat);
system_error(const system_error&) _NOEXCEPT = default;
~system_error() _NOEXCEPT override;
_LIBCPP_INLINE_VISIBILITY
const error_code& code() const _NOEXCEPT {return __ec_;}
private:
static string __init(const error_code&, string);
};
_LIBCPP_NORETURN _LIBCPP_FUNC_VIS
void __throw_system_error(int __ev, const char* __what_arg);
_LIBCPP_END_NAMESPACE_STD
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <cstdint>
# include <cstring>
# include <limits>
# include <type_traits>
#endif

View File

@@ -100,17 +100,19 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
#include <__format/formatter_integral.h>
#include <__format/parser_std_format_spec.h>
#include <__functional/hash.h>
#include <__functional/unary_function.h>
#include <__memory/addressof.h>
#include <__memory/unique_ptr.h>
#include <__mutex/mutex.h>
#include <__mutex/unique_lock.h>
#include <__system_error/system_error.h>
#include <__thread/poll_with_backoff.h>
#include <__thread/timed_backoff_policy.h>
#include <__threading_support>
#include <__utility/forward.h>
#include <cstddef>
#include <cstdint>
#include <iosfwd>
#include <system_error>
#include <tuple>
#include <version>
@@ -469,10 +471,10 @@ _LIBCPP_POP_MACROS
#endif
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
# include <cstdint>
# include <cstring>
# include <functional>
# include <new>
# include <system_error>
#endif
#endif // _LIBCPP_THREAD

View File

@@ -12,9 +12,9 @@
#define _LARGE_TIME_API
#endif
#include <cerrno> // errno
#include <__system_error/system_error.h>
#include <cerrno> // errno
#include <chrono>
#include <system_error> // __throw_system_error
#if defined(__MVS__)
#include <__support/ibm/gettod_zos.h> // gettimeofdayMonotonic

View File

@@ -12,7 +12,6 @@
#include <condition_variable>
#include <thread>
#include <system_error>
#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
# pragma comment(lib, "pthread")

View File

@@ -18,8 +18,8 @@
#include <ctime>
#include <filesystem>
#include <ratio>
#include <system_error>
#include <utility>
#include <system_error>
#if defined(_LIBCPP_WIN32API)
# define WIN32_LEAN_AND_MEAN

View File

@@ -9,7 +9,6 @@
#include <__assert>
#include <limits>
#include <mutex>
#include <system_error>
#include "include/atomic_support.h"

View File

@@ -13,9 +13,9 @@
# define _CRT_RAND_S
#endif // defined(_LIBCPP_USING_WIN32_RANDOM)
#include <__system_error/system_error.h>
#include <limits>
#include <random>
#include <system_error>
#if defined(__sun__)
# define rename solaris_headers_are_broken

View File

@@ -43,7 +43,6 @@
#include <__config>
#include <charconv>
#include <cstring>
#include <system_error>
#include "include/ryu/common.h"
#include "include/ryu/d2fixed.h"

View File

@@ -9,7 +9,6 @@
#include <new>
#include <stdexcept>
#include <string>
#include <system_error>
#ifdef _LIBCPP_ABI_VCRUNTIME
#include "support/runtime/stdexcept_vcruntime.ipp"

View File

@@ -604,6 +604,10 @@ END-SCRIPT
#include <__string/char_traits.h> // expected-error@*:* {{use of private header from outside its module: '__string/char_traits.h'}}
#include <__string/constexpr_c_functions.h> // expected-error@*:* {{use of private header from outside its module: '__string/constexpr_c_functions.h'}}
#include <__string/extern_template_lists.h> // expected-error@*:* {{use of private header from outside its module: '__string/extern_template_lists.h'}}
#include <__system_error/error_category.h> // expected-error@*:* {{use of private header from outside its module: '__system_error/error_category.h'}}
#include <__system_error/error_code.h> // expected-error@*:* {{use of private header from outside its module: '__system_error/error_code.h'}}
#include <__system_error/error_condition.h> // expected-error@*:* {{use of private header from outside its module: '__system_error/error_condition.h'}}
#include <__system_error/system_error.h> // expected-error@*:* {{use of private header from outside its module: '__system_error/system_error.h'}}
#include <__thread/poll_with_backoff.h> // expected-error@*:* {{use of private header from outside its module: '__thread/poll_with_backoff.h'}}
#include <__thread/timed_backoff_policy.h> // expected-error@*:* {{use of private header from outside its module: '__thread/timed_backoff_policy.h'}}
#include <__tuple_dir/apply_cv.h> // expected-error@*:* {{use of private header from outside its module: '__tuple_dir/apply_cv.h'}}

View File

@@ -158,6 +158,7 @@ concepts cstddef
concepts type_traits
concepts version
condition_variable atomic
condition_variable cerrno
condition_variable concepts
condition_variable cstddef
condition_variable cstdint
@@ -170,6 +171,7 @@ condition_variable limits
condition_variable new
condition_variable ratio
condition_variable stdexcept
condition_variable string
condition_variable system_error
condition_variable type_traits
condition_variable typeinfo
@@ -394,6 +396,7 @@ functional utility
functional vector
functional version
future atomic
future cerrno
future chrono
future cstddef
future cstdint
@@ -407,6 +410,7 @@ future mutex
future new
future ratio
future stdexcept
future string
future system_error
future thread
future type_traits
@@ -492,6 +496,7 @@ list typeinfo
list version
locale atomic
locale cctype
locale cerrno
locale concepts
locale cstdarg
locale cstddef
@@ -555,6 +560,7 @@ memory_resource stdexcept
memory_resource tuple
memory_resource version
mutex atomic
mutex cerrno
mutex concepts
mutex cstddef
mutex cstdint
@@ -568,6 +574,7 @@ mutex limits
mutex new
mutex ratio
mutex stdexcept
mutex string
mutex system_error
mutex type_traits
mutex typeinfo
@@ -611,6 +618,7 @@ optional variant
optional version
ostream atomic
ostream bitset
ostream cerrno
ostream concepts
ostream cstddef
ostream cstdint
@@ -625,6 +633,7 @@ ostream locale
ostream new
ostream stdexcept
ostream streambuf
ostream string
ostream type_traits
ostream typeinfo
ostream version
@@ -739,6 +748,8 @@ shared_mutex ctime
shared_mutex iosfwd
shared_mutex limits
shared_mutex ratio
shared_mutex stdexcept
shared_mutex string
shared_mutex system_error
shared_mutex type_traits
shared_mutex version
@@ -829,6 +840,7 @@ system_error string
system_error type_traits
system_error version
thread array
thread cerrno
thread chrono
thread compare
thread cstddef
@@ -841,6 +853,7 @@ thread limits
thread locale
thread new
thread ratio
thread stdexcept
thread string
thread string_view
thread system_error
1 algorithm atomic
158 concepts type_traits
159 concepts version
160 condition_variable atomic
161 condition_variable cerrno
162 condition_variable concepts
163 condition_variable cstddef
164 condition_variable cstdint
171 condition_variable new
172 condition_variable ratio
173 condition_variable stdexcept
174 condition_variable string
175 condition_variable system_error
176 condition_variable type_traits
177 condition_variable typeinfo
396 functional vector
397 functional version
398 future atomic
399 future cerrno
400 future chrono
401 future cstddef
402 future cstdint
410 future new
411 future ratio
412 future stdexcept
413 future string
414 future system_error
415 future thread
416 future type_traits
496 list version
497 locale atomic
498 locale cctype
499 locale cerrno
500 locale concepts
501 locale cstdarg
502 locale cstddef
560 memory_resource tuple
561 memory_resource version
562 mutex atomic
563 mutex cerrno
564 mutex concepts
565 mutex cstddef
566 mutex cstdint
574 mutex new
575 mutex ratio
576 mutex stdexcept
577 mutex string
578 mutex system_error
579 mutex type_traits
580 mutex typeinfo
618 optional version
619 ostream atomic
620 ostream bitset
621 ostream cerrno
622 ostream concepts
623 ostream cstddef
624 ostream cstdint
633 ostream new
634 ostream stdexcept
635 ostream streambuf
636 ostream string
637 ostream type_traits
638 ostream typeinfo
639 ostream version
748 shared_mutex iosfwd
749 shared_mutex limits
750 shared_mutex ratio
751 shared_mutex stdexcept
752 shared_mutex string
753 shared_mutex system_error
754 shared_mutex type_traits
755 shared_mutex version
840 system_error type_traits
841 system_error version
842 thread array
843 thread cerrno
844 thread chrono
845 thread compare
846 thread cstddef
853 thread locale
854 thread new
855 thread ratio
856 thread stdexcept
857 thread string
858 thread string_view
859 thread system_error

View File

@@ -158,6 +158,7 @@ concepts cstddef
concepts type_traits
concepts version
condition_variable atomic
condition_variable cerrno
condition_variable concepts
condition_variable cstddef
condition_variable cstdint
@@ -170,6 +171,7 @@ condition_variable limits
condition_variable new
condition_variable ratio
condition_variable stdexcept
condition_variable string
condition_variable system_error
condition_variable type_traits
condition_variable typeinfo
@@ -394,6 +396,7 @@ functional utility
functional vector
functional version
future atomic
future cerrno
future chrono
future cstddef
future cstdint
@@ -407,6 +410,7 @@ future mutex
future new
future ratio
future stdexcept
future string
future system_error
future thread
future type_traits
@@ -492,6 +496,7 @@ list typeinfo
list version
locale atomic
locale cctype
locale cerrno
locale concepts
locale cstdarg
locale cstddef
@@ -555,6 +560,7 @@ memory_resource stdexcept
memory_resource tuple
memory_resource version
mutex atomic
mutex cerrno
mutex concepts
mutex cstddef
mutex cstdint
@@ -568,6 +574,7 @@ mutex limits
mutex new
mutex ratio
mutex stdexcept
mutex string
mutex system_error
mutex tuple
mutex type_traits
@@ -612,6 +619,7 @@ optional variant
optional version
ostream atomic
ostream bitset
ostream cerrno
ostream concepts
ostream cstddef
ostream cstdint
@@ -626,6 +634,7 @@ ostream locale
ostream new
ostream stdexcept
ostream streambuf
ostream string
ostream type_traits
ostream typeinfo
ostream version
@@ -740,6 +749,8 @@ shared_mutex ctime
shared_mutex iosfwd
shared_mutex limits
shared_mutex ratio
shared_mutex stdexcept
shared_mutex string
shared_mutex system_error
shared_mutex type_traits
shared_mutex version
@@ -830,6 +841,7 @@ system_error string
system_error type_traits
system_error version
thread array
thread cerrno
thread chrono
thread compare
thread cstddef
@@ -842,6 +854,7 @@ thread limits
thread locale
thread new
thread ratio
thread stdexcept
thread string
thread string_view
thread system_error
1 algorithm atomic
158 concepts type_traits
159 concepts version
160 condition_variable atomic
161 condition_variable cerrno
162 condition_variable concepts
163 condition_variable cstddef
164 condition_variable cstdint
171 condition_variable new
172 condition_variable ratio
173 condition_variable stdexcept
174 condition_variable string
175 condition_variable system_error
176 condition_variable type_traits
177 condition_variable typeinfo
396 functional vector
397 functional version
398 future atomic
399 future cerrno
400 future chrono
401 future cstddef
402 future cstdint
410 future new
411 future ratio
412 future stdexcept
413 future string
414 future system_error
415 future thread
416 future type_traits
496 list version
497 locale atomic
498 locale cctype
499 locale cerrno
500 locale concepts
501 locale cstdarg
502 locale cstddef
560 memory_resource tuple
561 memory_resource version
562 mutex atomic
563 mutex cerrno
564 mutex concepts
565 mutex cstddef
566 mutex cstdint
574 mutex new
575 mutex ratio
576 mutex stdexcept
577 mutex string
578 mutex system_error
579 mutex tuple
580 mutex type_traits
619 optional version
620 ostream atomic
621 ostream bitset
622 ostream cerrno
623 ostream concepts
624 ostream cstddef
625 ostream cstdint
634 ostream new
635 ostream stdexcept
636 ostream streambuf
637 ostream string
638 ostream type_traits
639 ostream typeinfo
640 ostream version
749 shared_mutex iosfwd
750 shared_mutex limits
751 shared_mutex ratio
752 shared_mutex stdexcept
753 shared_mutex string
754 shared_mutex system_error
755 shared_mutex type_traits
756 shared_mutex version
841 system_error type_traits
842 system_error version
843 thread array
844 thread cerrno
845 thread chrono
846 thread compare
847 thread cstddef
854 thread locale
855 thread new
856 thread ratio
857 thread stdexcept
858 thread string
859 thread string_view
860 thread system_error

View File

@@ -158,6 +158,7 @@ concepts cstddef
concepts type_traits
concepts version
condition_variable atomic
condition_variable cerrno
condition_variable concepts
condition_variable cstddef
condition_variable cstdint
@@ -170,6 +171,7 @@ condition_variable limits
condition_variable new
condition_variable ratio
condition_variable stdexcept
condition_variable string
condition_variable system_error
condition_variable type_traits
condition_variable typeinfo
@@ -396,6 +398,7 @@ functional utility
functional vector
functional version
future atomic
future cerrno
future chrono
future cstddef
future cstdint
@@ -409,6 +412,7 @@ future mutex
future new
future ratio
future stdexcept
future string
future system_error
future thread
future type_traits
@@ -494,6 +498,7 @@ list typeinfo
list version
locale atomic
locale cctype
locale cerrno
locale concepts
locale cstdarg
locale cstddef
@@ -557,6 +562,7 @@ memory_resource stdexcept
memory_resource tuple
memory_resource version
mutex atomic
mutex cerrno
mutex concepts
mutex cstddef
mutex cstdint
@@ -570,6 +576,7 @@ mutex limits
mutex new
mutex ratio
mutex stdexcept
mutex string
mutex system_error
mutex tuple
mutex type_traits
@@ -614,6 +621,7 @@ optional variant
optional version
ostream atomic
ostream bitset
ostream cerrno
ostream concepts
ostream cstddef
ostream cstdint
@@ -628,6 +636,7 @@ ostream locale
ostream new
ostream stdexcept
ostream streambuf
ostream string
ostream type_traits
ostream typeinfo
ostream version
@@ -742,6 +751,8 @@ shared_mutex ctime
shared_mutex iosfwd
shared_mutex limits
shared_mutex ratio
shared_mutex stdexcept
shared_mutex string
shared_mutex system_error
shared_mutex type_traits
shared_mutex version
@@ -832,6 +843,7 @@ system_error string
system_error type_traits
system_error version
thread array
thread cerrno
thread chrono
thread compare
thread cstddef
@@ -844,6 +856,7 @@ thread limits
thread locale
thread new
thread ratio
thread stdexcept
thread string
thread string_view
thread system_error
1 algorithm atomic
158 concepts type_traits
159 concepts version
160 condition_variable atomic
161 condition_variable cerrno
162 condition_variable concepts
163 condition_variable cstddef
164 condition_variable cstdint
171 condition_variable new
172 condition_variable ratio
173 condition_variable stdexcept
174 condition_variable string
175 condition_variable system_error
176 condition_variable type_traits
177 condition_variable typeinfo
398 functional vector
399 functional version
400 future atomic
401 future cerrno
402 future chrono
403 future cstddef
404 future cstdint
412 future new
413 future ratio
414 future stdexcept
415 future string
416 future system_error
417 future thread
418 future type_traits
498 list version
499 locale atomic
500 locale cctype
501 locale cerrno
502 locale concepts
503 locale cstdarg
504 locale cstddef
562 memory_resource tuple
563 memory_resource version
564 mutex atomic
565 mutex cerrno
566 mutex concepts
567 mutex cstddef
568 mutex cstdint
576 mutex new
577 mutex ratio
578 mutex stdexcept
579 mutex string
580 mutex system_error
581 mutex tuple
582 mutex type_traits
621 optional version
622 ostream atomic
623 ostream bitset
624 ostream cerrno
625 ostream concepts
626 ostream cstddef
627 ostream cstdint
636 ostream new
637 ostream stdexcept
638 ostream streambuf
639 ostream string
640 ostream type_traits
641 ostream typeinfo
642 ostream version
751 shared_mutex iosfwd
752 shared_mutex limits
753 shared_mutex ratio
754 shared_mutex stdexcept
755 shared_mutex string
756 shared_mutex system_error
757 shared_mutex type_traits
758 shared_mutex version
843 system_error type_traits
844 system_error version
845 thread array
846 thread cerrno
847 thread chrono
848 thread compare
849 thread cstddef
856 thread locale
857 thread new
858 thread ratio
859 thread stdexcept
860 thread string
861 thread string_view
862 thread system_error

View File

@@ -158,6 +158,7 @@ concepts cstddef
concepts type_traits
concepts version
condition_variable atomic
condition_variable cerrno
condition_variable concepts
condition_variable cstddef
condition_variable cstdint
@@ -170,6 +171,7 @@ condition_variable limits
condition_variable new
condition_variable ratio
condition_variable stdexcept
condition_variable string
condition_variable system_error
condition_variable type_traits
condition_variable typeinfo
@@ -396,6 +398,7 @@ functional utility
functional vector
functional version
future atomic
future cerrno
future chrono
future cstddef
future cstdint
@@ -409,6 +412,7 @@ future mutex
future new
future ratio
future stdexcept
future string
future system_error
future thread
future type_traits
@@ -494,6 +498,7 @@ list typeinfo
list version
locale atomic
locale cctype
locale cerrno
locale concepts
locale cstdarg
locale cstddef
@@ -557,6 +562,7 @@ memory_resource stdexcept
memory_resource tuple
memory_resource version
mutex atomic
mutex cerrno
mutex concepts
mutex cstddef
mutex cstdint
@@ -570,6 +576,7 @@ mutex limits
mutex new
mutex ratio
mutex stdexcept
mutex string
mutex system_error
mutex tuple
mutex type_traits
@@ -614,6 +621,7 @@ optional variant
optional version
ostream atomic
ostream bitset
ostream cerrno
ostream concepts
ostream cstddef
ostream cstdint
@@ -628,6 +636,7 @@ ostream locale
ostream new
ostream stdexcept
ostream streambuf
ostream string
ostream type_traits
ostream typeinfo
ostream version
@@ -742,6 +751,8 @@ shared_mutex ctime
shared_mutex iosfwd
shared_mutex limits
shared_mutex ratio
shared_mutex stdexcept
shared_mutex string
shared_mutex system_error
shared_mutex type_traits
shared_mutex version
@@ -832,6 +843,7 @@ system_error string
system_error type_traits
system_error version
thread array
thread cerrno
thread chrono
thread compare
thread cstddef
@@ -844,6 +856,7 @@ thread limits
thread locale
thread new
thread ratio
thread stdexcept
thread string
thread string_view
thread system_error
1 algorithm atomic
158 concepts type_traits
159 concepts version
160 condition_variable atomic
161 condition_variable cerrno
162 condition_variable concepts
163 condition_variable cstddef
164 condition_variable cstdint
171 condition_variable new
172 condition_variable ratio
173 condition_variable stdexcept
174 condition_variable string
175 condition_variable system_error
176 condition_variable type_traits
177 condition_variable typeinfo
398 functional vector
399 functional version
400 future atomic
401 future cerrno
402 future chrono
403 future cstddef
404 future cstdint
412 future new
413 future ratio
414 future stdexcept
415 future string
416 future system_error
417 future thread
418 future type_traits
498 list version
499 locale atomic
500 locale cctype
501 locale cerrno
502 locale concepts
503 locale cstdarg
504 locale cstddef
562 memory_resource tuple
563 memory_resource version
564 mutex atomic
565 mutex cerrno
566 mutex concepts
567 mutex cstddef
568 mutex cstdint
576 mutex new
577 mutex ratio
578 mutex stdexcept
579 mutex string
580 mutex system_error
581 mutex tuple
582 mutex type_traits
621 optional version
622 ostream atomic
623 ostream bitset
624 ostream cerrno
625 ostream concepts
626 ostream cstddef
627 ostream cstdint
636 ostream new
637 ostream stdexcept
638 ostream streambuf
639 ostream string
640 ostream type_traits
641 ostream typeinfo
642 ostream version
751 shared_mutex iosfwd
752 shared_mutex limits
753 shared_mutex ratio
754 shared_mutex stdexcept
755 shared_mutex string
756 shared_mutex system_error
757 shared_mutex type_traits
758 shared_mutex version
843 system_error type_traits
844 system_error version
845 thread array
846 thread cerrno
847 thread chrono
848 thread compare
849 thread cstddef
856 thread locale
857 thread new
858 thread ratio
859 thread stdexcept
860 thread string
861 thread string_view
862 thread system_error

View File

@@ -165,6 +165,7 @@ concepts cstddef
concepts type_traits
concepts version
condition_variable atomic
condition_variable cerrno
condition_variable concepts
condition_variable cstddef
condition_variable cstdint
@@ -177,6 +178,7 @@ condition_variable limits
condition_variable new
condition_variable ratio
condition_variable stdexcept
condition_variable string
condition_variable system_error
condition_variable type_traits
condition_variable typeinfo
@@ -403,6 +405,7 @@ functional utility
functional vector
functional version
future atomic
future cerrno
future cstddef
future cstdint
future cstdlib
@@ -415,6 +418,7 @@ future mutex
future new
future ratio
future stdexcept
future string
future system_error
future thread
future type_traits
@@ -500,6 +504,7 @@ list typeinfo
list version
locale atomic
locale cctype
locale cerrno
locale concepts
locale cstdarg
locale cstddef
@@ -563,6 +568,7 @@ memory_resource stdexcept
memory_resource tuple
memory_resource version
mutex atomic
mutex cerrno
mutex concepts
mutex cstddef
mutex cstdint
@@ -576,6 +582,7 @@ mutex limits
mutex new
mutex ratio
mutex stdexcept
mutex string
mutex system_error
mutex tuple
mutex type_traits
@@ -620,6 +627,7 @@ optional variant
optional version
ostream atomic
ostream bitset
ostream cerrno
ostream concepts
ostream cstddef
ostream cstdint
@@ -634,6 +642,7 @@ ostream locale
ostream new
ostream stdexcept
ostream streambuf
ostream string
ostream type_traits
ostream typeinfo
ostream version
@@ -748,6 +757,8 @@ shared_mutex ctime
shared_mutex iosfwd
shared_mutex limits
shared_mutex ratio
shared_mutex stdexcept
shared_mutex string
shared_mutex system_error
shared_mutex type_traits
shared_mutex version
@@ -838,6 +849,7 @@ system_error string
system_error type_traits
system_error version
thread array
thread cerrno
thread compare
thread cstddef
thread cstdint
1 algorithm atomic
165 concepts type_traits
166 concepts version
167 condition_variable atomic
168 condition_variable cerrno
169 condition_variable concepts
170 condition_variable cstddef
171 condition_variable cstdint
178 condition_variable new
179 condition_variable ratio
180 condition_variable stdexcept
181 condition_variable string
182 condition_variable system_error
183 condition_variable type_traits
184 condition_variable typeinfo
405 functional vector
406 functional version
407 future atomic
408 future cerrno
409 future cstddef
410 future cstdint
411 future cstdlib
418 future new
419 future ratio
420 future stdexcept
421 future string
422 future system_error
423 future thread
424 future type_traits
504 list version
505 locale atomic
506 locale cctype
507 locale cerrno
508 locale concepts
509 locale cstdarg
510 locale cstddef
568 memory_resource tuple
569 memory_resource version
570 mutex atomic
571 mutex cerrno
572 mutex concepts
573 mutex cstddef
574 mutex cstdint
582 mutex new
583 mutex ratio
584 mutex stdexcept
585 mutex string
586 mutex system_error
587 mutex tuple
588 mutex type_traits
627 optional version
628 ostream atomic
629 ostream bitset
630 ostream cerrno
631 ostream concepts
632 ostream cstddef
633 ostream cstdint
642 ostream new
643 ostream stdexcept
644 ostream streambuf
645 ostream string
646 ostream type_traits
647 ostream typeinfo
648 ostream version
757 shared_mutex iosfwd
758 shared_mutex limits
759 shared_mutex ratio
760 shared_mutex stdexcept
761 shared_mutex string
762 shared_mutex system_error
763 shared_mutex type_traits
764 shared_mutex version
849 system_error type_traits
850 system_error version
851 thread array
852 thread cerrno
853 thread compare
854 thread cstddef
855 thread cstdint

View File

@@ -103,6 +103,7 @@ complex stdexcept
complex version
concepts cstddef
concepts version
condition_variable cerrno
condition_variable cstddef
condition_variable ctime
condition_variable iosfwd
@@ -110,7 +111,7 @@ condition_variable limits
condition_variable new
condition_variable ratio
condition_variable stdexcept
condition_variable system_error
condition_variable string
condition_variable typeinfo
condition_variable version
coroutine compare
@@ -213,7 +214,6 @@ filesystem new
filesystem ratio
filesystem string
filesystem string_view
filesystem system_error
filesystem version
format array
format cmath
@@ -271,6 +271,7 @@ functional typeinfo
functional unordered_map
functional vector
functional version
future cerrno
future cstddef
future cstdint
future cstdlib
@@ -282,7 +283,7 @@ future mutex
future new
future ratio
future stdexcept
future system_error
future string
future thread
future typeinfo
future version
@@ -297,7 +298,6 @@ ios cstring
ios iosfwd
ios mutex
ios string
ios system_error
ios version
iosfwd version
iostream ios
@@ -337,6 +337,7 @@ list stdexcept
list tuple
list version
locale cctype
locale cerrno
locale cstddef
locale cstdint
locale cstdio
@@ -381,6 +382,7 @@ memory_resource new
memory_resource stdexcept
memory_resource tuple
memory_resource version
mutex cerrno
mutex cstddef
mutex cstdint
mutex ctime
@@ -389,7 +391,7 @@ mutex limits
mutex new
mutex ratio
mutex stdexcept
mutex system_error
mutex string
mutex tuple
mutex typeinfo
mutex version
@@ -411,6 +413,7 @@ optional new
optional stdexcept
optional version
ostream bitset
ostream cerrno
ostream cstddef
ostream cstdint
ostream cstring
@@ -422,6 +425,7 @@ ostream locale
ostream new
ostream stdexcept
ostream streambuf
ostream string
ostream typeinfo
ostream version
queue compare
@@ -498,7 +502,8 @@ shared_mutex ctime
shared_mutex iosfwd
shared_mutex limits
shared_mutex ratio
shared_mutex system_error
shared_mutex stdexcept
shared_mutex string
shared_mutex version
source_location cstdint
source_location version
@@ -554,13 +559,11 @@ strstream version
system_error cerrno
system_error compare
system_error cstddef
system_error cstdint
system_error cstring
system_error limits
system_error stdexcept
system_error string
system_error version
thread array
thread cerrno
thread compare
thread cstddef
thread cstdint
@@ -573,7 +576,6 @@ thread ratio
thread stdexcept
thread string
thread string_view
thread system_error
thread tuple
thread vector
thread version
1 algorithm climits
103 complex version
104 concepts cstddef
105 concepts version
106 condition_variable cerrno
107 condition_variable cstddef
108 condition_variable ctime
109 condition_variable iosfwd
111 condition_variable new
112 condition_variable ratio
113 condition_variable stdexcept
114 condition_variable system_error condition_variable string
115 condition_variable typeinfo
116 condition_variable version
117 coroutine compare
214 filesystem ratio
215 filesystem string
216 filesystem string_view
filesystem system_error
217 filesystem version
218 format array
219 format cmath
271 functional unordered_map
272 functional vector
273 functional version
274 future cerrno
275 future cstddef
276 future cstdint
277 future cstdlib
283 future new
284 future ratio
285 future stdexcept
286 future system_error future string
287 future thread
288 future typeinfo
289 future version
298 ios iosfwd
299 ios mutex
300 ios string
ios system_error
301 ios version
302 iosfwd version
303 iostream ios
337 list tuple
338 list version
339 locale cctype
340 locale cerrno
341 locale cstddef
342 locale cstdint
343 locale cstdio
382 memory_resource stdexcept
383 memory_resource tuple
384 memory_resource version
385 mutex cerrno
386 mutex cstddef
387 mutex cstdint
388 mutex ctime
391 mutex new
392 mutex ratio
393 mutex stdexcept
394 mutex system_error mutex string
395 mutex tuple
396 mutex typeinfo
397 mutex version
413 optional stdexcept
414 optional version
415 ostream bitset
416 ostream cerrno
417 ostream cstddef
418 ostream cstdint
419 ostream cstring
425 ostream new
426 ostream stdexcept
427 ostream streambuf
428 ostream string
429 ostream typeinfo
430 ostream version
431 queue compare
502 shared_mutex iosfwd
503 shared_mutex limits
504 shared_mutex ratio
505 shared_mutex system_error shared_mutex stdexcept
506 shared_mutex string
507 shared_mutex version
508 source_location cstdint
509 source_location version
559 system_error cerrno
560 system_error compare
561 system_error cstddef
system_error cstdint
system_error cstring
system_error limits
562 system_error stdexcept
563 system_error string
564 system_error version
565 thread array
566 thread cerrno
567 thread compare
568 thread cstddef
569 thread cstdint
576 thread stdexcept
577 thread string
578 thread string_view
thread system_error
579 thread tuple
580 thread vector
581 thread version

View File

@@ -12,6 +12,7 @@
// template <class T> constexpr bool is_error_condition_enum_v;
#include <string>
#include <system_error>
#include <type_traits>
#include "test_macros.h"

View File

@@ -14,6 +14,7 @@
#include <system_error>
#include <cassert>
#include <type_traits>
#include "test_macros.h"

View File

@@ -14,6 +14,7 @@
#include <system_error>
#include <cassert>
#include <type_traits>
#include "test_macros.h"

View File

@@ -29,6 +29,7 @@
// throw.
#include <random>
#include <string>
#include <system_error>
#include <cassert>

View File

@@ -16,6 +16,7 @@
#include <random>
#include <cassert>
#include <string>
#include <system_error>
#include "test_macros.h"

View File

@@ -16,6 +16,7 @@
#include <future>
#include <cassert>
#include <system_error>
#include "test_macros.h"

View File

@@ -23,6 +23,7 @@
#include <cstdlib>
#include <mutex>
#include <shared_mutex>
#include <system_error>
#include <thread>
#include <vector>

View File

@@ -17,6 +17,7 @@
#include <shared_mutex>
#include <cassert>
#include <cerrno>
#include <system_error>
#include "test_macros.h"

View File

@@ -20,6 +20,7 @@
#include <chrono>
#include <cstdlib>
#include <mutex>
#include <system_error>
#include <thread>
#include "make_test_thread.h"

View File

@@ -611,7 +611,10 @@ libcxx/include/__support/newlib/xlocale.h
libcxx/include/__support/solaris/xlocale.h
libcxx/include/__support/win32/locale_win32.h
libcxx/include/__support/xlocale/__nop_locale_mgmt.h
libcxx/include/system_error
libcxx/include/__system_error/error_category.h
libcxx/include/__system_error/error_code.h
libcxx/include/__system_error/error_condition.h
libcxx/include/__system_error/system_error.h
libcxx/include/thread
libcxx/include/__threading_support
libcxx/include/__thread/poll_with_backoff.h