view: don't enforce constness of view iterators in util::read

This commit is contained in:
Danny Robson 2018-08-01 20:58:43 +10:00
parent bcb4d7569f
commit 20df746217

View File

@ -651,7 +651,7 @@ namespace util {
typename = std::enable_if_t<sizeof(ByteT) == 1>
>
ValueT
read (util::view<ByteT const*> &buffer)
read (util::view<ByteT*> &buffer)
{
if (unlikely (sizeof (ValueT) > buffer.size ()))
throw std::runtime_error ("insufficient data for extraction");