Skip to content

Commit

Permalink
remove obselete comment since ValidBufferAccessType concept covers si…
Browse files Browse the repository at this point in the history
…ze and type check
  • Loading branch information
farukeryilmaz committed Jan 10, 2024
1 parent 6c5cd5c commit b7da265
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions include/bytepack/bytepack.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,6 @@ class buffer_view
: data_{ ptr }, size_{ size }, ssize_{ to_ssize(size) }
{}

/**
* Templated method to get data as the specified type.
*
* Warning: This method does not provide type safety and assumes the user knows the correct type of the data.
* It also does not perform size checks, so users must ensure that the buffer is large enough to contain
* the data of type T. Accessing beyond the bounds of the buffer can lead to undefined behavior.
*
* @tparam T The type to which the buffer's data will be cast.
* @return Pointer to the buffer's data cast to the specified type.
*/
template<typename T>
requires ValidBufferAccessType<T>
[[nodiscard]] constexpr T* as() const noexcept
Expand Down

0 comments on commit b7da265

Please sign in to comment.