summaryrefslogtreecommitdiff
path: root/include/fud_array.hpp
diff options
context:
space:
mode:
authorDominick Allen <djallen@librehumanitas.org>2024-10-21 12:49:43 -0500
committerDominick Allen <djallen@librehumanitas.org>2024-10-21 12:49:43 -0500
commitb2dbcb55e2832c373fecb4033a3ed77e5dbc77aa (patch)
tree1f294fcf1d85a02db86de3eea2b03393fd89ca5a /include/fud_array.hpp
parent6a27a2a4032e88fa9154ef0f0741edc584f7a701 (diff)
Add vector and option.
Diffstat (limited to 'include/fud_array.hpp')
-rw-r--r--include/fud_array.hpp10
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