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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Here is another example:
   class X { protected: ~X(); friend struct Y; }; 
   struct Y { X x = {}; }; 

int main() {
   Y b {}; 
}

But unlike the previous example, this one is rejected by clang in C++14 but
accepted for C++11.
And even accepted by ICC for C++17 and C++14.
Note it is rejected by MSVC though.

Reply via email to