xref: /freebsd/contrib/llvm-project/libcxx/include/__fwd/array.h (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
1bdd1243dSDimitry Andric //===---------------------------------------------------------------------===//
2bdd1243dSDimitry Andric //
3bdd1243dSDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4bdd1243dSDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5bdd1243dSDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6bdd1243dSDimitry Andric //
7bdd1243dSDimitry Andric //===---------------------------------------------------------------------===//
8bdd1243dSDimitry Andric 
9bdd1243dSDimitry Andric #ifndef _LIBCPP___FWD_ARRAY_H
10bdd1243dSDimitry Andric #define _LIBCPP___FWD_ARRAY_H
11bdd1243dSDimitry Andric 
12bdd1243dSDimitry Andric #include <__config>
13bdd1243dSDimitry Andric #include <cstddef>
14bdd1243dSDimitry Andric 
15bdd1243dSDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
16bdd1243dSDimitry Andric #  pragma GCC system_header
17bdd1243dSDimitry Andric #endif
18bdd1243dSDimitry Andric 
19bdd1243dSDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
20bdd1243dSDimitry Andric 
21bdd1243dSDimitry Andric template <class _Tp, size_t _Size>
22bdd1243dSDimitry Andric struct _LIBCPP_TEMPLATE_VIS array;
23bdd1243dSDimitry Andric 
24*0fca6ea1SDimitry Andric template <size_t _Ip, class _Tp, size_t _Size>
25*0fca6ea1SDimitry Andric _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp& get(array<_Tp, _Size>&) _NOEXCEPT;
26*0fca6ea1SDimitry Andric 
27*0fca6ea1SDimitry Andric template <size_t _Ip, class _Tp, size_t _Size>
28*0fca6ea1SDimitry Andric _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp& get(const array<_Tp, _Size>&) _NOEXCEPT;
29*0fca6ea1SDimitry Andric 
30*0fca6ea1SDimitry Andric #ifndef _LIBCPP_CXX03_LANG
31*0fca6ea1SDimitry Andric template <size_t _Ip, class _Tp, size_t _Size>
32*0fca6ea1SDimitry Andric _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp&& get(array<_Tp, _Size>&&) _NOEXCEPT;
33*0fca6ea1SDimitry Andric 
34*0fca6ea1SDimitry Andric template <size_t _Ip, class _Tp, size_t _Size>
35*0fca6ea1SDimitry Andric _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const _Tp&& get(const array<_Tp, _Size>&&) _NOEXCEPT;
36*0fca6ea1SDimitry Andric #endif
37*0fca6ea1SDimitry Andric 
38*0fca6ea1SDimitry Andric template <class>
39*0fca6ea1SDimitry Andric struct __is_std_array : false_type {};
40*0fca6ea1SDimitry Andric 
41*0fca6ea1SDimitry Andric template <class _Tp, size_t _Size>
42*0fca6ea1SDimitry Andric struct __is_std_array<array<_Tp, _Size> > : true_type {};
43*0fca6ea1SDimitry Andric 
44bdd1243dSDimitry Andric _LIBCPP_END_NAMESPACE_STD
45bdd1243dSDimitry Andric 
46bdd1243dSDimitry Andric #endif // _LIBCPP___FWD_ARRAY_H
47