tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
tuple_size.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
4#ifndef TETL_TUPLE_TUPLE_SIZE_HPP
5#define TETL_TUPLE_TUPLE_SIZE_HPP
6
7#include <etl/_cstddef/size_t.hpp>
8#include <etl/_type_traits/integral_constant.hpp>
9
10namespace etl {
11
12template <typename... Ts>
13struct tuple;
14
15template <typename T>
16struct tuple_size; /*undefined*/
17
18template <typename T>
19struct tuple_size<T const> : integral_constant<size_t, tuple_size<T>::value> { };
20
21template <typename T>
22struct tuple_size<T volatile> : integral_constant<size_t, tuple_size<T>::value> { };
23
24template <typename T>
25struct tuple_size<T const volatile> : integral_constant<size_t, tuple_size<T>::value> { };
26
27template <typename T>
28inline constexpr auto tuple_size_v = tuple_size<T>::value;
29
30} // namespace etl
31
32#endif // TETL_TUPLE_TUPLE_SIZE_HPP
Definition adjacent_find.hpp:9
constexpr auto tuple_size_v
Definition tuple_size.hpp:28
Definition integral_constant.hpp:10
Definition tuple.hpp:114