30#ifndef _GLIBCXX_RANGE_ACCESS_H
31#define _GLIBCXX_RANGE_ACCESS_H 1
34#pragma GCC system_header
37#if __cplusplus >= 201103L
42namespace std _GLIBCXX_VISIBILITY(default)
44_GLIBCXX_BEGIN_NAMESPACE_VERSION
51 template<
typename _Container>
52 [[__nodiscard__, __gnu__::__always_inline__]]
53 inline _GLIBCXX17_CONSTEXPR
auto
62 template<
typename _Container>
63 [[__nodiscard__, __gnu__::__always_inline__]]
64 inline _GLIBCXX17_CONSTEXPR
auto
73 template<
typename _Container>
74 [[__nodiscard__, __gnu__::__always_inline__]]
75 inline _GLIBCXX17_CONSTEXPR
auto
84 template<
typename _Container>
85 [[__nodiscard__, __gnu__::__always_inline__]]
86 inline _GLIBCXX17_CONSTEXPR
auto
94 template<
typename _Tp,
size_t _Nm>
95 [[__nodiscard__, __gnu__::__always_inline__]]
96 inline _GLIBCXX14_CONSTEXPR _Tp*
97 begin(_Tp (&__arr)[_Nm])
noexcept
105 template<
typename _Tp,
size_t _Nm>
106 [[__nodiscard__, __gnu__::__always_inline__]]
107 inline _GLIBCXX14_CONSTEXPR _Tp*
108 end(_Tp (&__arr)[_Nm])
noexcept
109 {
return __arr + _Nm; }
111#if __cplusplus >= 201402L
113 template<
typename _Tp>
class valarray;
115 template<
typename _Tp> _Tp*
begin(valarray<_Tp>&)
noexcept;
116 template<
typename _Tp>
const _Tp*
begin(
const valarray<_Tp>&)
noexcept;
117 template<
typename _Tp> _Tp*
end(valarray<_Tp>&)
noexcept;
118 template<
typename _Tp>
const _Tp*
end(
const valarray<_Tp>&)
noexcept;
125 template<
typename _Container>
126 [[__nodiscard__, __gnu__::__always_inline__]]
137 template<
typename _Container>
138 [[__nodiscard__, __gnu__::__always_inline__]]
149 template<
typename _Container>
150 [[__nodiscard__, __gnu__::__always_inline__]]
151 inline _GLIBCXX17_CONSTEXPR
auto
153 {
return __cont.rbegin(); }
160 template<
typename _Container>
161 [[__nodiscard__, __gnu__::__always_inline__]]
162 inline _GLIBCXX17_CONSTEXPR
auto
164 {
return __cont.rbegin(); }
171 template<
typename _Container>
172 [[__nodiscard__, __gnu__::__always_inline__]]
173 inline _GLIBCXX17_CONSTEXPR
auto
182 template<
typename _Container>
183 [[__nodiscard__, __gnu__::__always_inline__]]
184 inline _GLIBCXX17_CONSTEXPR
auto
193 template<
typename _Tp,
size_t _Nm>
195 inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Tp*>
204 template<
typename _Tp,
size_t _Nm>
206 inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Tp*>
207 rend(_Tp (&__arr)[_Nm])
noexcept
215 template<
typename _Tp>
217 inline _GLIBCXX17_CONSTEXPR reverse_iterator<const _Tp*>
226 template<
typename _Tp>
228 inline _GLIBCXX17_CONSTEXPR reverse_iterator<const _Tp*>
237 template<
typename _Container>
238 [[__nodiscard__, __gnu__::__always_inline__]]
239 inline _GLIBCXX17_CONSTEXPR
auto
248 template<
typename _Container>
249 [[__nodiscard__, __gnu__::__always_inline__]]
250 inline _GLIBCXX17_CONSTEXPR
auto
256#ifdef __glibcxx_nonmember_container_access
261 template <
typename _Container>
262 [[nodiscard, __gnu__::__always_inline__]]
265 ->
decltype(
__cont.size())
271 template <
typename _Tp,
size_t _Nm>
272 [[nodiscard, __gnu__::__always_inline__]]
274 size(
const _Tp (&)[_Nm])
noexcept
281 template <
typename _Container>
282 [[nodiscard, __gnu__::__always_inline__]]
285 ->
decltype(
__cont.empty())
286 {
return __cont.empty(); }
291 template <
typename _Tp,
size_t _Nm>
292 [[nodiscard, __gnu__::__always_inline__]]
301 template <
typename _Tp>
302 [[nodiscard, __gnu__::__always_inline__]]
305 {
return __il.size() == 0;}
311 template <
typename _Container>
312 [[nodiscard, __gnu__::__always_inline__]]
315 ->
decltype(
__cont.data())
322 template <
typename _Container>
323 [[nodiscard, __gnu__::__always_inline__]]
326 ->
decltype(
__cont.data())
333 template <
typename _Tp,
size_t _Nm>
334 [[nodiscard, __gnu__::__always_inline__]]
336 data(_Tp (&__array)[_Nm])
noexcept
343 template <
typename _Tp>
344 [[nodiscard, __gnu__::__always_inline__]]
347 {
return __il.begin(); }
350#ifdef __glibcxx_ssize
351 template<
typename _Container>
352 [[nodiscard, __gnu__::__always_inline__]]
354 ssize(
const _Container&
__cont)
355 noexcept(
noexcept(
__cont.size()))
359 return static_cast<common_type_t<ptrdiff_t, type>
>(
__cont.size());
362 template<
typename _Tp, ptrdiff_t _Num>
363 [[nodiscard, __gnu__::__always_inline__]]
365 ssize(
const _Tp (&)[_Num])
noexcept
368_GLIBCXX_END_NAMESPACE_VERSION
typename common_type< _Tp... >::type common_type_t
Alias template for common_type.
typename make_signed< _Tp >::type make_signed_t
Alias template for make_signed.
_Tp * end(valarray< _Tp > &__va) noexcept
Return an iterator pointing to one past the last element of the valarray.
_Tp * begin(valarray< _Tp > &__va) noexcept
Return an iterator pointing to the first element of the valarray.
ISO C++ entities toplevel namespace is std.
constexpr auto crend(const _Container &__cont) -> decltype(std::rend(__cont))
Return a reverse iterator pointing one past the first element of the const container.
constexpr auto rend(_Container &__cont) -> decltype(__cont.rend())
Return a reverse iterator pointing one past the first element of the container.
constexpr auto cend(const _Container &__cont) noexcept(noexcept(std::end(__cont))) -> decltype(std::end(__cont))
Return an iterator pointing to one past the last element of the const container.
constexpr auto empty(const _Container &__cont) noexcept(noexcept(__cont.empty())) -> decltype(__cont.empty())
Return whether a container is empty.
constexpr auto size(const _Container &__cont) noexcept(noexcept(__cont.size())) -> decltype(__cont.size())
Return the size of a container.
constexpr auto rbegin(_Container &__cont) -> decltype(__cont.rbegin())
Return a reverse iterator pointing to the last element of the container.
constexpr auto crbegin(const _Container &__cont) -> decltype(std::rbegin(__cont))
Return a reverse iterator pointing to the last element of the const container.
constexpr auto data(_Container &__cont) noexcept(noexcept(__cont.data())) -> decltype(__cont.data())
Return the data pointer of a container.
constexpr auto cbegin(const _Container &__cont) noexcept(noexcept(std::begin(__cont))) -> decltype(std::begin(__cont))
Return an iterator pointing to the first element of the const container.