55#ifndef _GLIBCXX_UTILITY
56#define _GLIBCXX_UTILITY 1
59#pragma GCC system_header
73#if __cplusplus >= 201103L
80#if __cplusplus >= 202002L
84#if __cplusplus > 202302L
88#define __glibcxx_want_addressof_constexpr
89#define __glibcxx_want_as_const
90#define __glibcxx_want_constant_wrapper
91#define __glibcxx_want_constexpr_algorithms
92#define __glibcxx_want_constexpr_utility
93#define __glibcxx_want_exchange_function
94#define __glibcxx_want_forward_like
95#define __glibcxx_want_integer_comparison_functions
96#define __glibcxx_want_integer_sequence
97#define __glibcxx_want_ranges_zip
98#define __glibcxx_want_to_underlying
99#define __glibcxx_want_tuple_element_t
100#define __glibcxx_want_tuples_by_type
101#define __glibcxx_want_unreachable
102#define __glibcxx_want_observable_checkpoint
103#define __glibcxx_want_tuple_like
104#define __glibcxx_want_constrained_equality
107namespace std _GLIBCXX_VISIBILITY(default)
109_GLIBCXX_BEGIN_NAMESPACE_VERSION
111#ifdef __cpp_lib_exchange_function
113 template <typename _Tp, typename _Up = _Tp>
116 exchange(_Tp& __obj, _Up&& __new_val)
117 noexcept(__and_<is_nothrow_move_constructible<_Tp>,
118 is_nothrow_assignable<_Tp&, _Up>>::value)
119 {
return std::__exchange(__obj, std::forward<_Up>(__new_val)); }
122#ifdef __cpp_lib_as_const
123 template<
typename _Tp>
125 constexpr add_const_t<_Tp>&
126 as_const(_Tp& __t)
noexcept
129 template<
typename _Tp>
130 void as_const(
const _Tp&&) =
delete;
133#ifdef __cpp_lib_to_underlying
135 template<typename _Tp>
136 [[nodiscard, __gnu__::__always_inline__]]
137 constexpr underlying_type_t<_Tp>
138 to_underlying(_Tp __value)
noexcept
139 {
return static_cast<underlying_type_t<_Tp>
>(__value); }
142#ifdef __cpp_lib_unreachable
155 [[noreturn,__gnu__::__always_inline__]]
160 std::__glibcxx_assert_fail(
nullptr, 0,
"std::unreachable()",
nullptr);
161#elif defined _GLIBCXX_ASSERTIONS
164 __builtin_unreachable();
170#ifdef __cpp_lib_observable_checkpoint
179 [[__gnu__::__always_inline__]]
181 observable_checkpoint() noexcept
183 return __builtin_observable_checkpoint();
187_GLIBCXX_END_NAMESPACE_VERSION
ISO C++ entities toplevel namespace is std.