tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
make_unsigned.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2
3#ifndef TETL_TYPE_TRAITS_MAKE_UNSIGNED_HPP
4#define TETL_TYPE_TRAITS_MAKE_UNSIGNED_HPP
5
6namespace etl {
7
8namespace detail {
9
10template <typename>
11struct make_unsigned;
12
13template <>
14struct make_unsigned<signed char> {
15 using type = unsigned char;
16};
17
18template <>
19struct make_unsigned<signed short> {
20 using type = unsigned short;
21};
22
23template <>
24struct make_unsigned<signed int> {
25 using type = unsigned int;
26};
27
28template <>
29struct make_unsigned<signed long> {
30 using type = unsigned long;
31};
32
33template <>
34struct make_unsigned<signed long long> {
35 using type = unsigned long long;
36};
37
38template <>
39struct make_unsigned<unsigned char> {
40 using type = unsigned char;
41};
42
43template <>
44struct make_unsigned<unsigned short> {
45 using type = unsigned short;
46};
47
48template <>
49struct make_unsigned<unsigned int> {
50 using type = unsigned int;
51};
52
53template <>
54struct make_unsigned<unsigned long> {
55 using type = unsigned long;
56};
57
58template <>
59struct make_unsigned<unsigned long long> {
60 using type = unsigned long long;
61};
62
63} // namespace detail
64
71template <typename Type>
72struct make_unsigned : etl::detail::make_unsigned<Type> { };
73
74template <typename T>
76
77} // namespace etl
78
79#endif // TETL_TYPE_TRAITS_MAKE_UNSIGNED_HPP
Definition adjacent_find.hpp:8
typename make_unsigned< T >::type make_unsigned_t
Definition make_unsigned.hpp:75
If T is an integral (except bool) or enumeration type, provides the member typedef type which is the ...
Definition make_unsigned.hpp:72