I am beginning with Boost Spirit x3 parsing library - and I'm very excited about it.
One thing unclear to me is when and why one should use x3::lit
.
From what I understood, it's because we can not expect an expression like ']' >> double_
to be interpreted as intended within C++ syntactic rules.
But my interpretation seems incorrect, since the official documentation displays numerous examples of simple strings followed by the >>
operator, and others instances where parenthesis and/or brackets have to be specified as lit(']')
What am I missing?