Closed chybz closed 6 years ago
The error message is a bit rubbish, but the problem is that you forgot to provide a source for your data. Try:
tao::pegtl::string_input<> in( s, "std::string" );
(I might look into ways to improve the error message, but it would probably end up with a lot of code duplication that I'd like to avoid)
Hi ! First and foremost, it's a real pleasure to use PEGTL, thank you !
When using
string_input
like:std::string s{ "something to parse" };
tao::pegtl::string_input<> in(s);
a compiler error occurs.
Obviously in
string_input.hpp:42
the second parameter tomemory_input
is not what is expected.Changing it to
data.data() + data.size()
fixes the problem.Hope this helps.
Best.