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___TUPLE_TUPLE_ELEMENT_H
10#define _LIBCPP___TUPLE_TUPLE_ELEMENT_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 _Ip, class _Tp>
22struct tuple_element;
23
24template <size_t _Ip, class _Tp>
25struct tuple_element<_Ip, const _Tp> {
26 using type _LIBCPP_NODEBUG = const typename tuple_element<_Ip, _Tp>::type;
27};
28
29template <size_t _Ip, class _Tp>
30struct tuple_element<_Ip, volatile _Tp> {
31 using type _LIBCPP_NODEBUG = volatile typename tuple_element<_Ip, _Tp>::type;
32};
33
34template <size_t _Ip, class _Tp>
35struct tuple_element<_Ip, const volatile _Tp> {
36 using type _LIBCPP_NODEBUG = const volatile typename tuple_element<_Ip, _Tp>::type;
37};
38
39# if _LIBCPP_STD_VER >= 14
40template <size_t _Ip, class... _Tp>
41using tuple_element_t _LIBCPP_NODEBUG = typename tuple_element<_Ip, _Tp...>::type;
42# endif
43
44_LIBCPP_END_NAMESPACE_STD
45
46#endif // _LIBCPP___TUPLE_TUPLE_ELEMENT_H
47