Warning: This file is not a C or C++ file. It does not have highlighting.

1// -*- C++ -*-
2//===----------------------------------------------------------------------===//
3//
4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5// See https://llvm.org/LICENSE.txt for license information.
6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef _LIBCPP___CXX03___ITERATOR_ACCESS_H
11#define _LIBCPP___CXX03___ITERATOR_ACCESS_H
12
13#include <__cxx03/__config>
14#include <__cxx03/cstddef>
15
16#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
17# pragma GCC system_header
18#endif
19
20_LIBCPP_BEGIN_NAMESPACE_STD
21
22template <class _Tp, size_t _Np>
23_LIBCPP_HIDE_FROM_ABI _Tp* begin(_Tp (&__array)[_Np]) _NOEXCEPT {
24 return __array;
25}
26
27template <class _Tp, size_t _Np>
28_LIBCPP_HIDE_FROM_ABI _Tp* end(_Tp (&__array)[_Np]) _NOEXCEPT {
29 return __array + _Np;
30}
31
32template <class _Cp>
33_LIBCPP_HIDE_FROM_ABI typename _Cp::iterator begin(_Cp& __c) {
34 return __c.begin();
35}
36
37template <class _Cp>
38_LIBCPP_HIDE_FROM_ABI typename _Cp::const_iterator begin(const _Cp& __c) {
39 return __c.begin();
40}
41
42template <class _Cp>
43_LIBCPP_HIDE_FROM_ABI typename _Cp::iterator end(_Cp& __c) {
44 return __c.end();
45}
46
47template <class _Cp>
48_LIBCPP_HIDE_FROM_ABI typename _Cp::const_iterator end(const _Cp& __c) {
49 return __c.end();
50}
51
52_LIBCPP_END_NAMESPACE_STD
53
54#endif // _LIBCPP___CXX03___ITERATOR_ACCESS_H
55

Warning: This file is not a C or C++ file. It does not have highlighting.

source code of libcxx/include/__cxx03/__iterator/access.h