| 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_LIKE_EXT_H |
| 10 | #define _LIBCPP___TUPLE_TUPLE_LIKE_EXT_H |
| 11 | |
| 12 | #include <__config> |
| 13 | #include <__cstddef/size_t.h> |
| 14 | #include <__fwd/array.h> |
| 15 | #include <__fwd/pair.h> |
| 16 | #include <__fwd/tuple.h> |
| 17 | #include <__tuple/tuple_types.h> |
| 18 | #include <__type_traits/integral_constant.h> |
| 19 | |
| 20 | #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) |
| 21 | # pragma GCC system_header |
| 22 | #endif |
| 23 | |
| 24 | _LIBCPP_BEGIN_NAMESPACE_STD |
| 25 | |
| 26 | template <class _Tp> |
| 27 | struct __tuple_like_ext : false_type {}; |
| 28 | |
| 29 | template <class _Tp> |
| 30 | struct __tuple_like_ext<const _Tp> : public __tuple_like_ext<_Tp> {}; |
| 31 | template <class _Tp> |
| 32 | struct __tuple_like_ext<volatile _Tp> : public __tuple_like_ext<_Tp> {}; |
| 33 | template <class _Tp> |
| 34 | struct __tuple_like_ext<const volatile _Tp> : public __tuple_like_ext<_Tp> {}; |
| 35 | |
| 36 | #ifndef _LIBCPP_CXX03_LANG |
| 37 | template <class... _Tp> |
| 38 | struct __tuple_like_ext<tuple<_Tp...> > : true_type {}; |
| 39 | #endif |
| 40 | |
| 41 | template <class _T1, class _T2> |
| 42 | struct __tuple_like_ext<pair<_T1, _T2> > : true_type {}; |
| 43 | |
| 44 | template <class _Tp, size_t _Size> |
| 45 | struct __tuple_like_ext<array<_Tp, _Size> > : true_type {}; |
| 46 | |
| 47 | template <class... _Tp> |
| 48 | struct __tuple_like_ext<__tuple_types<_Tp...> > : true_type {}; |
| 49 | |
| 50 | _LIBCPP_END_NAMESPACE_STD |
| 51 | |
| 52 | #endif // _LIBCPP___TUPLE_TUPLE_LIKE_EXT_H |
| 53 |