mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2025-01-07 05:30:19 +00:00
b70f24a581
Signed-off-by: Adrian Conlon <adrian.conlon@gmail.com>
18 lines
408 B
C++
18 lines
408 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
|
|
#include "simdjson/simdjson.h"
|
|
|
|
class byte_t final {
|
|
private:
|
|
simdjson::dom::array m_raw;
|
|
|
|
public:
|
|
byte_t(simdjson::dom::element input) noexcept;
|
|
byte_t(simdjson::dom::array input) noexcept;
|
|
|
|
[[nodiscard]] auto address() const noexcept { return (uint16_t)(int64_t)*m_raw.begin(); }
|
|
[[nodiscard]] auto value() const noexcept { return (uint8_t)(int64_t)m_raw.at(1); }
|
|
};
|