diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-21 12:49:43 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-21 12:49:43 -0500 |
commit | b2dbcb55e2832c373fecb4033a3ed77e5dbc77aa (patch) | |
tree | 1f294fcf1d85a02db86de3eea2b03393fd89ca5a /include/fud_array.hpp | |
parent | 6a27a2a4032e88fa9154ef0f0741edc584f7a701 (diff) |
Add vector and option.
Diffstat (limited to 'include/fud_array.hpp')
-rw-r--r-- | include/fud_array.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/fud_array.hpp b/include/fud_array.hpp index 807621a..dcbd54a 100644 --- a/include/fud_array.hpp +++ b/include/fud_array.hpp @@ -18,9 +18,10 @@ #ifndef FUD_ARRAY_HPP #define FUD_ARRAY_HPP -#include <cstddef> - #include "fud_memory.hpp" +#include "fud_span.hpp" + +#include <cstddef> namespace fud { @@ -106,6 +107,11 @@ struct Array { constexpr bool operator==(const Array<T, Size>&) const noexcept = default; constexpr auto operator<=>(const Array<T, Size>& other) const noexcept = default; + + Span<T, Size> span() + { + return Span<T, Size>{data(), Size}; + } }; } // namespace fud |