Debian Codegraph @

gcc/testsuite/g++.dg/warn/pr79290.C

raw
1 // { dg-additional-options "-Wall" }
2 // PR 79290, bogus warning looking inside PMF
3
4 struct Song {
5 int get() const ;
6 };
7
8 typedef int (Song::*PMF_t)() const;
9
10 struct SongTag {
11 PMF_t function () const;
12 };
13
14
15 template<typename T>
16 struct Printer {
17 bool Foo(const SongTag &st) {
18 return st.function () == &Song::get;
19 }
20 };
21
22 void Baz (Printer<int> *p, SongTag const &st)
23 {
24 p->Foo (st);
25 }