mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2024-08-18 15:29:01 +00:00
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); }
|
|
};
|