0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 00:32:35 +01:00

ircd::buffer: Minor move misplaced buffer base cast operators.

This commit is contained in:
Jason Volk 2018-11-14 00:31:55 -08:00
parent be96cf3ca4
commit 4dd8f5ab3a
2 changed files with 21 additions and 21 deletions

View file

@ -422,24 +422,3 @@ ircd::buffer::begin(const buffer<it> &buffer)
{
return get<0>(buffer);
}
template<class it>
ircd::buffer::buffer<it>::operator std::string()
const
{
return { reinterpret_cast<const char *>(data(*this)), size(*this) };
}
template<class it>
ircd::buffer::buffer<it>::operator std::string_view()
const
{
return { reinterpret_cast<const char *>(data(*this)), size(*this) };
}
template<class it>
ircd::buffer::buffer<it>::operator string_view()
const
{
return { reinterpret_cast<const char *>(data(*this)), size(*this) };
}

View file

@ -71,3 +71,24 @@ ircd::buffer::buffer<it>::operator[](const size_t &i)
{
return *(begin() + i);
}
template<class it>
ircd::buffer::buffer<it>::operator std::string()
const
{
return { reinterpret_cast<const char *>(data(*this)), size(*this) };
}
template<class it>
ircd::buffer::buffer<it>::operator std::string_view()
const
{
return { reinterpret_cast<const char *>(data(*this)), size(*this) };
}
template<class it>
ircd::buffer::buffer<it>::operator string_view()
const
{
return { reinterpret_cast<const char *>(data(*this)), size(*this) };
}