tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
remove_volatile.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_VOLATILE_HPP
5#define TETL_TYPE_TRAITS_REMOVE_VOLATILE_HPP
6
7namespace etl {
8
9/// Provides the member typedef type which is the same as T, except that
10/// its topmost cv-qualifiers are removed. Removes the topmost volatile.
11///
12/// The behavior of a program that adds specializations for any of the
13/// templates described on this page is undefined.
14///
15/// \ingroup type_traits
16template <typename Type>
18 using type = Type;
19};
20
21template <typename Type>
22struct remove_volatile<Type volatile> {
23 using type = Type;
24};
25
26/// \ingroup type_traits
27template <typename T>
28using remove_volatile_t = typename remove_volatile<T>::type;
29
30} // namespace etl
31
32#endif // TETL_TYPE_TRAITS_REMOVE_VOLATILE_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_volatile.hpp:17