Skip to content

Commit

Permalink
Add byte_stream value_type and data()
Browse files Browse the repository at this point in the history
  • Loading branch information
vtnerd committed Oct 23, 2024
1 parent 58a1d54 commit 3f3229a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions contrib/epee/include/byte_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ namespace epee
public:
using char_type = std::uint8_t;
using Ch = char_type;
using value_type = char_type;

//! Increase internal buffer by at least `byte_stream_increase` bytes.
byte_stream() noexcept
Expand All @@ -86,6 +87,7 @@ namespace epee
~byte_stream() noexcept = default;
byte_stream& operator=(byte_stream&& rhs) noexcept;

std::uint8_t* data() noexcept { return buffer_.get(); }
const std::uint8_t* data() const noexcept { return buffer_.get(); }
std::uint8_t* tellp() const noexcept { return next_write_; }
std::size_t available() const noexcept { return end_ - next_write_; }
Expand Down

0 comments on commit 3f3229a

Please sign in to comment.