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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2014-03-29 00:00:00         |2021-8-4

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Clang and GCC both accept it.
ICC and MSVC both reject it.

ICC error message:
<source>(8): error #308: class "A::B" (declared at line 4) is inaccessible
  using C = A::B; // Already the declaration of this alias template is
ill-formed
               ^
          detected during instantiation of type "C<A>" at line 12

<source>(8): error #308: class "A::B" (declared at line 4) is inaccessible
  using C = A::B; // Already the declaration of this alias template is
ill-formed
               ^
          detected during instantiation of type "C<int>" at line 13

<source>(14): warning #1: last line of file ends without a newline
  }
   ^


MSVC error message:

<source>(8): error C2248: 'A::B': cannot access private struct declared in
class 'A'
<source>(4): note: see declaration of 'A::B'
<source>(2): note: see declaration of 'A'
Compiler returned: 2

Reply via email to