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_TUPLE_H
10#define _LIBCPP___FWD_TUPLE_H
11
12#include <__config>
13#include <__cstddef/size_t.h>
14
15#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
16# pragma GCC system_header
17#endif
18
19_LIBCPP_BEGIN_NAMESPACE_STD
20
21template <size_t, class>
22struct tuple_element;
23
24template <size_t _Np, class _Tp>
25using __tuple_element_t _LIBCPP_NODEBUG = typename tuple_element<_Np, _Tp>::type;
26
27#ifndef _LIBCPP_CXX03_LANG
28
29template <class...>
30class tuple;
31
32template <class>
33inline const bool __is_tuple_v = false;
34
35template <class... _Tp>
36inline const bool __is_tuple_v<tuple<_Tp...>> = true;
37
38template <size_t _Ip, class... _Tp>
39struct tuple_element<_Ip, tuple<_Tp...> > {
40 using type _LIBCPP_NODEBUG = __type_pack_element<_Ip, _Tp...>;
41};
42
43template <class>
44struct tuple_size;
45
46template <size_t _Ip, class... _Tp>
47_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, tuple<_Tp...> >::type&
48get(tuple<_Tp...>&) _NOEXCEPT;
49
50template <size_t _Ip, class... _Tp>
51_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type&
52get(const tuple<_Tp...>&) _NOEXCEPT;
53
54template <size_t _Ip, class... _Tp>
55_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, tuple<_Tp...> >::type&&
56get(tuple<_Tp...>&&) _NOEXCEPT;
57
58template <size_t _Ip, class... _Tp>
59_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
60get(const tuple<_Tp...>&&) _NOEXCEPT;
61
62#endif // _LIBCPP_CXX03_LANG
63
64_LIBCPP_END_NAMESPACE_STD
65
66#endif // _LIBCPP___FWD_TUPLE_H
67