https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77907
--- Comment #1 from Freddie Chopin <freddie_chopin at op dot pl> --- Maybe it is important to add, that it doesn't matter whether SomeClass::someFunction() is const or not - it behaves identically in both cases.