imr/fundamental: use bytes_view::const_pointer for const pointer

In libstdc++ shipped with gcc9 std::basic_string_view::pointer is no
longer constant, which is causing the compiler to complain about
dropping const in reinterpret_cast. The solution is to use
std::basic_string_view::const_pointer.
This commit is contained in:
Paweł Dziepak
2019-05-09 17:04:06 +01:00
parent a23531ebd5
commit c19576319f

View File

@@ -241,7 +241,7 @@ struct buffer {
{ ctx.template size_of<Tag>() } noexcept -> size_t;
})
static view make_view(const uint8_t* in, const Context& context) noexcept {
auto ptr = reinterpret_cast<bytes_view::pointer>(in);
auto ptr = reinterpret_cast<bytes_view::const_pointer>(in);
return bytes_view(ptr, context.template size_of<Tag>());
}