5#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_BYTE_BYTE_HPP_
6#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_BYTE_BYTE_HPP_
14#include "arene/base/compiler_support/attributes.hpp"
15#include "arene/base/constraints/constraints.hpp"
16#include "arene/base/contracts/contract.hpp"
17#include "arene/base/stdlib_choice/climits.hpp"
18#include "arene/base/stdlib_choice/cstdint.hpp"
19#include "arene/base/stdlib_choice/enable_if.hpp"
20#include "arene/base/stdlib_choice/is_integral.hpp"
21#include "arene/base/stdlib_choice/is_signed.hpp"
22#include "arene/base/utility/to_underlying.hpp"
103constexpr auto operator|(byte
const lhs, byte
const rhs)
noexcept ->
byte {
104 return to_byte(
static_cast<std::uint8_t>(to_underlying(lhs) | to_underlying(rhs)));
111constexpr auto operator&(byte
const lhs, byte
const rhs)
noexcept ->
byte {
112 return to_byte(
static_cast<std::uint8_t>(to_underlying(lhs) & to_underlying(rhs)));
119constexpr auto operator^(byte
const lhs, byte
const rhs)
noexcept ->
byte {
120 return to_byte(
static_cast<std::uint8_t>(to_underlying(lhs) ^ to_underlying(rhs)));
128 return to_byte(~
static_cast<std::uint32_t>(to_underlying(val)));
155constexpr auto operator|=(byte& lhs, byte
const rhs)
noexcept ->
byte& {
164constexpr auto operator&=(byte& lhs, byte
const rhs)
noexcept ->
byte& {
173constexpr auto operator^=(byte& lhs, byte
const rhs)
noexcept ->
byte& {
188constexpr byte operator""_byte(
unsigned long long int const value)
noexcept {
return to_byte(value); }
constexpr byte operator""_byte(unsigned long long int const value) noexcept
Literal helper for creating byte instances.
Definition byte.hpp:188
Definition array_exceptions_disabled.cpp:11
constexpr auto operator|=(byte &lhs, byte const rhs) noexcept -> byte &
Modify lhs by bit-wise or'ing it with the bits of rhs.
Definition byte.hpp:155
constexpr auto operator&(byte const lhs, byte const rhs) noexcept -> byte
Bit-wise and of the byte representations.
Definition byte.hpp:111
constexpr auto operator|(byte const lhs, byte const rhs) noexcept -> byte
Bit-wise or of the byte representations.
Definition byte.hpp:103
constexpr auto operator&=(byte &lhs, byte const rhs) noexcept -> byte &
Modify lhs by bit-wise and'ing it with the bits of rhs.
Definition byte.hpp:164
constexpr auto operator^(byte const lhs, byte const rhs) noexcept -> byte
Bit-wise xor of the byte representations.
Definition byte.hpp:119
enum ARENE_MAY_ALIAS byte
A type that represents a byte of data.
Definition byte.hpp:39
constexpr auto operator~(byte const val) noexcept -> byte
Bit-wise negation of the byte representation.
Definition byte.hpp:127
constexpr auto operator^=(byte &lhs, byte const rhs) noexcept -> byte &
Modify lhs by bit-wise xor'ing it with the bits of rhs.
Definition byte.hpp:173
Copyright 2026, Toyota Motor Corporation.
Definition array_exceptions_disabled.cpp:10