tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
add_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_ADD_CV_HPP
5#define TETL_TYPE_TRAITS_ADD_CV_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 both const and volatile.
12///
13/// \headerfile etl/type_traits.hpp
14template <typename T>
15struct add_cv {
16 using type = T const volatile;
17};
18
19/// \relates add_cv
20template <typename T>
21using add_cv_t = typename add_cv<T>::type;
22
23} // namespace etl
24
25#endif // TETL_TYPE_TRAITS_ADD_CV_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_cv.hpp:15