Open danlark1 opened 3 years ago
This pattern's a general issue w/ the library atm, I'd guess that when dynamic allocation is allowed at compile time that this would get worked on, without being about to allocate currently there's no real good way to backtrack to solve that pattern. In short if you really need a pattern like this, expect it to not quite work the way it should.
No, you don't need to allocation for this, it's a bit tricky thing to solve for repeats. I have almost done the solution, but it's not ready yet and I don't have any time to work on it right now.
You mentioned this before somewhere, I'm curious how you'd do this without allocating. I guess preallocating is an option to a certain limit. Not sure is generally solvable without memory. I don't think dfa's necessarily handle all cases here, that's about the only approach that doesn't involve allocation, is that what you're working on?
Does not compile:
Compiles:
https://gcc.godbolt.org/z/rfsP6d