tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
is_const.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TYPE_TRAITS_IS_CONST_HPP
4#define TETL_TYPE_TRAITS_IS_CONST_HPP
5
7
8namespace etl {
9
13template <typename T>
14struct is_const : false_type { };
15
16template <typename T>
17struct is_const<T const> : true_type { };
18
19template <typename T>
20inline constexpr bool is_const_v = is_const<T>::value;
21
22} // namespace etl
23
24#endif // TETL_TYPE_TRAITS_IS_CONST_HPP
Definition adjacent_find.hpp:8
constexpr bool is_const_v
Definition is_const.hpp:20
bool_constant< true > true_type
Definition bool_constant.hpp:13
bool_constant< false > false_type
Definition bool_constant.hpp:14
static constexpr bool value
Definition integral_constant.hpp:10
If T is a const-qualified type (that is, const, or const volatile), provides the member constant valu...
Definition is_const.hpp:14