30 #ifndef _GLIBCXX_RANGE_ACCESS_H 31 #define _GLIBCXX_RANGE_ACCESS_H 1 33 #pragma GCC system_header 35 #if __cplusplus >= 201103L 37 namespace std _GLIBCXX_VISIBILITY(default)
39 _GLIBCXX_BEGIN_NAMESPACE_VERSION
46 template<
typename _Container>
47 inline _GLIBCXX17_CONSTEXPR
auto 48 begin(_Container& __cont) -> decltype(__cont.begin())
49 {
return __cont.begin(); }
56 template<
typename _Container>
57 inline _GLIBCXX17_CONSTEXPR
auto 58 begin(
const _Container& __cont) -> decltype(__cont.begin())
59 {
return __cont.begin(); }
66 template<
typename _Container>
67 inline _GLIBCXX17_CONSTEXPR
auto 68 end(_Container& __cont) -> decltype(__cont.end())
69 {
return __cont.end(); }
76 template<
typename _Container>
77 inline _GLIBCXX17_CONSTEXPR
auto 78 end(
const _Container& __cont) -> decltype(__cont.end())
79 {
return __cont.end(); }
85 template<
typename _Tp,
size_t _Nm>
86 inline _GLIBCXX14_CONSTEXPR _Tp*
95 template<
typename _Tp,
size_t _Nm>
96 inline _GLIBCXX14_CONSTEXPR _Tp*
97 end(_Tp (&__arr)[_Nm])
98 {
return __arr + _Nm; }
100 #if __cplusplus >= 201402L 102 template<
typename _Tp>
class valarray;
114 template<
typename _Container>
115 inline constexpr
auto 125 template<
typename _Container>
126 inline constexpr
auto 136 template<
typename _Container>
137 inline _GLIBCXX17_CONSTEXPR
auto 138 rbegin(_Container& __cont) -> decltype(__cont.rbegin())
139 {
return __cont.rbegin(); }
146 template<
typename _Container>
147 inline _GLIBCXX17_CONSTEXPR
auto 148 rbegin(
const _Container& __cont) -> decltype(__cont.rbegin())
149 {
return __cont.rbegin(); }
156 template<
typename _Container>
157 inline _GLIBCXX17_CONSTEXPR
auto 158 rend(_Container& __cont) -> decltype(__cont.rend())
159 {
return __cont.rend(); }
166 template<
typename _Container>
167 inline _GLIBCXX17_CONSTEXPR
auto 168 rend(
const _Container& __cont) -> decltype(__cont.rend())
169 {
return __cont.rend(); }
176 template<
typename _Tp,
size_t _Nm>
186 template<
typename _Tp,
size_t _Nm>
196 template<
typename _Tp>
206 template<
typename _Tp>
216 template<
typename _Container>
217 inline _GLIBCXX17_CONSTEXPR
auto 226 template<
typename _Container>
227 inline _GLIBCXX17_CONSTEXPR
auto 233 #if __cplusplus > 201402L 234 #define __cpp_lib_nonmember_container_access 201411 240 template <
typename _Container>
242 size(
const _Container& __cont) -> decltype(__cont.size())
243 {
return __cont.size(); }
249 template <
typename _Tp,
size_t _Nm>
251 size(
const _Tp (&)[_Nm]) noexcept
258 template <
typename _Container>
260 empty(
const _Container& __cont) -> decltype(__cont.empty())
261 {
return __cont.empty(); }
267 template <
typename _Tp,
size_t _Nm>
269 empty(
const _Tp (&)[_Nm]) noexcept
276 template <
typename _Tp>
279 {
return __il.size() == 0;}
285 template <
typename _Container>
287 data(_Container& __cont) -> decltype(__cont.data())
288 {
return __cont.data(); }
294 template <
typename _Container>
296 data(
const _Container& __cont) -> decltype(__cont.data())
297 {
return __cont.data(); }
303 template <
typename _Tp,
size_t _Nm>
305 data(_Tp (&__array)[_Nm]) noexcept
312 template <
typename _Tp>
315 {
return __il.begin(); }
319 _GLIBCXX_END_NAMESPACE_VERSION
324 #endif // _GLIBCXX_RANGE_ACCESS_H
constexpr const _Tp * begin(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to the first element of the initializer_list.
_GLIBCXX17_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 const _Tp * end(initializer_list< _Tp > __ils) noexcept
Return an iterator pointing to one past the last element of the initializer_list. ...
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.
_GLIBCXX17_CONSTEXPR auto rend(_Container &__cont) -> decltype(__cont.rend())
Return a reverse iterator pointing one past the first element of the container.
ISO C++ entities toplevel namespace is std.
Smart array designed to support numeric processing.
_GLIBCXX17_CONSTEXPR auto rbegin(_Container &__cont) -> decltype(__cont.rbegin())
Return a reverse iterator pointing to the last 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.
_GLIBCXX17_CONSTEXPR auto crbegin(const _Container &__cont) -> decltype(std::rbegin(__cont))
Return a reverse iterator pointing to the last element of the const container.