4#ifndef TETL_CSTDDEF_BYTE_HPP
5#define TETL_CSTDDEF_BYTE_HPP
7#include <etl/_config/all.hpp>
9#include <etl/_concepts/integral.hpp>
26template <
etl::integral Int>
29 return static_cast<Int>(b);
33template <
etl::integral Int>
36 return etl::
byte(
static_cast<
unsigned int>(b) << shift);
40template <
etl::integral Int>
43 return etl::
byte(
static_cast<
unsigned int>(b) >> shift);
47template <
etl::integral Int>
51 return b = b << shift;
55template <
etl::integral Int>
58 return b = b >> shift;
64 return etl::
byte(
static_cast<
unsigned int>(lhs) |
static_cast<
unsigned int>(rhs));
70 return etl::
byte(
static_cast<
unsigned int>(lhs) &
static_cast<
unsigned int>(rhs));
76 return etl::
byte(
static_cast<
unsigned int>(lhs) ^
static_cast<
unsigned int>(rhs));
82 return etl::
byte(~
static_cast<
unsigned int>(b));
88 return lhs = lhs
| rhs;
94 return lhs = lhs
& rhs;
100 return lhs = lhs
^ rhs;
Definition adjacent_find.hpp:9
constexpr auto to_integer(etl::byte b) noexcept -> Int
Equivalent to: return Int(b);
Definition byte.hpp:27
TETL_ALWAYS_INLINE constexpr auto operator^(etl::byte lhs, etl::byte rhs) noexcept -> etl::byte
Equivalent to: return byte(static_cast<unsigned int>(lhs) ^ static_cast<unsigned int>(rhs));
Definition byte.hpp:74
TETL_ALWAYS_INLINE constexpr auto operator<<(etl::byte b, Int shift) noexcept -> etl::byte
Equivalent to: return etl::byte(static_cast<unsigned int>(b) << shift);
Definition byte.hpp:34
TETL_ALWAYS_INLINE constexpr auto operator>>(etl::byte b, Int shift) noexcept -> etl::byte
Equivalent to: return etl::byte(static_cast<unsigned int>(b) >> shift);
Definition byte.hpp:41
TETL_ALWAYS_INLINE constexpr auto operator>>=(etl::byte &b, Int shift) noexcept -> etl::byte &
Equivalent to: return b = b >> shift;
Definition byte.hpp:56
TETL_ALWAYS_INLINE constexpr auto operator^=(etl::byte &lhs, etl::byte rhs) noexcept -> etl::byte &
Equivalent to: return lhs = lhs ^ rhs;
Definition byte.hpp:98
TETL_ALWAYS_INLINE constexpr auto operator&=(etl::byte &lhs, etl::byte rhs) noexcept -> etl::byte &
Equivalent to: return lhs = lhs & rhs;
Definition byte.hpp:92
TETL_ALWAYS_INLINE constexpr auto operator&(etl::byte lhs, etl::byte rhs) noexcept -> etl::byte
Equivalent to: return byte(static_cast<unsigned int>(lhs) & static_cast<unsigned int>(rhs));
Definition byte.hpp:68
TETL_ALWAYS_INLINE constexpr auto operator|=(etl::byte &lhs, etl::byte rhs) noexcept -> etl::byte &
Equivalent to: return lhs = lhs | rhs;
Definition byte.hpp:86
TETL_ALWAYS_INLINE constexpr auto operator|(etl::byte lhs, etl::byte rhs) noexcept -> etl::byte
Equivalent to: return byte(static_cast<unsigned int>(lhs) | static_cast<unsigned int>(rhs));
Definition byte.hpp:62
enum TETL_MAY_ALIAS byte
etl::byte is a distinct type that implements the concept of byte as specified in the C++ language def...
Definition byte.hpp:22
TETL_ALWAYS_INLINE constexpr auto operator~(etl::byte b) noexcept -> etl::byte
Equivalent to: return byte(~static_cast<unsigned int>(b));
Definition byte.hpp:80
TETL_ALWAYS_INLINE constexpr auto operator<<=(etl::byte &b, Int shift) noexcept -> etl::byte &
Equivalent to: return b = b << shift;
Definition byte.hpp:48