xref: /freebsd/contrib/llvm-project/libcxx/include/__tuple/tuple_indices.h (revision cb14a3fe5122c879eae1fb480ed7ce82a699ddb6)
106c3fb27SDimitry Andric //===----------------------------------------------------------------------===//
206c3fb27SDimitry Andric //
306c3fb27SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
406c3fb27SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
506c3fb27SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
606c3fb27SDimitry Andric //
706c3fb27SDimitry Andric //===----------------------------------------------------------------------===//
806c3fb27SDimitry Andric 
906c3fb27SDimitry Andric #ifndef _LIBCPP___TUPLE_MAKE_TUPLE_INDICES_H
1006c3fb27SDimitry Andric #define _LIBCPP___TUPLE_MAKE_TUPLE_INDICES_H
1106c3fb27SDimitry Andric 
1206c3fb27SDimitry Andric #include <__config>
1306c3fb27SDimitry Andric #include <__utility/integer_sequence.h>
1406c3fb27SDimitry Andric #include <cstddef>
1506c3fb27SDimitry Andric 
1606c3fb27SDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
1706c3fb27SDimitry Andric #  pragma GCC system_header
1806c3fb27SDimitry Andric #endif
1906c3fb27SDimitry Andric 
2006c3fb27SDimitry Andric #ifndef _LIBCPP_CXX03_LANG
2106c3fb27SDimitry Andric 
2206c3fb27SDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
2306c3fb27SDimitry Andric 
24*cb14a3feSDimitry Andric template <size_t...>
25*cb14a3feSDimitry Andric struct __tuple_indices {};
2606c3fb27SDimitry Andric 
2706c3fb27SDimitry Andric template <size_t _Ep, size_t _Sp = 0>
28*cb14a3feSDimitry Andric struct __make_tuple_indices {
2906c3fb27SDimitry Andric   static_assert(_Sp <= _Ep, "__make_tuple_indices input error");
3006c3fb27SDimitry Andric   typedef __make_indices_imp<_Ep, _Sp> type;
3106c3fb27SDimitry Andric };
3206c3fb27SDimitry Andric 
3306c3fb27SDimitry Andric _LIBCPP_END_NAMESPACE_STD
3406c3fb27SDimitry Andric 
3506c3fb27SDimitry Andric #endif // _LIBCPP_CXX03_LANG
3606c3fb27SDimitry Andric 
3706c3fb27SDimitry Andric #endif // _LIBCPP___TUPLE_MAKE_TUPLE_INDICES_H
38