tetl 0.1.0
Embedded Template Library
Loading...
Searching...
No Matches
uint_t.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSL-1.0
2// SPDX-FileCopyrightText: Copyright (C) 2019 Tobias Hienzsch
3
4#ifndef TETL_CSTDINT_UINT_T_HPP
5#define TETL_CSTDINT_UINT_T_HPP
6
7#include <etl/_config/all.hpp>
8
9namespace etl {
10
11/// \brief Unsigned integer type with width of exactly 8 bits.
12using uint8_t = TETL_BUILTIN_UINT8;
13
14/// \brief Unsigned integer type with width of exactly 16 bits.
15using uint16_t = TETL_BUILTIN_UINT16;
16
17/// \brief Unsigned integer type with width of exactly 32 bits.
18using uint32_t = TETL_BUILTIN_UINT32;
19
20/// \brief Unsigned integer type with width of exactly 64 bits.
21using uint64_t = TETL_BUILTIN_UINT64;
22
23} // namespace etl
24
25static_assert(sizeof(etl::uint8_t) == 1, "uint8_t size should be 1");
26static_assert(sizeof(etl::uint16_t) == 2, "uint16_t size should be 2");
27static_assert(sizeof(etl::uint32_t) == 4, "uint32_t size should be 4");
28static_assert(sizeof(etl::uint64_t) == 8, "uint64_t size should be 8");
29
30#endif // TETL_CSTDINT_UINT_T_HPP
Definition adjacent_find.hpp:9