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
55 ->
decltype(
__cont.begin())
63 template<
typename _Container>
64 [[__nodiscard__, __gnu__::__always_inline__]]
65 inline _GLIBCXX17_CONSTEXPR
auto
67 ->
decltype(
__cont.begin())
75 template<
typename _Container>
76 [[__nodiscard__, __gnu__::__always_inline__]]
77 inline _GLIBCXX17_CONSTEXPR
auto
87 template<
typename _Container>
88 [[__nodiscard__, __gnu__::__always_inline__]]
89 inline _GLIBCXX17_CONSTEXPR
auto
98 template<
typename _Tp,
size_t _Nm>
99 [[__nodiscard__, __gnu__::__always_inline__]]
100 inline _GLIBCXX14_CONSTEXPR _Tp*
109 template<
typename _Tp,
size_t _Nm>
110 [[__nodiscard__, __gnu__::__always_inline__]]
111 inline _GLIBCXX14_CONSTEXPR _Tp*
112 end(_Tp (&__arr)[_Nm])
noexcept
113 {
return __arr + _Nm; }
115#if __cplusplus >= 201402L
129 template<
typename _Container>
130 [[__nodiscard__, __gnu__::__always_inline__]]
141 template<
typename _Container>
142 [[__nodiscard__, __gnu__::__always_inline__]]
153 template<
typename _Container>
154 [[__nodiscard__, __gnu__::__always_inline__]]
155 inline _GLIBCXX17_CONSTEXPR
auto
157 {
return __cont.rbegin(); }
164 template<
typename _Container>
165 [[__nodiscard__, __gnu__::__always_inline__]]
166 inline _GLIBCXX17_CONSTEXPR
auto
168 {
return __cont.rbegin(); }
175 template<
typename _Container>
176 [[__nodiscard__, __gnu__::__always_inline__]]
177 inline _GLIBCXX17_CONSTEXPR
auto
186 template<
typename _Container>
187 [[__nodiscard__, __gnu__::__always_inline__]]
188 inline _GLIBCXX17_CONSTEXPR
auto
197 template<
typename _Tp,
size_t _Nm>
199 inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Tp*>
208 template<
typename _Tp,
size_t _Nm>
210 inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Tp*>
211 rend(_Tp (&__arr)[_Nm])
noexcept
219 template<
typename _Tp>
221 inline _GLIBCXX17_CONSTEXPR reverse_iterator<const _Tp*>
230 template<
typename _Tp>
232 inline _GLIBCXX17_CONSTEXPR reverse_iterator<const _Tp*>
241 template<
typename _Container>
242 [[__nodiscard__, __gnu__::__always_inline__]]
243 inline _GLIBCXX17_CONSTEXPR
auto
252 template<
typename _Container>
253 [[__nodiscard__, __gnu__::__always_inline__]]
254 inline _GLIBCXX17_CONSTEXPR
auto
260#ifdef __glibcxx_nonmember_container_access
265 template <
typename _Container>
266 [[nodiscard, __gnu__::__always_inline__]]
269 ->
decltype(
__cont.size())
275 template <
typename _Tp,
size_t _Nm>
276 [[nodiscard, __gnu__::__always_inline__]]
278 size(
const _Tp (&)[_Nm])
noexcept
285 template <
typename _Container>
286 [[nodiscard, __gnu__::__always_inline__]]
289 ->
decltype(
__cont.empty())
290 {
return __cont.empty(); }
295 template <
typename _Tp,
size_t _Nm>
296 [[nodiscard, __gnu__::__always_inline__]]
305 template <
typename _Tp>
306 [[nodiscard, __gnu__::__always_inline__]]
309 {
return __il.size() == 0;}
315 template <
typename _Container>
316 [[nodiscard, __gnu__::__always_inline__]]
319 ->
decltype(
__cont.data())
326 template <
typename _Container>
327 [[nodiscard, __gnu__::__always_inline__]]
330 ->
decltype(
__cont.data())
337 template <
typename _Tp,
size_t _Nm>
338 [[nodiscard, __gnu__::__always_inline__]]
340 data(_Tp (&__array)[_Nm])
noexcept
347 template <
typename _Tp>
348 [[nodiscard, __gnu__::__always_inline__]]
351 {
return __il.begin(); }
354#ifdef __glibcxx_ssize
355 template<
typename _Container>
356 [[nodiscard, __gnu__::__always_inline__]]
358 ssize(
const _Container&
__cont)
noexcept(
noexcept(
__cont.size()))
365 template<
typename _Tp, ptrdiff_t _Num>
366 [[nodiscard, __gnu__::__always_inline__]]
368 ssize(
const _Tp (&)[_Num])
noexcept
371_GLIBCXX_END_NAMESPACE_VERSION
typename make_signed< _Tp >::type make_signed_t
Alias template for make_signed.
typename common_type< _Tp... >::type common_type_t
Alias template for common_type.
_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.
Smart array designed to support numeric processing.