mirror of
https://github.com/matrix-construct/construct
synced 2024-11-05 13:28:54 +01:00
ircd: Improve vector_view construction.
This commit is contained in:
parent
cf6c8181a3
commit
517f1f1548
1 changed files with 6 additions and 6 deletions
|
@ -237,27 +237,27 @@ struct ircd::vector_view
|
|||
{}
|
||||
|
||||
vector_view(T *const &start, const size_t &size)
|
||||
:vector_view{start, start + size}
|
||||
:vector_view(start, start + size)
|
||||
{}
|
||||
|
||||
vector_view(const std::initializer_list<const T> &list)
|
||||
:vector_view{std::begin(list), std::end(list)}
|
||||
vector_view(const std::initializer_list<T> &list)
|
||||
:vector_view(std::begin(list), std::end(list))
|
||||
{}
|
||||
|
||||
template<class U,
|
||||
class A>
|
||||
vector_view(std::vector<U, A> &v)
|
||||
:vector_view{v.data(), v.size()}
|
||||
:vector_view(v.data(), v.size())
|
||||
{}
|
||||
|
||||
template<size_t SIZE>
|
||||
vector_view(T (&buffer)[SIZE])
|
||||
:vector_view{buffer, SIZE}
|
||||
:vector_view(buffer, SIZE)
|
||||
{}
|
||||
|
||||
template<size_t SIZE>
|
||||
vector_view(std::array<T, SIZE> &array)
|
||||
:vector_view{array.data(), array.size()}
|
||||
:vector_view(array.data(), array.size())
|
||||
{}
|
||||
|
||||
vector_view() = default;
|
||||
|
|
Loading…
Reference in a new issue