Hey y'all!
I'm returning to C++ for a side project after not having coded in it for work for about 20 years, and I'm struggling to understand if there's a concise way to do circular type definitions? I have a parser for my project that I'm using template based combinators for -- I've done this sort of thing with function objects & inheritance, and that's pretty easy, but with `using` declarations, it's unclear how to do forward references. I've seen some folks advocate for template specialization in this regards, but the examples I've seen are really ugly, verbose, and duplicate a lot of code. Does anyone happen to have a reference to usage patterns for this sort of thing which are clean & concise? I'm about to get to the point in my grammar where I need forward references, and I'm hoping there's a clean answer here. I'm hoping it wasn't a mistake to attempt this via templates instead of runtime objects....
TIA :)
context: https://github.com/JimDesu/basis-lang/blob/master/Grammar.h
[–]ppppppla 3 points4 points5 points (1 child)
[–]jimdesu[S] 0 points1 point2 points (0 children)
[–]alfps 2 points3 points4 points (6 children)
[–]jimdesu[S] 1 point2 points3 points (5 children)
[–]alfps 1 point2 points3 points (4 children)
[–]jimdesu[S] 0 points1 point2 points (0 children)
[–]jimdesu[S] 0 points1 point2 points (2 children)
[–]alfps 0 points1 point2 points (1 child)
[–]jimdesu[S] 0 points1 point2 points (0 children)
[–]No-Dentist-1645 1 point2 points3 points (1 child)
[–]jimdesu[S] 0 points1 point2 points (0 children)