30#ifndef _GLIBCXX_RANGE_ACCESS_H
31#define _GLIBCXX_RANGE_ACCESS_H 1
33#pragma GCC system_header
35#if __cplusplus >= 201103L
40namespace std _GLIBCXX_VISIBILITY(default)
42_GLIBCXX_BEGIN_NAMESPACE_VERSION
49 template<
typename _Container>
50 [[__nodiscard__, __gnu__::__always_inline__]]
51 inline _GLIBCXX17_CONSTEXPR
auto
60 template<
typename _Container>
61 [[__nodiscard__, __gnu__::__always_inline__]]
62 inline _GLIBCXX17_CONSTEXPR
auto
71 template<
typename _Container>
72 [[__nodiscard__, __gnu__::__always_inline__]]
73 inline _GLIBCXX17_CONSTEXPR
auto
82 template<
typename _Container>
83 [[__nodiscard__, __gnu__::__always_inline__]]
84 inline _GLIBCXX17_CONSTEXPR
auto
92 template<
typename _Tp,
size_t _Nm>
93 [[__nodiscard__, __gnu__::__always_inline__]]
94 inline _GLIBCXX14_CONSTEXPR _Tp*
95 begin(_Tp (&__arr)[_Nm])
noexcept
103 template<
typename _Tp,
size_t _Nm>
104 [[__nodiscard__, __gnu__::__always_inline__]]
105 inline _GLIBCXX14_CONSTEXPR _Tp*
106 end(_Tp (&__arr)[_Nm])
noexcept
107 {
return __arr + _Nm; }
109#if __cplusplus >= 201402L
111 template<
typename _Tp>
class valarray;
113 template<
typename _Tp> _Tp*
begin(valarray<_Tp>&)
noexcept;
114 template<
typename _Tp>
const _Tp*
begin(
const valarray<_Tp>&)
noexcept;
115 template<
typename _Tp> _Tp*
end(valarray<_Tp>&)
noexcept;
116 template<
typename _Tp>
const _Tp*
end(
const valarray<_Tp>&)
noexcept;
123 template<
typename _Container>
124 [[__nodiscard__, __gnu__::__always_inline__]]
135 template<
typename _Container>
136 [[__nodiscard__, __gnu__::__always_inline__]]
147 template<
typename _Container>
148 [[__nodiscard__, __gnu__::__always_inline__]]
149 inline _GLIBCXX17_CONSTEXPR
auto
151 {
return __cont.rbegin(); }
158 template<
typename _Container>
159 [[__nodiscard__, __gnu__::__always_inline__]]
160 inline _GLIBCXX17_CONSTEXPR
auto
162 {
return __cont.rbegin(); }
169 template<
typename _Container>
170 [[__nodiscard__, __gnu__::__always_inline__]]
171 inline _GLIBCXX17_CONSTEXPR
auto
180 template<
typename _Container>
181 [[__nodiscard__, __gnu__::__always_inline__]]
182 inline _GLIBCXX17_CONSTEXPR
auto
191 template<
typename _Tp,
size_t _Nm>
193 inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Tp*>
202 template<
typename _Tp,
size_t _Nm>
204 inline _GLIBCXX17_CONSTEXPR reverse_iterator<_Tp*>
205 rend(_Tp (&__arr)[_Nm])
noexcept
213 template<
typename _Tp>
215 inline _GLIBCXX17_CONSTEXPR reverse_iterator<const _Tp*>
224 template<
typename _Tp>
226 inline _GLIBCXX17_CONSTEXPR reverse_iterator<const _Tp*>
235 template<
typename _Container>
236 [[__nodiscard__, __gnu__::__always_inline__]]
237 inline _GLIBCXX17_CONSTEXPR
auto
246 template<
typename _Container>
247 [[__nodiscard__, __gnu__::__always_inline__]]
248 inline _GLIBCXX17_CONSTEXPR
auto
254#ifdef __glibcxx_nonmember_container_access
259 template <
typename _Container>
260 [[nodiscard, __gnu__::__always_inline__]]
263 ->
decltype(
__cont.size())
269 template <
typename _Tp,
size_t _Nm>
270 [[nodiscard, __gnu__::__always_inline__]]
272 size(
const _Tp (&)[_Nm])
noexcept
279 template <
typename _Container>
280 [[nodiscard, __gnu__::__always_inline__]]
283 ->
decltype(
__cont.empty())
284 {
return __cont.empty(); }
289 template <
typename _Tp,
size_t _Nm>
290 [[nodiscard, __gnu__::__always_inline__]]
299 template <
typename _Tp>
300 [[nodiscard, __gnu__::__always_inline__]]
303 {
return __il.size() == 0;}
309 template <
typename _Container>
310 [[nodiscard, __gnu__::__always_inline__]]
313 ->
decltype(
__cont.data())
320 template <
typename _Container>
321 [[nodiscard, __gnu__::__always_inline__]]
324 ->
decltype(
__cont.data())
331 template <
typename _Tp,
size_t _Nm>
332 [[nodiscard, __gnu__::__always_inline__]]
334 data(_Tp (&__array)[_Nm])
noexcept
341 template <
typename _Tp>
342 [[nodiscard, __gnu__::__always_inline__]]
345 {
return __il.begin(); }
348#ifdef __glibcxx_ssize
349 template<
typename _Container>
350 [[nodiscard, __gnu__::__always_inline__]]
352 ssize(
const _Container&
__cont)
353 noexcept(
noexcept(
__cont.size()))
357 return static_cast<common_type_t<ptrdiff_t, type>
>(
__cont.size());
360 template<
typename _Tp, ptrdiff_t _Num>
361 [[nodiscard, __gnu__::__always_inline__]]
363 ssize(
const _Tp (&)[_Num])
noexcept
366_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.