tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
remove_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_REMOVE_CONST_HPP
5#define TETL_TYPE_TRAITS_REMOVE_CONST_HPP
6
7namespace etl {
8
9/// \brief Provides the member typedef type which is the same as T, except that
10/// its topmost cv-qualifiers are removed. Removes the topmost const.
11/// \details The behavior of a program that adds specializations for any of the
12/// templates described on this page is undefined.
13template <typename Type>
15 using type = Type;
16};
17
18template <typename Type>
19struct remove_const<Type const> {
20 using type = Type;
21};
22
23template <typename T>
24using remove_const_t = typename remove_const<T>::type;
25
26} // namespace etl
27
28#endif // TETL_TYPE_TRAITS_REMOVE_CONST_HPP
Definition adjacent_find.hpp:9
Provides the member typedef type which is the same as T, except that its topmost cv-qualifiers are re...
Definition remove_const.hpp:14