Member functions in C++ may be qualified as const
to guarantee that they don't alter this
, but I don't know of anyway to show that a function in general does not cause any changes to any data anywhere.
This would be helpful information to be able to put in a function signature, but I don't know of any way to accomplish this. How can I qualify a function as having no side effects in C++, preferably something not compiler specific but that may be too much to ask
Bonus points if there is a way that works for C as well.