From b2dbcb55e2832c373fecb4033a3ed77e5dbc77aa Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Mon, 21 Oct 2024 12:49:43 -0500 Subject: Add vector and option. --- include/fud_span.hpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include/fud_span.hpp') diff --git a/include/fud_span.hpp b/include/fud_span.hpp index 5b8497e..ed4bcc7 100644 --- a/include/fud_span.hpp +++ b/include/fud_span.hpp @@ -18,7 +18,6 @@ #ifndef FUD_SPAN_HPP #define FUD_SPAN_HPP -#include "fud_array.hpp" #include "fud_result.hpp" #include "fud_status.hpp" @@ -27,11 +26,17 @@ namespace fud { +template +struct Array; + template struct Span { static_assert(Size > 0); using ValueType = T; + T* m_data; + const size_t m_size; + static Span make(Array& array) { Span output{array.data(), Size}; @@ -89,9 +94,6 @@ struct Span { return output; } - T* m_data; - const size_t m_size; - [[nodiscard]] constexpr size_t size() const { if constexpr (Size < SIZE_MAX) { -- cgit v1.2.3