We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2078a2 commit 0ab81caCopy full SHA for 0ab81ca
runtime/core/span.h
@@ -55,6 +55,9 @@ class Span final {
55
template <size_t N>
56
/* implicit */ constexpr Span(T (&Arr)[N]) : data_(Arr), length_(N) {}
57
58
+ /// Construct a Span from a single element reference.
59
+ /* implicit */ constexpr Span(T& single_element) : data_(&single_element), length_(1) {}
60
+
61
/// @returns a pointer to the start of the underlying element buffer.
62
iterator begin() const noexcept {
63
return data_;
0 commit comments