From e94db4695e236b42ae1be44b2605075161d5144f Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Fri, 18 Oct 2024 21:43:44 -0500 Subject: Add temporary work for formatting. --- include/fud_span.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/fud_span.hpp') diff --git a/include/fud_span.hpp b/include/fud_span.hpp index e8c5704..cc693f8 100644 --- a/include/fud_span.hpp +++ b/include/fud_span.hpp @@ -43,6 +43,22 @@ struct Span { return output; } + template + static Span make(Array& array) { + static_assert(std::convertible_to); + Span output{}; + output.m_data = array.data(); + return output; + } + + template + static Span makeCStringBuffer(Array& array) { + static_assert(ArraySize > Size); + Span output{}; + output.m_data = array.data(); + return output; + } + T* m_data; [[nodiscard]] constexpr size_t size() const -- cgit v1.2.3