Added array constructors.

This commit is contained in:
Neil MacIntosh
2016-02-29 13:16:48 -08:00
parent 502cd6650a
commit f61a9bba48
2 changed files with 23 additions and 51 deletions
+12 -5
View File
@@ -108,14 +108,21 @@ public:
{}
template <size_t N>
constexpr span(element_type(&arr)[N]) : storage_(&arr[0], extent_type<N>())
constexpr span(element_type(&arr)[N])
: storage_(&arr[0], extent_type<N>())
{}
template <size_t N>
constexpr span(std::array<std::remove_const_t<element_type>, N>& arr)
: storage_(&arr[0], extent_type<N>())
{}
template <size_t N>
constexpr span(const std::array<std::remove_const_t<element_type>, N>& arr)
: storage_(&arr[0], extent_type<N>())
{}
#if 0 // TODO
template <size_t N>
constexpr span(array<remove_const_t<element_type>, N>& arr);
template <size_t N>
constexpr span(const array<remove_const_t<element_type>, N>& arr);
template <class Container>
constexpr span(Container& cont);
template <class Container>