[Bug c++/85587] New: bogus error: ‘F’ was not declared in this scope

mpolacek at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue May 1 14:39:00 GMT 2018


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

            Bug ID: 85587
           Summary: bogus error: ‘F’ was not declared in this scope
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mpolacek at gcc dot gnu.org
  Target Milestone: ---

template <int N>
struct S
{
  enum class T
  {
    E, F
  };
  void foo ();
};

template <int N>
void S<N>::foo ()
{
  decltype (T::F) t;
}

void
bar ()
{
  S<0> s;
  s.foo ();
}

is rejected since r251438.


More information about the Gcc-bugs mailing list