| 1 | //===---------------------------------------------------------------------===// |
| 2 | // |
| 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
| 6 | // |
| 7 | //===---------------------------------------------------------------------===// |
| 8 | |
| 9 | #ifndef _LIBCPP___FWD_ARRAY_H |
| 10 | #define _LIBCPP___FWD_ARRAY_H |
| 11 | |
| 12 | #include <__config> |
| 13 | #include <__cstddef/size_t.h> |
| 14 | #include <__type_traits/integral_constant.h> |
| 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 _Size> |
| 23 | struct array; |
| 24 | |
| 25 | template <size_t _Ip, class _Tp, size_t _Size> |
| 26 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp& get(array<_Tp, _Size>&) _NOEXCEPT; |
| 27 | |
| 28 | template <size_t _Ip, class _Tp, size_t _Size> |
| 29 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp& get(const array<_Tp, _Size>&) _NOEXCEPT; |
| 30 | |
| 31 | #ifndef _LIBCPP_CXX03_LANG |
| 32 | template <size_t _Ip, class _Tp, size_t _Size> |
| 33 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp&& get(array<_Tp, _Size>&&) _NOEXCEPT; |
| 34 | |
| 35 | template <size_t _Ip, class _Tp, size_t _Size> |
| 36 | _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp&& get(const array<_Tp, _Size>&&) _NOEXCEPT; |
| 37 | #endif |
| 38 | |
| 39 | template <class _Tp> |
| 40 | inline const bool __is_std_array_v = false; |
| 41 | |
| 42 | template <class _Tp, size_t _Size> |
| 43 | inline const bool __is_std_array_v<array<_Tp, _Size> > = true; |
| 44 | |
| 45 | _LIBCPP_END_NAMESPACE_STD |
| 46 | |
| 47 | #endif // _LIBCPP___FWD_ARRAY_H |
| 48 | |