File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -323,6 +323,24 @@ private:
323323 detail::storage<element_type, extent> _storage;
324324};
325325
326+ #if __cplusplus >= 201703L || __cpp_deduction_guides >= 201703L
327+ // Deduction guides
328+ template<class It, class EndOrSize>
329+ span(It, EndOrSize) -> span<remove_reference_t<iter_reference_t<It>>>;
330+
331+ template<class T, size_t N>
332+ span(T (&)[N]) -> span<T, N>;
333+
334+ template<class T, size_t N>
335+ span(std::array<T, N>&) -> span<T, N>;
336+
337+ template<class T, size_t N>
338+ span(const std::array<T, N>&) -> span<const T, N>;
339+
340+ template<class R>
341+ span(R&&) -> span<remove_reference_t<detail::range_reference_t<R>>>;
342+ #endif
343+
326344template<class ElementType, size_t Extent>
327345constexpr span<ElementType, Extent> make_span(ElementType (&arr)[Extent])
328346{
You can’t perform that action at this time.
0 commit comments