tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
add_const.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_TYPE_TRAITS_ADD_CONST_HPP
5#define TETL_TYPE_TRAITS_ADD_CONST_HPP
6
7namespace etl {
8
9/// \brief Provides the member typedef type which is the same as T, except it
10/// has a cv-qualifier added (unless T is a function, a reference, or already
11/// has this cv-qualifier). Adds const.
12template <typename T>
13struct add_const {
14 using type = T const;
15};
16
17/// \relates add_const
18template <typename T>
19using add_const_t = typename add_const<T>::type;
20
21} // namespace etl
22
23#endif // TETL_TYPE_TRAITS_ADD_CONST_HPP
Definition adjacent_find.hpp:9
Provides the member typedef type which is the same as T, except it has a cv-qualifier added (unless T...
Definition add_const.hpp:13