Closed nnathan closed 3 months ago
You're right, evaluate()
should be const, it never mutates the state of the jmespath_expression
. Fixed on master.
Much appreciated, thanks for the quick turn around. I'll leave it up to you if you want to close the request.
I would like to see the ability to allow const reference to a
jmespath_expression
, to ensure that it's read-only and allow the compiler to do any optimisations.It appears that the
jmespath_expression::evaluate()
are not const methods and therefore preventing making a useful const reference.I was a bit concerned that the
jmespath_expression
was mutating itself each evaluate, but after applying aconst
to theevaluate()
methods, and then made thejmespath_expression
a const reference, it didn't seem to have any issue.