12 void skip(
size_t byte_count) {
pos_ +=
static_cast<long>(byte_count); }
16 std::span sub(
pos_,
pos_ +
sizeof(T));
19 return *
reinterpret_cast<T*
>(sub.data());
22 template <
typename T, std::
size_t N>
24 std::array<T, N> list;
26 for (
auto i = 0; i < N; ++i) {
27 list.at(i) = read<T>();
35 std::span<uint8_t>::iterator
pos_;
Definition binray_reader.hpp:8
auto read_list()
Definition binray_reader.hpp:23
std::span< uint8_t > data_
Definition binray_reader.hpp:34
void skip(size_t byte_count)
Definition binray_reader.hpp:12
auto read()
Definition binray_reader.hpp:15
std::span< uint8_t >::iterator pos_
Definition binray_reader.hpp:35
BinaryReader(std::span< uint8_t > &data)
Definition binray_reader.hpp:10
Definition binray_reader.hpp:6