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_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, tuple<_Tp...> >::type& get(tuple<_Tp...>&) noexcept;
48
49template <size_t _Ip, class... _Tp>
50_LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type&
51get(const tuple<_Tp...>&) noexcept;
52
53template <size_t _Ip, class... _Tp>
54_LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element<_Ip, tuple<_Tp...> >::type&& get(tuple<_Tp...>&&) noexcept;
55
56template <size_t _Ip, class... _Tp>
57_LIBCPP_CONSTEXPR_SINCE_CXX14 const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
58get(const tuple<_Tp...>&&) noexcept;
59
60#endif // _LIBCPP_CXX03_LANG
61
62_LIBCPP_END_NAMESPACE_STD
63
64#endif // _LIBCPP___FWD_TUPLE_H
65