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 | |
| 22 | template <class _Tp, size_t _Np> |
| 23 | _LIBCPP_HIDE_FROM_ABI _Tp* begin(_Tp (&__array)[_Np]) _NOEXCEPT { |
| 24 | return __array; |
| 25 | } |
| 26 | |
| 27 | template <class _Tp, size_t _Np> |
| 28 | _LIBCPP_HIDE_FROM_ABI _Tp* end(_Tp (&__array)[_Np]) _NOEXCEPT { |
| 29 | return __array + _Np; |
| 30 | } |
| 31 | |
| 32 | template <class _Cp> |
| 33 | _LIBCPP_HIDE_FROM_ABI typename _Cp::iterator begin(_Cp& __c) { |
| 34 | return __c.begin(); |
| 35 | } |
| 36 | |
| 37 | template <class _Cp> |
| 38 | _LIBCPP_HIDE_FROM_ABI typename _Cp::const_iterator begin(const _Cp& __c) { |
| 39 | return __c.begin(); |
| 40 | } |
| 41 | |
| 42 | template <class _Cp> |
| 43 | _LIBCPP_HIDE_FROM_ABI typename _Cp::iterator end(_Cp& __c) { |
| 44 | return __c.end(); |
| 45 | } |
| 46 | |
| 47 | template <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.
