https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99610
--- Comment #1 from Christian Schüler <gcchelp.5.adept at 0sg dot net> --- There is a workaround declaring the function Hash with trailing return will make the error go away. template< typename X > auto Hash( const X &arg ) const -> unsigned { ... }