mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd: Add ADL participants for vector_view.
This commit is contained in:
parent
a00a71e34c
commit
15b3292033
1 changed files with 25 additions and 0 deletions
|
@ -14,6 +14,10 @@
|
|||
namespace ircd
|
||||
{
|
||||
template<class T> struct vector_view;
|
||||
|
||||
template<class T> bool empty(const vector_view<T> &);
|
||||
template<class T> size_t size(const vector_view<T> &);
|
||||
template<class T> T *data(const vector_view<T> &);
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
@ -97,3 +101,24 @@ struct ircd::vector_view
|
|||
|
||||
vector_view() = default;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
T *
|
||||
ircd::data(const vector_view<T> &v)
|
||||
{
|
||||
return v.data();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
size_t
|
||||
ircd::size(const vector_view<T> &v)
|
||||
{
|
||||
return v.size();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
bool
|
||||
ircd::empty(const vector_view<T> &v)
|
||||
{
|
||||
return v.empty();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue