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
15
namespace
arene
{
16
namespace
base
{
17
18
namespace
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
22
template
<
class
... ICs>
23
using
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
30
template
<
std
::
size_t
Value
,
std
::
size_t
Count
>
31
using
make_index_sequence_repeat_n
=
repeat_type_t
<
32
Count
,
33
make_index_sequence_repeat_n_detail
::
to_index_sequence
,
34
std
::
integral_constant
<
std
::
size_t
,
Value
>>;
35
36
}
// namespace base
37
}
// namespace arene
38
39
#
endif
// INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_INTEGER_SEQUENCES_MAKE_INDEX_SEQUENCE_REPEAT_N_HPP_
arene::base
Definition
array_exceptions_disabled.cpp:11
arene
Copyright 2026, Toyota Motor Corporation.
Definition
array_exceptions_disabled.cpp:10
arene
base
integer_sequences
make_index_sequence_repeat_n.hpp
Generated by
1.13.2