Skip to content

Commit

Permalink
vec_2
Browse files Browse the repository at this point in the history
  • Loading branch information
jngrad committed Jun 14, 2024
1 parent 5b1cee6 commit 8d15a4a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utils/include/utils/Vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ template <typename T, std::size_t N> class Vector : public Array<T, N> {

operator std::vector<T>() const { return as_vector(); }

constexpr std::span<T, N> as_span() const {
return std::span<T, N>(const_cast<T *>(begin()), size());
}

constexpr operator std::span<T, N>() const { return as_span(); }

template <class U> explicit operator Vector<U, N>() const {
Vector<U, N> ret;

Expand Down

0 comments on commit 8d15a4a

Please sign in to comment.