Debian Codegraph @

gcc/testsuite/g++.dg/torture/accessor-fixits-3.C

raw
1 class foo
2 {
3 public:
4 static foo& get_singleton () { return s_singleton; }
5
6 private:
7 static foo s_singleton;
8 };
9
10 foo & test_access_singleton ()
11 {
12 return foo::s_singleton; // { dg-error ".foo foo::s_singleton. is private within this context" }
13 // { dg-message "declared private here" "" { target *-*-* } 7 }
14 // We don't yet support generating a fix-it hint for this case.
15 }