[Bug c++/79290] New: [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 18:36:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79290
Bug ID: 79290
Summary: [7 Regression] forming pointer to member function
tries to access "__pfn"
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
struct Song {
typedef int (Song::*GetFunction)(unsigned) const;
virtual int get(unsigned) const = 0;
};
struct SongTag {
Song::GetFunction function() const { return m_function; }
Song::GetFunction m_function;
};
template<typename T>
struct Printer {
bool operator()(const SongTag st) {
return st.function() == &Song::get;
}
};
int main()
{
Printer<int> p;
p(SongTag{});
}
More information about the Gcc-bugs
mailing list