cppx-core
cppx-core
language
types
Int_.hpp
Go to the documentation of this file.
1
#pragma once // Source encoding: UTF-8 with BOM (π is a lowercase Greek "pi").
2
7
#include <
cppx-core/language/types/type-makers.hpp
>
// cppx::Unsigned_
8
#include <c/stdint.hpp>
// ::intN_t
9
10
namespace
cppx
11
{
12
namespace
impl
13
{
14
template
<
int
n_bits >
struct
Int_t_
;
15
16
template
<>
struct
Int_t_
<8>{
using
T
= int8_t; };
17
template
<>
struct
Int_t_
<16>{
using
T
= int16_t; };
18
template
<>
struct
Int_t_
<32>{
using
T
= int32_t; };
19
template
<>
struct
Int_t_
<64>{
using
T
= int64_t; };
20
}
// namespace impl
21
22
// The Doxygen \hideinitializer command doesn't work here, so.
25
#ifdef DOXYGEN
26
template
<
int
n_bits >
using
Int_
= ...;
27
#else
28
template
<
int
n_bits >
using
Int_
=
typename
impl::Int_t_<n_bits>::T
;
29
#endif
30
32
template
<
int
n_bits >
using
Unsigned_int_
=
Unsigned_<Int_<n_bits>
>;
33
34
}
// namespace cppx
cppx::impl::Int_t_< 16 >::T
int16_t T
Definition:
Int_.hpp:17
cppx::impl::Int_t_< 32 >::T
int32_t T
Definition:
Int_.hpp:18
cppx::Unsigned_
std::make_unsigned_t< Integer > Unsigned_
For an integer type, produces the corresponding unsigned type.
Definition:
type-makers.hpp:49
type-makers.hpp
Type_choice_, Unptr_, Unref_, Signed_, Unsigned_, Const_, Unconst_ and Array_of_.
cppx
Definition:
dynamic-size-checking.hpp:12
cppx::impl::Int_t_< 8 >::T
int8_t T
Definition:
Int_.hpp:16
cppx::Unsigned_int_
Unsigned_< Int_< n_bits > > Unsigned_int_
Unsigned integer types parameterized by exact width in bits.
Definition:
Int_.hpp:32
cppx::impl::Int_t_< 64 >::T
int64_t T
Definition:
Int_.hpp:19
cppx::impl::Int_t_
Definition:
Int_.hpp:14
cppx::Int_
... Int_
Signed integer types parameterized by exact width in bits.
Definition:
Int_.hpp:26
Generated by
1.8.15