1 //===---------------------------------------------------------------------===//
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
7 //===---------------------------------------------------------------------===//
9 #ifndef _LIBCPP___FWD_TUPLE_H
10 #define _LIBCPP___FWD_TUPLE_H
13 #include <__cstddef/size_t.h>
15 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
16 # pragma GCC system_header
19 _LIBCPP_BEGIN_NAMESPACE_STD
21 template <size_t, class>
22 struct _LIBCPP_TEMPLATE_VIS tuple_element
;
24 #ifndef _LIBCPP_CXX03_LANG
27 class _LIBCPP_TEMPLATE_VIS tuple
;
30 struct _LIBCPP_TEMPLATE_VIS tuple_size
;
32 template <size_t _Ip
, class... _Tp
>
33 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element
<_Ip
, tuple
<_Tp
...> >::type
&
34 get(tuple
<_Tp
...>&) _NOEXCEPT
;
36 template <size_t _Ip
, class... _Tp
>
37 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element
<_Ip
, tuple
<_Tp
...> >::type
&
38 get(const tuple
<_Tp
...>&) _NOEXCEPT
;
40 template <size_t _Ip
, class... _Tp
>
41 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 typename tuple_element
<_Ip
, tuple
<_Tp
...> >::type
&&
42 get(tuple
<_Tp
...>&&) _NOEXCEPT
;
44 template <size_t _Ip
, class... _Tp
>
45 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
const typename tuple_element
<_Ip
, tuple
<_Tp
...> >::type
&&
46 get(const tuple
<_Tp
...>&&) _NOEXCEPT
;
48 #endif // _LIBCPP_CXX03_LANG
50 _LIBCPP_END_NAMESPACE_STD
52 #endif // _LIBCPP___FWD_TUPLE_H