diff --git a/Libraries/Containers/Array.h b/Libraries/Containers/Array.h index bd02c801..0847fbf3 100644 --- a/Libraries/Containers/Array.h +++ b/Libraries/Containers/Array.h @@ -100,11 +100,11 @@ struct SC::Array /// @brief Returns a Span wrapping the entire of current array /// @return a Span wrapping the entire of current array - [[nodiscard]] Span toSpanConst() const SC_LANGUAGE_LIFETIME_BOUND { return {items, size()}; } + [[nodiscard]] Span toSpanConst() const SC_LANGUAGE_LIFETIME_BOUND { return Span(items, size()); } /// @brief Returns a Span wrapping the entire of current array /// @return a Span wrapping the entire of current array - [[nodiscard]] Span toSpan() SC_LANGUAGE_LIFETIME_BOUND { return {items, size()}; } + [[nodiscard]] Span toSpan() SC_LANGUAGE_LIFETIME_BOUND { return Span(items, size()); } /// @brief Access item at index. Bounds checked in debug. /// @param index index of the item to be accessed @@ -370,7 +370,7 @@ SC::Array::Array(const Array& other) { segmentHeader.sizeBytes = 0; segmentHeader.capacityBytes = sizeof(T) * N; - (void)append({other.items, other.size()}); + (void)append(other.toSpanConst()); } template diff --git a/Libraries/Containers/Vector.h b/Libraries/Containers/Vector.h index a5f9af4a..3a42fa10 100644 --- a/Libraries/Containers/Vector.h +++ b/Libraries/Containers/Vector.h @@ -91,11 +91,11 @@ struct SC::Vector /// @brief Returns a Span wrapping the entire of current vector /// @return a Span wrapping the entire of current vector - [[nodiscard]] Span toSpanConst() const SC_LANGUAGE_LIFETIME_BOUND { return {items, size()}; } + [[nodiscard]] Span toSpanConst() const SC_LANGUAGE_LIFETIME_BOUND { return Span(items, size()); } /// @brief Returns a Span wrapping the entire of current vector /// @return a Span wrapping the entire of current vector - [[nodiscard]] Span toSpan() SC_LANGUAGE_LIFETIME_BOUND { return {items, size()}; } + [[nodiscard]] Span toSpan() SC_LANGUAGE_LIFETIME_BOUND { return Span(items, size()); } /// @brief Access item at index. Bounds checked in debug. /// @param index index of the item to be accessed