[Bug c++/79290] [7 Regression] forming pointer to member function tries to access "__pfn"

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jan 30 23:42:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79290

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I forgot to provide the error. For completeness, it's:

s.cc: In member function ‘bool Printer<T>::operator()(SongTag)’:
s.cc:16:36: error: request for member ‘int (Song::*)(unsigned int)
const::__pfn’ in ‘st.SongTag::function()’, which is of non-class type
‘Song::GetFunction {aka int (Song::*)(unsigned int) const}’
     return st.function() == &Song::get;
                                    ^~~


More information about the Gcc-bugs mailing list