tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
integer_sequence.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_UTILITY_INTEGER_SEQUENCE_HPP
4#define TETL_UTILITY_INTEGER_SEQUENCE_HPP
5
6#include <etl/_config/all.hpp>
7
10
11namespace etl {
12
13template <typename T, T... Ints>
15 static_assert(is_integral_v<T>, "T must be an integral type.");
16
17 using value_type = T;
18
19 [[nodiscard]] static constexpr auto size() noexcept -> size_t { return sizeof...(Ints); }
20};
21
22template <typename T, T Size>
24
25} // namespace etl
26
27#endif // TETL_UTILITY_INTEGER_SEQUENCE_HPP
#define TETL_BUILTIN_INT_SEQ(T, N)
Definition builtin_functions.hpp:113
Definition adjacent_find.hpp:8
constexpr bool is_integral_v
Definition is_integral.hpp:28
TETL_BUILTIN_INT_SEQ(T, Size) make_integer_sequence
Definition integer_sequence.hpp:23
Definition integer_sequence.hpp:14
etl::size_t value_type
Definition integer_sequence.hpp:17
static constexpr auto size() noexcept -> size_t
Definition integer_sequence.hpp:19