view gcc/testsuite/g++.dg/other/accessor-fixits-3.C @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children
line wrap: on
line source

class foo
{
public:
  static foo& get_singleton () { return s_singleton; }

private:
  static foo s_singleton;
};

foo & test_access_singleton ()
{
  return foo::s_singleton; // { dg-error ".foo foo::s_singleton. is private within this context" }
  // { dg-message "declared private here" "" { target *-*-* } 7 }
  // We don't yet support generating a fix-it hint for this case.
}