summaryrefslogtreecommitdiff
path: root/include/fud_array.hpp
diff options
context:
space:
mode:
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