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