Closed 0x8000-0000 closed 4 years ago
--- a/include/tao/pegtl/memory_input.hpp
+++ b/include/tao/pegtl/memory_input.hpp
@@ -369,7 +369,7 @@ namespace TAO_PEGTL_NAMESPACE
[[nodiscard]] std::string_view line_at( const TAO_PEGTL_NAMESPACE::position& p ) const noexcept
{
const char* b = begin_of_line( p );
- return std::string_view( b, end_of_line( p ) - b );
+ return std::string_view( b, static_cast<size_t>(end_of_line( p ) - b) );
}
};
seems to take care of it.
Thank you!
I am handling the parsing failure as documented in https://github.com/taocpp/PEGTL/blob/master/doc/Inputs-and-Parsing.md#error-reporting and I am encountering this warning at compilation time:
This is with gcc8 on 9d58962818d69436384044e0a578239548f42a7b .