Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions runtime/core/span.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ class Span final {
template <size_t N>
/* implicit */ constexpr Span(T (&Arr)[N]) : data_(Arr), length_(N) {}

/// Construct a Span from a single element reference.
/* implicit */ constexpr Span(T& single_element) : data_(&single_element), length_(1) {}

/// @returns a pointer to the start of the underlying element buffer.
iterator begin() const noexcept {
return data_;
Expand Down
Loading