My Project
is_unsigned.hpp
Go to the documentation of this file.
1 
28 #ifndef BSL_IS_UNSIGNED_HPP
29 #define BSL_IS_UNSIGNED_HPP
30 
31 #include "cstdint.hpp"
32 #include "true_type.hpp"
33 #include "false_type.hpp"
34 
35 namespace bsl
36 {
54  template<typename T>
55  class is_unsigned final : public false_type
56  {};
57 
59 
60  template<>
61  class is_unsigned<bool> final : public true_type
62  {};
63 
64  template<>
65  class is_unsigned<bool const> final : public true_type
66  {};
67 
68  template<>
69  class is_unsigned<bsl::uint8> final : public true_type
70  {};
71 
72  template<>
73  class is_unsigned<bsl::uint8 const> final : public true_type
74  {};
75 
76  template<>
77  class is_unsigned<bsl::uint16> final : public true_type
78  {};
79 
80  template<>
81  class is_unsigned<bsl::uint16 const> final : public true_type
82  {};
83 
84  template<>
85  class is_unsigned<bsl::uint32> final : public true_type
86  {};
87 
88  template<>
89  class is_unsigned<bsl::uint32 const> final : public true_type
90  {};
91 
92  template<>
93  class is_unsigned<bsl::uint64> final : public true_type
94  {};
95 
96  template<>
97  class is_unsigned<bsl::uint64 const> final : public true_type
98  {};
99 
101 }
102 
103 #endif
::uint8_t uint8
defines an 8bit unsigned integer
Definition: cstdint.hpp:45
::uint16_t uint16
defines an 16bit unsigned integer
Definition: cstdint.hpp:47
bool_constant< true > true_type
provides a bool_constant that represents "true"
Definition: true_type.hpp:36
If the provided type is a unsigned type (taking into account const qualifications),...
Definition: is_unsigned.hpp:55
If the provided type is an array type (taking into account const qualifications), provides the member...
Definition: integral_constant.hpp:45
::uint32_t uint32
defines an 32bit unsigned integer
Definition: cstdint.hpp:49
::uint64_t uint64
defines an 64bit unsigned integer
Definition: cstdint.hpp:51