From b7da265019b47945e101969360347365a92073ef Mon Sep 17 00:00:00 2001 From: Faruk Eryilmaz Date: Wed, 10 Jan 2024 17:58:14 +0300 Subject: [PATCH] remove obselete comment since ValidBufferAccessType concept covers size and type check --- include/bytepack/bytepack.hpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/include/bytepack/bytepack.hpp b/include/bytepack/bytepack.hpp index 882a26b..65d2e0a 100644 --- a/include/bytepack/bytepack.hpp +++ b/include/bytepack/bytepack.hpp @@ -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 requires ValidBufferAccessType [[nodiscard]] constexpr T* as() const noexcept