Skip to content

Commit a826c89

Browse files
author
Marc Emmers
committed
Backport dynamic extent when including <span>
Keep make_span functions even when <span> is available for compatibility
1 parent d5459ea commit a826c89

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

platform/cxxsupport/mstd_span

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
namespace mstd {
3636
using std::span;
37+
using std::dynamic_extent;
3738
}
3839

3940
#else //__cpp_lib_span >= 202002L
@@ -352,7 +353,13 @@ span(const std::array<T, N>&) -> span<const T, N>;
352353

353354
template<class R>
354355
span(R&&) -> span<remove_reference_t<detail::range_reference_t<R>>>;
355-
#endif
356+
#endif //__cplusplus >= 201703L || __cpp_deduction_guides >= 201703L
357+
358+
} // namespace mstd
359+
360+
#endif //__cpp_lib_span >= 202002L
361+
362+
namespace mstd {
356363

357364
/** Create a span class with type and size inferred from the argument
358365
*
@@ -407,5 +414,4 @@ constexpr span<const typename R::value_type> make_span(const R &cont)
407414

408415
} // namespace mstd
409416

410-
#endif //__cpp_lib_span >= 202002L
411417
#endif // MSTD_SPAN_

0 commit comments

Comments
 (0)