I have no idea if this counts as a bug, it seems to be intended behavior but I don't understand why
Consider the following:
namespace dsl = lexy::dsl;
struct word {
static constexpr auto rule = dsl::identifier(dsl::ascii::alpha);
static constexpr auto value = lexy::as_string<std::string>;
};
int main() {
auto in {lexy::zstring_input("abc def")};
auto scanner {lexy::scan(in, lexy_ext::report_error)};
lexy::scan_result<std::string> result;
while(scanner.branch<word>(result)) {
fmt::print("{}\n", result.value());
scanner.parse(dsl::whitespace(dsl::ascii::blank));
}
}
This builds and runs as expected under a release build, but in a debug build hits the precondition assert in lazy init.
This is maybe a documentation bug? Or I'm just dumb?
I have no idea if this counts as a bug, it seems to be intended behavior but I don't understand why
Consider the following:
This builds and runs as expected under a release build, but in a debug build hits the precondition assert in lazy init.
This is maybe a documentation bug? Or I'm just dumb?