tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
index_constant.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2024 Tobias Hienzsch
3
4#ifndef TETL_TYPE_TRAITS_INDEX_CONSTANT_HPP
5#define TETL_TYPE_TRAITS_INDEX_CONSTANT_HPP
6
7#include <etl/_cstddef/size_t.hpp>
8#include <etl/_type_traits/integral_constant.hpp>
9
10namespace etl {
11
12/// \ingroup type_traits
13template <size_t I>
14using index_constant = integral_constant<size_t, I>;
15
16/// \ingroup type_traits
17template <size_t I>
18inline constexpr auto index_v = index_constant<I>{};
19
20} // namespace etl
21
22#endif // TETL_TYPE_TRAITS_INDEX_CONSTANT_HPP
constexpr auto index_v
Definition index_constant.hpp:18
Definition adjacent_find.hpp:9
Definition integral_constant.hpp:11