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