Skip to content

Commit e94acc8

Browse files
committed
Fix: Add data pointer access
1 parent a13880f commit e94acc8

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

dll_src/vector_base.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ class VecBase {
4343
[[nodiscard]] constexpr ConstIterator end() const noexcept { return data.end(); }
4444
[[nodiscard]] constexpr ConstIterator cend() const noexcept { return data.cend(); }
4545

46+
// Data pointer access.
47+
[[nodiscard]] constexpr T *ptr() noexcept { return data.data(); }
48+
[[nodiscard]] constexpr const T *ptr() const noexcept { return data.data(); }
49+
4650
// Size and capacity.
4751
[[nodiscard]] static constexpr std::size_t size() noexcept { return N; }
4852

0 commit comments

Comments
 (0)