0
0
Fork 0
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:
Jason Volk 2018-03-12 11:24:31 -07:00
parent a00a71e34c
commit 15b3292033

View file

@ -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();
}