> Note that a function that has pointer arguments and examines the data pointed to must not be declared const if the pointed-to data might change between successive invocations of the function. In general, since a function cannot distinguish data that might change from data that cannot, const functions should never take pointer or, in C++, reference arguments. Likewise, a function that calls a non-const function usually must not be const itself. from [GCCdocumentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attr ibutes.html#index-const-function-attribute)