for span tweaking

This commit is contained in:
2024-03-31 15:42:05 +02:00
parent b82f039aaf
commit 17b4cce69b
2 changed files with 25 additions and 1 deletions

View File

@ -20,6 +20,6 @@ struct File2I {
// pos -1 means stream, append to last written, or read position (independent, like FILE*s)
virtual bool write(const ByteSpan data, int64_t pos = -1) = 0;
virtual std::variant<ByteSpan, std::vector<uint8_t>> read(uint64_t size, int64_t pos = -1) = 0;
[[nodiscard]] virtual std::variant<ByteSpan, std::vector<uint8_t>> read(uint64_t size, int64_t pos = -1) = 0;
};