Arene Base
Fundamental Utilities For Safety Critical C++
Loading...
Searching...
No Matches
make_index_sequence_repeat_n.hpp
Go to the documentation of this file.
1// Copyright 2026, Toyota Motor Corporation
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_INTEGER_SEQUENCES_MAKE_INDEX_SEQUENCE_REPEAT_N_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_INTEGER_SEQUENCES_MAKE_INDEX_SEQUENCE_REPEAT_N_HPP_
7
8// IWYU pragma: private, include "arene/base/integer_sequences.hpp"
9
10#include "arene/base/stdlib_choice/cstddef.hpp"
11#include "arene/base/stdlib_choice/integer_sequence.hpp"
12#include "arene/base/stdlib_choice/integral_constant.hpp"
13#include "arene/base/type_manipulation/repeat_type.hpp"
14
15namespace arene {
16namespace base {
17
18namespace make_index_sequence_repeat_n_detail {
19
20/// @brief adapt a pack of @c std::integral_constant types to @c std::index_sequence
21/// @tparam ICs pack of @c std::integral_constant specializations whose values seed the sequence
22template <class... ICs>
23using to_index_sequence = std::index_sequence<ICs::value...>;
24
25} // namespace make_index_sequence_repeat_n_detail
26
27/// @brief An @c std::index_sequence whose elements are @p Count copies of @p Value.
28/// @tparam Value the value to repeat
29/// @tparam Count the number of copies to emit
30template <std::size_t Value, std::size_t Count>
32 Count,
35
36} // namespace base
37} // namespace arene
38
39#endif // INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_INTEGER_SEQUENCES_MAKE_INDEX_SEQUENCE_REPEAT_N_HPP_
Definition array_exceptions_disabled.cpp:11
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10