Why XMLDocument::SaveFile is not const like in TinyXML 1 ?
Just wonder why, as my program relies on this and I would prefer not to change it as a save operation is not supposed to change the XMLDocument object.
That's a minor bug. The issue is that SaveFile() can cause a SetError() to occur. Possibly SetError() should be mutable - but that's clunky - or the save shouldn't set an error?
Making SetError (and the errors attributes) mutable is a quick and easy solution. However, this isn't clean. Maybe XMLDocument shouln't store errors but functions currently using SetError should return a kind of Error object (as you don't want TinyXML2 to use exceptions).
Same question on XMLDocument::DeepCopy. I think it can be const.
Why is it not clean to declare the error value mutable? It sounds like the correct solution to achieve const-correctness. I now have to compromise my program's const-correctness to work around SaveFile not being const, that's a lot less clean.