From c19576319f86fd467b3b6292d841039a3bafd143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Dziepak?= Date: Thu, 9 May 2019 17:04:06 +0100 Subject: [PATCH] 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. --- imr/fundamental.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imr/fundamental.hh b/imr/fundamental.hh index 59a4526471..54e5368c6c 100644 --- a/imr/fundamental.hh +++ b/imr/fundamental.hh @@ -241,7 +241,7 @@ struct buffer { { ctx.template size_of() } noexcept -> size_t; }) static view make_view(const uint8_t* in, const Context& context) noexcept { - auto ptr = reinterpret_cast(in); + auto ptr = reinterpret_cast(in); return bytes_view(ptr, context.template size_of()); }