57 using size_type = std::size_t;
58 using pos_type = std::uintmax_t;
59 using offset_type = std::intmax_t;
61 [[nodiscard]]
constexpr std::byte
const* data()
const noexcept {
return data_; }
63 [[nodiscard]]
constexpr bool empty()
const noexcept {
return 0 == size_; }
65 [[nodiscard]]
constexpr size_type size()
const noexcept {
return size_; }
70 constexpr BaseBuffer(std::byte
const* data, size_type size) : data_(data), size_(size)
74 [[nodiscard]]
constexpr pos_type pos(pos_type pos, offset_type off,
75 IODir dir)
const noexcept
78 case IODir::Beg:
return off;
79 case IODir::End:
return size_ + off;
80 case IODir::Cur:
return pos + off;
87 std::byte
const* data_ =
nullptr;